From patchwork Sat May 15 19:09:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 439446 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp1355376jam; Sat, 15 May 2021 12:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxvnRUqGN9qQ7++oecptmD1qb2Q+uomRENeJfVfZQP3sc67rFe7gHnw9srAwrscIWMxDAC X-Received: by 2002:a17:902:c60b:b029:ef:a791:1973 with SMTP id r11-20020a170902c60bb02900efa7911973mr12588414plr.11.1621105759619; Sat, 15 May 2021 12:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621105759; cv=none; d=google.com; s=arc-20160816; b=nm4cdPyEoStcbbk4Wuu/SrxD1u8q0V81yUFqu0an8jX1hH5WcFvFbWrIWgXP8Qvpu4 ZyI7O3ehJ/cvIxVIwXlnz3PycgUvb56thSeaxDC3jcDU0Nx9A7jh+JHa7sXk2rVdkA0K hgSZmPAU6C3w7BGS+vVYY9QfAKXblAlyL/gW8V5oPuMh6j4vockuYqpbZKqVyM9+8IUN 16J+4vFw3IzC5ok0AOLUQ3cZwsoxIV3NYrWy6+CWrrJD8bCHdQieNOu6OpBVc5//I2/e gaNNks7Vnayj5mugfTWUZLZtWLtR9BeMjIPNYASQl7OsGjNVEawvrGwCM25NMj6YzAQG WGrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=pmJr7udGenhHroV8BhxM4TWBA/MGEM7jtLhmDnAa3/I=; b=iGAISA5LP6UtOno6bgMDlv/7cg2Lo7kUWiF5wQZisA9sdHD65CMLhury/lLCxRiEeE 2QomSMhxokSjiHO0jnNV82Botg+AMYTWMjhDps62kJmvYqi8WMJV5TjJSLLAB/3Dfb46 ZT8vPur+/oEJ610Yl1IvB2J0RL9ex/twqG+c0Nj4JPrPUfmIncfuapRttkm9lAree27b nDfj1Y46fNCJAUigSlljpo48b9zCPIV+XYXXyfTIapZZGOAO6F3JBvCVqKgg+UkP9K1y xU144snww/DjeUaIseuCO9URiD4QIzCb00pIieOpQp3hbc7pKCY7wAjOuKOUWrH5xhiy ph7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qv80nCJX; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x8si3630213pjq.125.2021.05.15.12.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 12:09:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qv80nCJX; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B68C6E438; Sat, 15 May 2021 19:09:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id BED356E438 for ; Sat, 15 May 2021 19:09:14 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id p12so2421955ljg.1 for ; Sat, 15 May 2021 12:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pmJr7udGenhHroV8BhxM4TWBA/MGEM7jtLhmDnAa3/I=; b=qv80nCJXwOs0h3kQWAg3aKTuAJjKZpAU0wA6O6r0HcMzmYwxgnU6MKA7MiNl/oKAmK SpM7t1zRg7v3YdBxw5RA2VOE4k5qy/2OlvB7T+BjMPJa7eB420yrfVqrExDYSFTnVvVJ guSqmtppABHeQ3CPSlCcPCJrvwHDnFaT8ubnExXCqNa0+iA+FPA/sKrCBfgg3RblFH9V ZUqexMZfyThnK7H/VxtqvXpeaSxjb1sXwq9KV5rFlxPVXLlQaQRYWpoUweM5VLWmGe9P 6ctYzeAQM46jZHQrX27VWinxXbFXZa0oNJO5HAFtu+L9r215jGEbe4ZXd3r0d2KWDm6/ jxLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pmJr7udGenhHroV8BhxM4TWBA/MGEM7jtLhmDnAa3/I=; b=W8PUybkReBWNLqSxeyuCYMx/S//SvL7NCa41NQ+vu6lMlsQXUry3x0F3iYMO8U5Kui 9+5RcHLTXm8AwLM8R4DmlYlykOmiCbBTZuc4OGN++wmOB6cQczmLWJ5yfQCseDxoLgmo P3VyQMeJzags66PQX+MQQuxu4yhqI3OQPkHOlfkLLtlBUeEz4xux50dhjeBKpDewL/jL bAw1JgY90BnZLW5Td8z58CL0OC12ofxavZdElnIhzdceRqdG8qNwx6+SAgDTGZusaTDs JgrC+NnyDmqnahecK5gBJzDwPx4agqamo518OLacLssKb9VKaY5+qHoTVlAm02rUA4Eo 3vsw== X-Gm-Message-State: AOAM5338tpiT+se9dAzqUXiBWMQX+KkEUIEODLjIjZYoIek1wKsV+z2P m3MQV5cvRxbCj5bILXkQL/V58A== X-Received: by 2002:a05:651c:b07:: with SMTP id b7mr11197957ljr.218.1621105753214; Sat, 15 May 2021 12:09:13 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id t15sm2184107ljk.99.2021.05.15.12.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 12:09:12 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v3 2/4] drm/msm/dpu: drop dpu_hw_blk_destroy function Date: Sat, 15 May 2021 22:09:07 +0300 Message-Id: <20210515190909.1809050-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210515190909.1809050-1-dmitry.baryshkov@linaro.org> References: <20210515190909.1809050-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Marek , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The dpu_hw_blk_destroy() function is empty, so we can drop it now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c | 13 ------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 3 --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 2 -- 10 files changed, 31 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c index abad043f35f5..1f2b74b9eb65 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c @@ -22,16 +22,3 @@ void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id) hw_blk->type = type; hw_blk->id = id; } - -/** - * dpu_hw_blk_destroy - destroy hw block object. - * @hw_blk: pointer to hw block object - * return: none - */ -void dpu_hw_blk_destroy(struct dpu_hw_blk *hw_blk) -{ - if (!hw_blk) { - pr_err("invalid parameters\n"); - return; - } -} diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h index fb3be9a36a50..7768694b558a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h @@ -24,5 +24,4 @@ struct dpu_hw_blk { }; void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id); -void dpu_hw_blk_destroy(struct dpu_hw_blk *hw_blk); #endif /*_DPU_HW_BLK_H */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c index 04a2c4b9a357..441f66a4fb37 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c @@ -620,7 +620,5 @@ struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx, void dpu_hw_ctl_destroy(struct dpu_hw_ctl *ctx) { - if (ctx) - dpu_hw_blk_destroy(&ctx->base); kfree(ctx); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c index d2f1045a736a..977b25968f34 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c @@ -117,9 +117,6 @@ struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx, void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp) { - if (dspp) - dpu_hw_blk_destroy(&dspp->base); - kfree(dspp); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c index 6ffe97601716..17224556d5a8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c @@ -332,8 +332,6 @@ struct dpu_hw_intf *dpu_hw_intf_init(enum dpu_intf idx, void dpu_hw_intf_destroy(struct dpu_hw_intf *intf) { - if (intf) - dpu_hw_blk_destroy(&intf->base); kfree(intf); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c index 554bb881de3a..76f8b8f75b82 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c @@ -189,7 +189,5 @@ struct dpu_hw_mixer *dpu_hw_lm_init(enum dpu_lm idx, void dpu_hw_lm_destroy(struct dpu_hw_mixer *lm) { - if (lm) - dpu_hw_blk_destroy(&lm->base); kfree(lm); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c index 863229dd0140..406ba950a066 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c @@ -86,7 +86,5 @@ struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(enum dpu_merge_3d idx, void dpu_hw_merge_3d_destroy(struct dpu_hw_merge_3d *hw) { - if (hw) - dpu_hw_blk_destroy(&hw->base); kfree(hw); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c index 334d5b28f533..92cd724263ce 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c @@ -289,7 +289,5 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx, void dpu_hw_pingpong_destroy(struct dpu_hw_pingpong *pp) { - if (pp) - dpu_hw_blk_destroy(&pp->base); kfree(pp); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c index ceb2488ea270..8734a47040aa 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c @@ -740,8 +740,6 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx, void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx) { - if (ctx) - dpu_hw_blk_destroy(&ctx->base); kfree(ctx); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c index 5d2c33ec1de7..dae77d9c2c74 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c @@ -329,8 +329,6 @@ struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx, void dpu_hw_mdp_destroy(struct dpu_hw_mdp *mdp) { - if (mdp) - dpu_hw_blk_destroy(&mdp->base); kfree(mdp); } From patchwork Sat May 15 19:09:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 439447 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp1355406jam; Sat, 15 May 2021 12:09:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKBnunsdd5MO4IEHGPswai449uWV08AcUv7AxMZF96nsmGfjRaAv9NhcQRbaEYbBZTkNV8 X-Received: by 2002:a17:902:db09:b029:ee:f2d5:3d0f with SMTP id m9-20020a170902db09b02900eef2d53d0fmr50935082plx.13.1621105762158; Sat, 15 May 2021 12:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621105762; cv=none; d=google.com; s=arc-20160816; b=UNixO15dRRXItRyZRttLd+GQS912ovRe4zuGncEFuDXZ7GxF866tc1An4tluMqnrno D+18zWPlEYzAOkCpdDI2ufVry46+/C5zpgWqxzJW78Vr1x16rHY6MZHrzUDBLQGajijY W8WHK858m7gokWlJAf4xj0KuJykDuldPr/e8bvLK1KgWcKWQJf2Mu8hevaBw24sNAf+/ Tmb+aFkof+NHJZ3KAYICSoeLzy34Khj2Jlbg1t65UIUaWkt5uTNNUEf2SkTjvqncLO1M m/4OeWsp+iDIa/IXUwZHKdcEbdrLrE9Eq21bUAx2G3goZIAM4j5tiTN6jb0NuvkMUhDW 7Ujw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=eMBcKmm8yE2cOuLCEAY4tFKnMIM8Fg6P3y5+AbqZ1+w=; b=xK7KbSoIraoGg3cBGi1zO/Xs8f+gH5q3miMOoLZh1YGkDKAA3aGtI4dBZVZhJnH8h7 HfeBrSni2esvMYTxpOZ3oO1YY5ANRaU8VA174HFgo7pWP1a8aIlnxbBTaVVn7XlaceVn hZeB8vEYvBvBIGBwsrFCx4mKhfl23JPbNXfoV8By1g+Prz0qdR2J/DGRtHyu9URephNt HoQ4bG4+nzassWGXfOY/+P+bn/JRlguelGUX8UMRk/WUDOxkzNrIn2abtHQdZnMg4Bvp hynnAH9+WcjA2GaTUAoA0PSD1bzuOJGwO5u2CxA5g3UfVZiFq4+al/LM3WmMGNiSEVGD ZeEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=quGJGkpd; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id m7si11478660pjq.33.2021.05.15.12.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 12:09:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=quGJGkpd; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05EB46E437; Sat, 15 May 2021 19:09:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AADD6E437 for ; Sat, 15 May 2021 19:09:15 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id v9so1677249lfa.4 for ; Sat, 15 May 2021 12:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eMBcKmm8yE2cOuLCEAY4tFKnMIM8Fg6P3y5+AbqZ1+w=; b=quGJGkpdX43yncm1z48eYe1q1Sh5/UFm/Keb9+b1UrZ/36ywT2cmG7mjaFaN6qgXXp iqLNFJYS3cLT1d83MnLXf7iB22JSQktuOoZ2mbMTRnLcMbuo34SjxgycS3IuukE4923B ekbTYeMNY25j23JP2YBiOsKAO+urd9cCk9b0ckFQBh6uMU9EVMSsHISbBz1DYCFKchZQ yiWfgtkH9gDg8F8y7LNMPgEjfBS9Ch98EpYBEEg4FQtAdJSPtpaA+rhEXpD/Ua6iii+C UZS/k6WVWbn8x3B7mhUjwFt+wqU3xPtyb5Xp9xbQILGzboNB7S/PxUapIibGODoKpkc2 iPPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eMBcKmm8yE2cOuLCEAY4tFKnMIM8Fg6P3y5+AbqZ1+w=; b=dSoakxQAEnmjOhDKm5m94vmDNVhuhjGXRf+tMp3OOa3PD3zcSzppbEpTlZm+wl1LQI uVYCJQjpPGOpu2+grx5PSnMTt2CJogYfDtsF+30gqQD/6SpVzZ4tg28D3sImObIQ1o/V yXxW6JVwUUH28wsCYPG+6V6PLs4Oqaw+gVrnV6RjSl1FNzMctomrrpeOCnwrPEhuqfm1 Fea/2up6cZzOaHRcJ2bJOs4gylkQk+GyKzRNETe1xheGNZUbfFLBIaL3Q/5R28m7eqPk Y4Rm9+kMJNnZ2+nose9uh9vVZZ19ur0hWYUarU2gMo2d/ehXlgnCWQv0f5r8lzf/hOaf h5UQ== X-Gm-Message-State: AOAM533ygkctqSJ3MWxMpxAhgWNV1PATyt/j7gCRXZ9wgbDIDmbLfbGV osac3Enr8IgaHShG6DD36eJI2A== X-Received: by 2002:a05:6512:689:: with SMTP id t9mr35945279lfe.262.1621105753924; Sat, 15 May 2021 12:09:13 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id t15sm2184107ljk.99.2021.05.15.12.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 12:09:13 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v3 3/4] drm/msm/dpu: use struct dpu_hw_merge_3d in dpu_hw_pingpong Date: Sat, 15 May 2021 22:09:08 +0300 Message-Id: <20210515190909.1809050-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210515190909.1809050-1-dmitry.baryshkov@linaro.org> References: <20210515190909.1809050-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Marek , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use struct dpu_hw_merge_3d pointer in struct dpu_hw_pingpong rather than using struct dpu_hw_blk. This is the only user of dpu_hw_blk.id, which will be cleaned in the next patch. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 11 ++++------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 4 +++- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index 0e06b7e73c7a..4feec24162bc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -284,7 +284,7 @@ static void dpu_encoder_phys_vid_setup_timing_engine( intf_cfg.stream_sel = 0; /* Don't care value for video mode */ intf_cfg.mode_3d = dpu_encoder_helper_get_3d_blend_mode(phys_enc); if (phys_enc->hw_pp->merge_3d) - intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->id; + intf_cfg.merge_3d = phys_enc->hw_pp->merge_3d->idx; spin_lock_irqsave(phys_enc->enc_spinlock, lock_flags); phys_enc->hw_intf->ops.setup_timing_gen(phys_enc->hw_intf, @@ -298,11 +298,8 @@ static void dpu_encoder_phys_vid_setup_timing_engine( true, phys_enc->hw_pp->idx); - if (phys_enc->hw_pp->merge_3d) { - struct dpu_hw_merge_3d *merge_3d = to_dpu_hw_merge_3d(phys_enc->hw_pp->merge_3d); - - merge_3d->ops.setup_3d_mode(merge_3d, intf_cfg.mode_3d); - } + if (phys_enc->hw_pp->merge_3d) + phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d, intf_cfg.mode_3d); spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags); @@ -461,7 +458,7 @@ static void dpu_encoder_phys_vid_enable(struct dpu_encoder_phys *phys_enc) ctl->ops.update_pending_flush_intf(ctl, phys_enc->hw_intf->idx); if (ctl->ops.update_pending_flush_merge_3d && phys_enc->hw_pp->merge_3d) - ctl->ops.update_pending_flush_merge_3d(ctl, phys_enc->hw_pp->merge_3d->id); + ctl->ops.update_pending_flush_merge_3d(ctl, phys_enc->hw_pp->merge_3d->idx); skip_flush: DPU_DEBUG_VIDENC(phys_enc, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h index 845b9ce80e31..89d08a715c16 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h @@ -126,6 +126,8 @@ struct dpu_hw_pingpong_ops { struct dpu_hw_dither_cfg *cfg); }; +struct dpu_hw_merge_3d; + struct dpu_hw_pingpong { struct dpu_hw_blk base; struct dpu_hw_blk_reg_map hw; @@ -133,7 +135,7 @@ struct dpu_hw_pingpong { /* pingpong */ enum dpu_pingpong idx; const struct dpu_pingpong_cfg *caps; - struct dpu_hw_blk *merge_3d; + struct dpu_hw_merge_3d *merge_3d; /* ops */ struct dpu_hw_pingpong_ops ops; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index fd2d104f0a91..c0eec12498e7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -162,7 +162,7 @@ int dpu_rm_init(struct dpu_rm *rm, goto fail; } if (pp->merge_3d && pp->merge_3d < MERGE_3D_MAX) - hw->merge_3d = rm->merge_3d_blks[pp->merge_3d - MERGE_3D_0]; + hw->merge_3d = to_dpu_hw_merge_3d(rm->merge_3d_blks[pp->merge_3d - MERGE_3D_0]); rm->pingpong_blks[pp->id - PINGPONG_0] = &hw->base; }