From patchwork Fri Jan 21 21:06:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 533831 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1054689imr; Fri, 21 Jan 2022 13:06:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVPvD04f9FoLql7DwX/r4m7ChRP55tBGfx4wBFou5m0HUCEwFp1Kgv8ql3OWuwwRoVdko0 X-Received: by 2002:a63:1f07:: with SMTP id f7mr4141279pgf.219.1642799190825; Fri, 21 Jan 2022 13:06:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799190; cv=none; d=google.com; s=arc-20160816; b=p1bJEiiyoQLJVFVDUlFph9eFlM/ttwL5aHaQr2M1LQKfkFGnZUvZqOzfdThrJ76bjk cGDqUqLOKxMzj/qcb6LBzW2McVERgje5+nb4LKu7lgNiC0nXKRJryliXEHXXjRNivesH Kkj2hy3nL25zlm8h4TSOyRY67jjJBRGm7mim7c+Z6unWZw+c/yfEvC25AreiEAe83Nqz hi0mHvwVYUJ5QPdWtHTUdP+qhiRppduvViAW8hQxVETnUhH2RrT5uG8OzU6lpQ+3Nuf3 f4zZ9oFikqq2sQ1lYpH71bD8Vc8Dv1sYI7r4u5nW8MC/iYz1e0bomHZpQMEhFP9Grf9L SozQ== 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=zxJMNd08fBIp+phPJjWAVZVWzjoHZnrrt+sPMY4L3X0=; b=NJJqEwZD+QvrC7F7lUonYJKY2/hVOQqik/A7my3LaOahxbDZ4FUGIGA2FnsmDMI0jx ek56eVIXrkoTyeojbolN7pIIP9TouDBHiIUIv6SrPCCtCAuV26HuWgs7HiZmcgWIEaLc R/1Pq6arlUUTnaWOSUR/u9w8sIixkC6+ELYEbUL7CwEbrSJpLRgJTPoYwZxQO4Gb2bmg FpQozTiT3GFy4rWoef7/2r2Q0lp6F0z6TwMj2LHCLLyuPwtJwZx3b8mJmDjM9UKrcZZW YkSEfYlpASa0MM0y13w+4AGdT/b1GEhQBoIECiC+/c771WOG9LIwoVfm9F1GzHuOR+CV pbXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=U0SJ6kNw; 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 m4si6652705pll.482.2022.01.21.13.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 13:06:30 -0800 (PST) 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=U0SJ6kNw; 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 EA5B110E69A; Fri, 21 Jan 2022 21:06:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8541D10E69A for ; Fri, 21 Jan 2022 21:06:22 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id bu18so36356934lfb.5 for ; Fri, 21 Jan 2022 13:06:22 -0800 (PST) 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=zxJMNd08fBIp+phPJjWAVZVWzjoHZnrrt+sPMY4L3X0=; b=U0SJ6kNwlAVK9R+AcmLc81cHW/T42DMoHeozc8q6GPXb0tpw3UTaqJzZPAinfU4LOn 5iLOc5E4IeQhREBs5haYK/qGXvQFLyOpUh4vQ9KgXQjEkW9f0i7mNa/blIxfK7tSsKR7 Xf9IHn9QYDn7RXE04gBqyRa3UC+vEVQ3EhfE+QPOB43rqCv8qJ4bQHX+Tyea7yf/FVT5 6FByPF5KiXvtDkYX0Bo82KAkyH8DZ+kMciiJwTP60Y02VOQHZgSD/2pkXkPFSCyf6g9x bIESuf3zFmrAT2NyxLYpovwvF7amHE8JL8ezlBVQ/77Q+MlC1hsfADO/UfgegDXsjQNY j+nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zxJMNd08fBIp+phPJjWAVZVWzjoHZnrrt+sPMY4L3X0=; b=WpEQpD9Mw53cT2HCpEDozYvBTpU9BidSzhAvsQ2hqn93spa3vyZoNoVwiFWQmeOvqp DO+GGGvpyEawNoSoa7CPp3b3iErYeneDb7wl6hQgaGU+jqvY+71o6u8s80y2uh+cLvLF Y/MjhZYg2yD3MG7fiXlOkNDVRZoXKG7BSelAY3EER2S/CPO3PtM7MxygwWuAfOq2DEaO XYcRukxNskY/8f5UBXSf+Eiuq/o5BSFlrhXl0ifshjrwwRltEi8F9B0SA+4Ms7JMoN/r 0Fx4vnpxqtcHBUqQKbkCjzOV6hHlqjZYafKGyy0L8bZEx1BI258iU/qfayg1W2LRYd0Q WmpQ== X-Gm-Message-State: AOAM533R/YOHfofuc7TGF7OrskUD+rX5J/5AX2MH3iU+qnSLUIkjqfAO 75fjvsIpxFm/F7U5guRjt3/0gw== X-Received: by 2002:a19:645b:: with SMTP id b27mr4916176lfj.262.1642799180808; Fri, 21 Jan 2022 13:06:20 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id v10sm279125ljk.44.2022.01.21.13.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 13:06:20 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v5 1/6] drm/msm/dpu: drop unused lm_max_width from RM Date: Sat, 22 Jan 2022 00:06:13 +0300 Message-Id: <20220121210618.3482550-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121210618.3482550-1-dmitry.baryshkov@linaro.org> References: <20220121210618.3482550-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: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" No code uses lm_max_width from resource manager, so drop it. Instead of calculating the lm_max_width, code can use max_mixer_width field from the hw catalog. Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 12 ------------ drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 4 ---- 2 files changed, 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index f9c83d6e427a..b5b1ea1e4de6 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -114,18 +114,6 @@ int dpu_rm_init(struct dpu_rm *rm, goto fail; } rm->mixer_blks[lm->id - LM_0] = &hw->base; - - if (!rm->lm_max_width) { - rm->lm_max_width = lm->sblk->maxwidth; - } else if (rm->lm_max_width != lm->sblk->maxwidth) { - /* - * Don't expect to have hw where lm max widths differ. - * If found, take the min. - */ - DPU_ERROR("unsupported: lm maxwidth differs\n"); - if (rm->lm_max_width > lm->sblk->maxwidth) - rm->lm_max_width = lm->sblk->maxwidth; - } } for (i = 0; i < cat->merge_3d_count; i++) { diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h index 1f12c8d5b8aa..0f27759211b5 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h @@ -20,8 +20,6 @@ struct dpu_global_state; * @ctl_blks: array of ctl hardware resources * @intf_blks: array of intf hardware resources * @dspp_blks: array of dspp hardware resources - * @lm_max_width: cached layer mixer maximum width - * @rm_lock: resource manager mutex */ struct dpu_rm { struct dpu_hw_blk *pingpong_blks[PINGPONG_MAX - PINGPONG_0]; @@ -30,8 +28,6 @@ struct dpu_rm { struct dpu_hw_blk *intf_blks[INTF_MAX - INTF_0]; struct dpu_hw_blk *dspp_blks[DSPP_MAX - DSPP_0]; struct dpu_hw_blk *merge_3d_blks[MERGE_3D_MAX - MERGE_3D_0]; - - uint32_t lm_max_width; }; /**