From patchwork Mon Oct 9 16:36:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13414020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49B2DCD6107 for ; Mon, 9 Oct 2023 16:36:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8332D10E28D; Mon, 9 Oct 2023 16:36:31 +0000 (UTC) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF49E10E12C for ; Mon, 9 Oct 2023 16:36:25 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-406402933edso43892525e9.2 for ; Mon, 09 Oct 2023 09:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869384; x=1697474184; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=D05Lo/nbBOabodso2ZTFF+A5WDtwFnSg45QKqcMzRio=; b=k8vgVkvXlvRK/E9B9CGZXgW8OAzW1KJ+UQ8SG13/ijBJlJ0nx8IdKlY74Z9riTuJtJ S8fPAhXXHxF4j2JYW/WNEc6JUURJVnabuZydw7uKbuuZDB9PL/72zQ4AULFT30tcXxYz WrUMbhxBIRSA7z1cGb7o5Py6kH3SyI3heoMwjV/LlM4tfkvzKZLNGbht4rhMVOMWHA0E jCBBXAdzNXonhMRB8DCR1II51efaBJm69uLXbQnumfUSvWeGP+ReojumuygTDPRQeLdW e49LKWzvse9rrvquF1JQTkc/CKMdpn3hLEAbF7eV7O6Ja7VG3abWIhA+v7IN4pTdA9Ac uzXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869384; x=1697474184; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D05Lo/nbBOabodso2ZTFF+A5WDtwFnSg45QKqcMzRio=; b=QxRTR5u21WQ82tEQgFXw3mRileWp99kYcdTyKZz+Jgc6ArAHvNF0m6/qkvlW0pHwQV k6NWwi9OqBfBakE1nllmqUcpjPWGOyqSqIKm6NjExDJrjz8UWyF1z7PuZbCurAhhlgho 9EtKIVFh9+q4QId/9gKPSHt20Nz33buBQDFNq9/yHxCrDueyTKLMNAHFCK7EfPzxBOTt rBInXwxSz385VIl+2t3vG1HMHSiFnuFdl7ogvc3ds3I9EfpkFO8TlcXzuGCFw2altOrd /Kb8qXO4WbPIbvbF991CLbQCESXR7bHoIwbeHpZVDfkJcqzJoA8pH8l/cpGvvmx/c/HI YT7Q== X-Gm-Message-State: AOJu0YwL51txmP4lvttH9cWcqUslnCZeasIlRg90jh4zQLSWoVxhDmal zKsU7lqzEQlyVtU8KIqMFZYmbA== X-Google-Smtp-Source: AGHT+IGMs2jcxJbCcNU6v5VJXQwrcwjGVaZP9fsvilLN+hG/oeUiQjzXxd23nT/n0khpS6mG8NoYUw== X-Received: by 2002:a05:6000:369:b0:313:f0d7:a43 with SMTP id f9-20020a056000036900b00313f0d70a43mr13201614wrf.23.1696869384028; Mon, 09 Oct 2023 09:36:24 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00325c7295450sm10141046wrt.3.2023.10.09.09.36.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:36:23 -0700 (PDT) From: Neil Armstrong Date: Mon, 09 Oct 2023 18:36:12 +0200 Subject: [PATCH RFC 1/5] drm/msm: dpu1: create a dpu_hw_clk_force_ctrl() helper MIME-Version: 1.0 Message-Id: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-1-806c0dee4e43@linaro.org> References: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> In-Reply-To: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3039; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=w8QME6lb06IRAEWeDjQtCgtkQ3dhfhOIl/dNSswSn2o=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlJCwCAQuQy1VWK0/WhgBRAJVbFRibDoMXSMpWzXim cBf/7YWJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZSQsAgAKCRB33NvayMhJ0WjhEA CbQwbXhMPPOmRTXsYonJvpnUUTqPvv9n7RGwyqEuwY2qU/dUky51NODywDGI7UOcME5BzAPa0EuMlx z5GNDLIgkhMd2P268F84m9CVL2GwYZBVs12p5zBHEoCGpLTS7a8VWkRrVXzAjUzIcw9XexYBsm9iJC 0x9Zrd1e/Lferxn2YjBE23PD4jR+MArSlUjL3daeHBMFS196dGe2UOJBT+BrSUchnX1ECcQXogsAHM aJ9eW5EtwGZOvlVUtXSyAscFVU44EGRsvINVDzLQPF/8eMObmMf0En6lu5B2/MEh+oRrKY/4J3zvum IMppi5Wf6YVIu9I4iMcHmQERWklO+L52WgSEzA/lR7+Dn47O00gncIX0rEGkvAObYyxl4DhfnXl8/q 43Sk69KAhN3FJ6HlHiU/fjuxgsxKs8kxURF2AyLEu2w0+FhPv1Q1ursEkLNr1rwvo58x23Z3r13XLJ 7tz7h+DWAJIZ+a22ORMnWrWGLEDIYJ+FW9sTumm5GYwhKSz8XaOU/m980NorLexz+L0lxsvGt4BCe7 hyL4GVo2VHsGZMgqLri+jok9x5MFRZkOk3OsLjes4N0oIAkXFtUCi9Q3c92B7jjO8tbjqOGHw8C5/B DIuYJYX7WmGCgWETDP5TBYussopEROqoJf1FMTYsqWXa1pu4MPTtwFxC8lCg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add an helper to setup the force clock control as it will be used in multiple HW files. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 23 +---------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 21 +++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 4 ++++ 3 files changed, 26 insertions(+), 22 deletions(-) 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 cff48763ce25..24e734768a72 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c @@ -66,34 +66,13 @@ static void dpu_hw_setup_split_pipe(struct dpu_hw_mdp *mdp, static bool dpu_hw_setup_clk_force_ctrl(struct dpu_hw_mdp *mdp, enum dpu_clk_ctrl_type clk_ctrl, bool enable) { - struct dpu_hw_blk_reg_map *c; - u32 reg_off, bit_off; - u32 reg_val, new_val; - bool clk_forced_on; - if (!mdp) return false; - c = &mdp->hw; - if (clk_ctrl <= DPU_CLK_CTRL_NONE || clk_ctrl >= DPU_CLK_CTRL_MAX) return false; - reg_off = mdp->caps->clk_ctrls[clk_ctrl].reg_off; - bit_off = mdp->caps->clk_ctrls[clk_ctrl].bit_off; - - reg_val = DPU_REG_READ(c, reg_off); - - if (enable) - new_val = reg_val | BIT(bit_off); - else - new_val = reg_val & ~BIT(bit_off); - - DPU_REG_WRITE(c, reg_off, new_val); - - clk_forced_on = !(reg_val & BIT(bit_off)); - - return clk_forced_on; + return dpu_hw_clk_force_ctrl(&mdp->hw, &mdp->caps->clk_ctrls[clk_ctrl], enable); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c index 9d2273fd2fed..18b16b2d2bf5 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c @@ -546,3 +546,24 @@ void dpu_setup_cdp(struct dpu_hw_blk_reg_map *c, u32 offset, DPU_REG_WRITE(c, offset, cdp_cntl); } + +bool dpu_hw_clk_force_ctrl(struct dpu_hw_blk_reg_map *c, + const struct dpu_clk_ctrl_reg *clk_ctrl_reg, + bool enable) +{ + u32 reg_val, new_val; + bool clk_forced_on; + + reg_val = DPU_REG_READ(c, clk_ctrl_reg->reg_off); + + if (enable) + new_val = reg_val | BIT(clk_ctrl_reg->bit_off); + else + new_val = reg_val & ~BIT(clk_ctrl_reg->bit_off); + + DPU_REG_WRITE(c, clk_ctrl_reg->reg_off, new_val); + + clk_forced_on = !(reg_val & BIT(clk_ctrl_reg->bit_off)); + + return clk_forced_on; +} diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h index 1f6079f47071..4bea139081bc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h @@ -367,4 +367,8 @@ int dpu_hw_collect_misr(struct dpu_hw_blk_reg_map *c, u32 misr_signature_offset, u32 *misr_value); +bool dpu_hw_clk_force_ctrl(struct dpu_hw_blk_reg_map *c, + const struct dpu_clk_ctrl_reg *clk_ctrl_reg, + bool enable); + #endif /* _DPU_HW_UTIL_H */ From patchwork Mon Oct 9 16:36:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13414018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80072CD6105 for ; Mon, 9 Oct 2023 16:36:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74C7310E281; Mon, 9 Oct 2023 16:36:28 +0000 (UTC) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9430010E171 for ; Mon, 9 Oct 2023 16:36:26 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3248ac76acbso4294034f8f.1 for ; Mon, 09 Oct 2023 09:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869385; x=1697474185; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5bqf+WARuWFIA4cLkesNXyhn8snKrlk6QVCk7crkS0E=; b=Nk94DQKKKXVCatiHMeBp9Dpe+iQ5aOzuTDTkWht0UXUvDGhXe1n3iDu8C4vJifFOkR 4ORStC00AbKd12A3tVAfsnypIIsIjvqBwRkQrNO/Qpbh6lLamRO7GgQF1EDYGxaiT1CB 9/AEpaB5rRZN5SKAHCiGqRuY2Da/qlZj8Viw2pl0tq5mlqNxaPJDrK5zg7iW+uNwh2eW u6SIrrQ+Z9X8iKZvRPyn0YyThkq+J48YBl4DWG5IfXlUGt0bd/B3XmLU+tsDUdU4laVP h+ccocPMfHX6SLGlB4UgjEhDo4wDRnuu/tiraUv3dAaI0XRrFhxHlE9DKjdGAKOQHb/q QBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869385; x=1697474185; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5bqf+WARuWFIA4cLkesNXyhn8snKrlk6QVCk7crkS0E=; b=I7LB6ru8cFNmY/jDy5VcTfj3Glnehec4tfZjPAb4uR4v/auhhSAoE/bcswlvkeB/bm iZ6vCq5gFOUOOE2K+ib/FbRZP/9P9mZABFrR579iFX40KoUt6gCSGvGgezM2eqnEW+vQ IXFi4/Ao1z0fldLLltMiDERSCp9jGRBf6g7frh8VBvqahYpsd9D65PB+YQUiNIKGpao0 pTPxp2g3CFSCIKbYLP/Ihj0w+j4DEIlOOIeaHR8GVmcMmHra4EjO/3Br/EJgZCxPcF8J pmHGqBxl9fqzWmUy8q2GIVp1H4zaOfDTKIc3I+HnW+La2oaqpJqIc4BbvTDugzGYCmLE gUrA== X-Gm-Message-State: AOJu0Yz3Q5E2Kj+wESqXD6Q+ScFZx1P6f7S9jVnoJh0GcJHpmhyFx/cb cDoHufGi/VcCqoIRgahT667uXg== X-Google-Smtp-Source: AGHT+IFg3B6zOAypc0V3bLi8aDL9QfkLaIcbajwx5o42aw09GyvdhGnGg00L9X2l4a9L/OwG0dTD1Q== X-Received: by 2002:adf:e406:0:b0:31a:e6c2:7705 with SMTP id g6-20020adfe406000000b0031ae6c27705mr13989202wrm.50.1696869384968; Mon, 09 Oct 2023 09:36:24 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00325c7295450sm10141046wrt.3.2023.10.09.09.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:36:24 -0700 (PDT) From: Neil Armstrong Date: Mon, 09 Oct 2023 18:36:13 +0200 Subject: [PATCH RFC 2/5] drm/msm: dpu1: add setup_clk_force_ctrl() op to sspp & wb MIME-Version: 1.0 Message-Id: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-2-806c0dee4e43@linaro.org> References: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> In-Reply-To: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=5800; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=UsctRRYNLStBxhKJjI99xX/Y38klI1PkyKSLSWf9Lsw=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlJCwDCKoeqKUe5V6gK+tjjQ2Avfv8PC7K30/OsjKN iJ5UI+CJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZSQsAwAKCRB33NvayMhJ0fWwEA CEYAfQ35d59sGS5jfqQ/zg5p+2VXakbSGsiwxWf8/TnZNLJhVE64gKqPfNxJvaF2h7NQlJefN8mm0C D5Fb1jsh+O9iCtRaUG8ZlXSxj0b0CGqaGYe+/SG4TJhTgT1iyF5i7xk4VyGoRJcaUn29szsVQD2aJr x5w3pssyzpRkVPkw/48Hd2DTQPst4KnSekukvv/jUzbrJTQqXF7UrORQ1NbrJeCV8m1EyNbdwj3Gtl AS54U+9QGFJO4TgIBE5YLTNyievU1vJAkl7DL64rhtLT7R7hAZpoLMHDoQlFilNutraNBZHzKTxHWL 3eDTP6iWnR/e5+LgJ4QZi6aK6w3OL3OcUY78cQg8xI6Kn6B/LwciI6e9Pwi9xtGY+KgOGimz5WTDZz tadDCmcVHhd7FoSzarFAtT4fjlNYpM8NMj5+OwTHdWEV93M1Br022BIbWwvwCIztaT1qggd533a/d8 R89O4EfnxhPCo346Fc0xQXrZ8cLlaehM68+ty7duCfNHBZtDryQO9oBoFLHNMH5RqvWbol8mOzQfDe issW6kn08uoDXwo4RK+/4A/RCK289EjOussDoYeM0z6ConmiVBNoCT+xd8tPnjWXrfJ2/SaIQAFOQ5 LN/zbIjdzYuZr+ZGiejPzY9VfR89u+qSX5st4jkANf0eRSWXhxNUrYkwttGg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Starting from SM8550, the SSPP & WB clock controls are moved the SSPP and WB register range, as it's called "VBIF_CLK_SPLIT" downstream. An optional clk_ctrl struct is added to the SSPP & WB caps, which can be used by the setup_clk_force_ctrl() op. Signed-off-by: Neil Armstrong --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 4 ++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 9 +++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 9 +++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 9 +++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h | 4 ++++ 5 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 6c9634209e9f..d9e8673e46f7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -505,6 +505,7 @@ struct dpu_ctl_cfg { * @sblk: SSPP sub-blocks information * @xin_id: bus client identifier * @clk_ctrl clock control identifier + * @clk_ctrl_reg local sspp clock control register * @type sspp type identifier */ struct dpu_sspp_cfg { @@ -512,6 +513,7 @@ struct dpu_sspp_cfg { const struct dpu_sspp_sub_blks *sblk; u32 xin_id; enum dpu_clk_ctrl_type clk_ctrl; + const struct dpu_clk_ctrl_reg *clk_ctrl_reg; u32 type; }; @@ -620,6 +622,7 @@ struct dpu_intf_cfg { * @format_list: list of formats supported by this writeback block * @num_formats: number of formats supported by this writeback block * @clk_ctrl: clock control identifier + * @clk_ctrl_reg local wb clock control register */ struct dpu_wb_cfg { DPU_HW_BLK_INFO; @@ -630,6 +633,7 @@ struct dpu_wb_cfg { const u32 *format_list; u32 num_formats; enum dpu_clk_ctrl_type clk_ctrl; + const struct dpu_clk_ctrl_reg *clk_ctrl_reg; }; /** 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 f2192de93713..cc4c7141791f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c @@ -581,6 +581,14 @@ static void dpu_hw_sspp_setup_cdp(struct dpu_sw_pipe *pipe, dpu_setup_cdp(&ctx->hw, cdp_cntl_offset, fmt, enable); } +static bool dpu_hw_sspp_setup_clk_force_ctrl(struct dpu_hw_sspp *ctx, bool enable) +{ + if (!ctx->cap->clk_ctrl_reg) + return false; + + return dpu_hw_clk_force_ctrl(&ctx->hw, ctx->cap->clk_ctrl_reg, enable); +} + static void _setup_layer_ops(struct dpu_hw_sspp *c, unsigned long features) { @@ -589,6 +597,7 @@ static void _setup_layer_ops(struct dpu_hw_sspp *c, c->ops.setup_sourceaddress = dpu_hw_sspp_setup_sourceaddress; c->ops.setup_solidfill = dpu_hw_sspp_setup_solidfill; c->ops.setup_pe = dpu_hw_sspp_setup_pe_config; + c->ops.setup_clk_force_ctrl = dpu_hw_sspp_setup_clk_force_ctrl; if (test_bit(DPU_SSPP_QOS, &features)) { c->ops.setup_qos_lut = dpu_hw_sspp_setup_qos_lut; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h index cbf4f95ff0fd..4a77734e83a7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -11,6 +11,7 @@ #include "dpu_formats.h" struct dpu_hw_sspp; +struct dpu_hw_mdp; /** * Flags @@ -271,6 +272,14 @@ struct dpu_hw_sspp_ops { void (*setup_qos_ctrl)(struct dpu_hw_sspp *ctx, bool danger_safe_en); + /** + * setup_clk_force_ctrl - setup clock force control + * @ctx: Pointer to pipe context + * @enable: enable clock force if true + */ + bool (*setup_clk_force_ctrl)(struct dpu_hw_sspp *ctx, + bool enable); + /** * setup_histogram - setup histograms * @ctx: Pointer to pipe context diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c index ebc416400382..045a4545a8c5 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c @@ -175,11 +175,20 @@ static void dpu_hw_wb_bind_pingpong_blk( DPU_REG_WRITE(c, WB_MUX, mux_cfg); } +static bool dpu_hw_wb_setup_clk_force_ctrl(struct dpu_hw_wb *ctx, bool enable) +{ + if (!ctx->caps->clk_ctrl_reg) + return false; + + return dpu_hw_clk_force_ctrl(&ctx->hw, ctx->caps->clk_ctrl_reg, enable); +} + static void _setup_wb_ops(struct dpu_hw_wb_ops *ops, unsigned long features) { ops->setup_outaddress = dpu_hw_wb_setup_outaddress; ops->setup_outformat = dpu_hw_wb_setup_format; + ops->setup_clk_force_ctrl = dpu_hw_wb_setup_clk_force_ctrl; if (test_bit(DPU_WB_XY_ROI_OFFSET, &features)) ops->setup_roi = dpu_hw_wb_roi; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h index 2d7db2efa3d0..3734ca435e01 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h @@ -29,6 +29,7 @@ struct dpu_hw_wb_cfg { * @setup_outformat: setup output format of writeback block from writeback job * @setup_qos_lut: setup qos LUT for writeback block based on input * @setup_cdp: setup chroma down prefetch block for writeback block + * @setup_clk_force_ctrl: setup clock force control * @bind_pingpong_blk: enable/disable the connection with ping-pong block */ struct dpu_hw_wb_ops { @@ -48,6 +49,9 @@ struct dpu_hw_wb_ops { const struct dpu_format *fmt, bool enable); + bool (*setup_clk_force_ctrl)(struct dpu_hw_wb *ctx, + bool enable); + void (*bind_pingpong_blk)(struct dpu_hw_wb *ctx, const enum dpu_pingpong pp); }; From patchwork Mon Oct 9 16:36:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13414019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95574CD6105 for ; Mon, 9 Oct 2023 16:36:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E477E10E171; Mon, 9 Oct 2023 16:36:29 +0000 (UTC) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAD5410E171 for ; Mon, 9 Oct 2023 16:36:27 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so4301269f8f.3 for ; Mon, 09 Oct 2023 09:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869386; x=1697474186; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5PCLKpDplxEi6g+GHgYMxjppZKKeUtHeWR9UsKPnFr0=; b=CDxSrH6tPkCKi0x1S3l6Q0T4XcNDqNkOPIVb2kszW82zxEDGyajQCLXxnGUnuY8B9E 1kkdKFT1T6gH9QSbVuUkKd1TkknNGYaIqQCg80ivaI0bS4xiyIOB3NtnIdUcWAWeka6m z1dixWHC0M6/bLB8jzLrlk6S/Ux8eBod0efrqjqTqb7weVoL0IOCk6vxlEiCaIlDM90e gyzHVipK3VlMW8Idh02OwFIb2U055kdKfGvFXQDdgfJ/AEC4k5I0qAhXAOACfDXt5o4e 6IkjBhrTlfMWdKU9R7wnKer4r5SNNns7MMy/sCnTVa/NY6/vRV8bLCzJl+KP/BdYfO/4 tLtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869386; x=1697474186; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5PCLKpDplxEi6g+GHgYMxjppZKKeUtHeWR9UsKPnFr0=; b=is7UsAfSnUi5S26tiM3c3LKZHpjnvjmPkj9/rZLOZzEcYo2lKmw8cnLXJ+avY1w++3 9tcvmzcqtc5w/VrlBOYE8LIK/nuE4mX2kEluTUyGW13iKoALYUxBiSbJX4ntGh6MfL8x qsTwc4W2FWVd7+HjuRGUgWqaXNAneF+d7wIndXY/asPdZfNnikZB7q9mOfXM+rGoYCrP vdEhDC9/I768OElGt5r/ERLfhdhtmTf5BBxsAmrfUUGyUNUqDtWNm6CFOhQyUhfSsqFj 0o7fiBtOOgRJt7bMzxmSfddUtMq/vZXlxuWiXfKW0d4Y2g9uJYHaUu2l90T2dh6xYyu2 F/wA== X-Gm-Message-State: AOJu0Yy1x38/bh0TlhT7LTLllSrFbe6kenwFUQx92KJgMZ5hGtBbYQS8 QD3dYFRfk7PJM0RZJKuECvcikw== X-Google-Smtp-Source: AGHT+IEzbTMAE5w16hwu+51q9w39EXdZmjD15W3quhSWcZGUvRZuHo6gtNEIO7U9AW7rzLim8rJ0jw== X-Received: by 2002:adf:e606:0:b0:317:6314:96e2 with SMTP id p6-20020adfe606000000b00317631496e2mr13142379wrm.14.1696869385860; Mon, 09 Oct 2023 09:36:25 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00325c7295450sm10141046wrt.3.2023.10.09.09.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:36:25 -0700 (PDT) From: Neil Armstrong Date: Mon, 09 Oct 2023 18:36:14 +0200 Subject: [PATCH RFC 3/5] drm/msm: dpu1: vbif: add dpu_vbif_setup_clk_force_ctrl() helper MIME-Version: 1.0 Message-Id: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-3-806c0dee4e43@linaro.org> References: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> In-Reply-To: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2343; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=GDPgpk2/mayRlWQFJdU3lhxk3/qUCU3a1fQFXnOYaXM=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlJCwD7DTIAti95TB7gGnRUdufNBcLE7Oe7bz9Ds5N 2qIjpH+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZSQsAwAKCRB33NvayMhJ0XWrD/ 9GJDeVqlUCf+IWQm556T1txr5P26ZJ3XsF2gHrhlARuBcI0Pmv6kO6kOhZsET5Vz7GqkdZetlINGqi 7bTaYkj3GnFXOuFcegAhSqX2D8jmuFaUyXCcuKzzfo2WM+O/Hv1ZCW2BmbgixO5i+3SvQbAJzpRL2x 4LKcy5nvNemvrjBFN9Fo4RQ+27iSvyTulBeFPKw/yWB2H9mnLr3UZ16wQ9pYjXSOAOwzFFxFISlF7j G4QGFDhPiM4W08CoVCnpQjw0ImDbJGFRUkMl1q7xrd/ajfezQEW6NVxgYLMC9n1XC5BrnYht2lLcU/ QBg2Yp7Awza9WtVN4b/NDZ48ywrgFH5NUdUoQdDUKYsabAA+zDceaeqvITse/GDzXec5bJPkdvaiZ7 POYNw6V6rwWaUbkLi4MLO4oUhit+ZeBC0JCMVep5/cMQZ2AKKS8oogRsAgYaPDf2gHoQLk5m0Uh8MB a9u6rIPC+SI3X2t2IjDeJgTP2pD0zLN/5rDt5SK0FVWcNdHjetgyJVgHUGOsdflccx1AjqjtLM3L4H 3WMCDRoHJ4UcMEs4JvWRYQnatK8R5NXuhE82C+bdFHFuhQ8QOkHIyOP531D7xbjlEficlyRAo76SIV 2i0Mv2rc1e2WpjpHfpcYdGWmhkggqjxQZxtsnH76xD+MGgM9rluyM1rvla7Q== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move the actual call to the MDP setup_clk_force_ctrl() op to an helper which will call the correct op depending on the caps. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c index 1305e250b71e..2ae5cba1848b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c @@ -158,6 +158,13 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, return ot_lim; } +static bool dpu_vbif_setup_clk_force_ctrl(struct dpu_hw_mdp *mdp, + unsigned int clk_ctrl, + bool enable) +{ + return mdp->ops.setup_clk_force_ctrl(mdp, clk_ctrl, enable); +} + /** * dpu_vbif_set_ot_limit - set OT based on usecase & configuration parameters * @dpu_kms: DPU handler @@ -200,7 +207,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, trace_dpu_perf_set_ot(params->num, params->xin_id, ot_lim, params->vbif_idx); - forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true); + forced_on = dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, true); vbif->ops.set_limit_conf(vbif, params->xin_id, params->rd, ot_lim); @@ -213,7 +220,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, vbif->ops.set_halt_ctrl(vbif, params->xin_id, false); if (forced_on) - mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, false); + dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, false); } void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, @@ -251,7 +258,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, return; } - forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true); + forced_on = dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, true); for (i = 0; i < qos_tbl->npriority_lvl; i++) { DRM_DEBUG_ATOMIC("%s xin:%d lvl:%d/%d\n", @@ -262,7 +269,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, } if (forced_on) - mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, false); + dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, false); } void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms) From patchwork Mon Oct 9 16:36:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13414021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3838DCD610C for ; Mon, 9 Oct 2023 16:36:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 266FC10E28E; Mon, 9 Oct 2023 16:36:32 +0000 (UTC) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F78810E131 for ; Mon, 9 Oct 2023 16:36:28 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3214cdb4b27so4551459f8f.1 for ; Mon, 09 Oct 2023 09:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869387; x=1697474187; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PDFSX/M8Boh0xlXpTXGoxhFrMXCpVlR2sovQgbmNFsw=; b=yKJcS6F1Y9OIsrFIvGTLuAi5CIz5AiGGrKWQsupR4lx7wwbLA3t1tLabcpalXh7lzc 1uXMUcAhlWrQhS0iyFSGqDnx9ufEnfo+go4GtEB8o5y9uHKfM+y5CQGVKPjHASgE70EP DJBql4SkAhNcmhwZZnuDkWlpOitVGBuCqICgSdwD4svwaEpBOKBmItuibQ+Jk6CHWLF9 WLhDKeOsWlD9ltHa+7kF4lizYsRGWPrP20GwzdBfylNUM0G1BMNYPMpKWREZtIAqF8Ae iUYVhrAXPzuJUkL04qqiomb2JYR1hKGGVfi6WQBT4flhaVI/z94wjJtzwozMdRebyxf4 pbfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869387; x=1697474187; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PDFSX/M8Boh0xlXpTXGoxhFrMXCpVlR2sovQgbmNFsw=; b=g1Tp9VQhwGPv3XtuElXrGc2vuGSqnQNx4RtrRV6zKFtMwKnV/IUkVJxjAxS3pIITrZ NNchEoU3JCNbVaC9EMERZSguUiOg62++3UeAUos/6hUzTyPN9hy5K3GSc8J3PRVearbX vxinliEdtCghl8g74U8ULKnAL2gNHir13ej425FMGWLrT45lyoyPdoQ1OAvCGDI92iVG S8GRgvVIPv+j0SgbvUypJyHSN7ziZeg+chnG2v7v0ZcwIrSkS9XPubWhMsl/82f3Z6Op Bwooh1B5OtP7i/rrsaAjB6yo/cc9D7T4d8il2U1RcqnYYzPrZOjAdzVxXk53os6xW+T+ u1ng== X-Gm-Message-State: AOJu0YwBdNK8OkfD062r23WqpC8h6afZPHcw7BNjo5iO9G6J1QNt+oU0 Bj3mPPw0tqeBguM8o14GYrtg2Q== X-Google-Smtp-Source: AGHT+IEzTRnz/DHzEeL1C1oQPx7Gy81qHmpnlZfaodjtcxwTCyknEzPWArZdhX5w9bC30rLWFNoUCw== X-Received: by 2002:adf:f403:0:b0:321:5b64:f744 with SMTP id g3-20020adff403000000b003215b64f744mr13689494wro.20.1696869386831; Mon, 09 Oct 2023 09:36:26 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00325c7295450sm10141046wrt.3.2023.10.09.09.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:36:26 -0700 (PDT) From: Neil Armstrong Date: Mon, 09 Oct 2023 18:36:15 +0200 Subject: [PATCH RFC 4/5] drm/msm: dpu1: call wb & sspp clk_force_ctrl op if split clock control MIME-Version: 1.0 Message-Id: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-4-806c0dee4e43@linaro.org> References: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> In-Reply-To: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=8214; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=ZOnxqR1GU8SlqAaSIdXy8L1jHjxMz2BNLdQojqmBTmc=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlJCwE/I8RucJK4GNiCxoMvbs3OIDUmrKff3XmYyQw /d0n68uJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZSQsBAAKCRB33NvayMhJ0QqeEA DGNW2Vqm1d4axwi8TKSMSrFVY1q+8RlaeibNaEc/5lvxr87VDDYZdarOYCckJIFHvctfik8+DhXV7o xzNIOC35AxopM6/IzvX6ymxrvLpqInyWWZnd5dXl321n1ioxj50quIIMk+ZWeqHICHEAmd9V1tVYE+ RYoKyoiWHLhsi1DTAPc6gCjRYdAGUXq9b5gpjPuYvaDVgE6M/6Rlh1wfzL8ruPo9TmUyz7NP+Tn8gF 661KgYhMo6afCSV7eXwLw89aP4KZ6jI/+h4b3uYZQyz93iR6C96P2VfFf2ODS5Bn9PJpMu/LICWGtd KBYl89v2v3aYaTCThwpEBV+5OBVL/Qsz7oM0Jjkjt9fAwyj5GeOpsaDkuQdAS4F0e33dpxje94Ps8S KXOXntB8XYdR8pZQwif6zrY7+1dj881uvbwMzvFhPHj6npj72TqWj3sGChnoHuReloTdiFGx1+ss6Q qGW3IV+n6zsbRt/s7TyoTU82mH/GWed2MOIS+1m+TCzO4V8wWPwOZ7NsEb8MnGlJOoK49HfxhHz1p9 NLs6MmAdy4pGhCBQu0s6aj/5uJFWoSxLleCdnv41L6nP+dXJ287wT10D0AGDIYj0dHr1m2l4umvKt7 k8WAdmooxu46lnDuQvPvtAB31LFqo24nx+d5/gWw/dOcQsIftRf1Y4E77voA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now clk_ctrl IDs can be optional and the clk_ctrl_reg can be specified on the SSPP & WB caps directly, pass the SSPP & WB hw struct to the qos & limit params then call the clk_force_ctrl() op accordingly. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 4 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 9 +++--- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 37 +++++++++++++++------- drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h | 12 ++++--- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c index 78037a697633..e4dfe0be7207 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c @@ -45,6 +45,7 @@ static void dpu_encoder_phys_wb_set_ot_limit( struct dpu_vbif_set_ot_params ot_params; memset(&ot_params, 0, sizeof(ot_params)); + ot_params.wb = hw_wb; ot_params.xin_id = hw_wb->caps->xin_id; ot_params.num = hw_wb->idx - WB_0; ot_params.width = phys_enc->cached_mode.hdisplay; @@ -52,7 +53,6 @@ static void dpu_encoder_phys_wb_set_ot_limit( ot_params.is_wfd = true; ot_params.frame_rate = drm_mode_vrefresh(&phys_enc->cached_mode); ot_params.vbif_idx = hw_wb->caps->vbif_idx; - ot_params.clk_ctrl = hw_wb->caps->clk_ctrl; ot_params.rd = false; dpu_vbif_set_ot_limit(phys_enc->dpu_kms, &ot_params); @@ -81,9 +81,9 @@ static void dpu_encoder_phys_wb_set_qos_remap( hw_wb = phys_enc->hw_wb; memset(&qos_params, 0, sizeof(qos_params)); + qos_params.wb = hw_wb; qos_params.vbif_idx = hw_wb->caps->vbif_idx; qos_params.xin_id = hw_wb->caps->xin_id; - qos_params.clk_ctrl = hw_wb->caps->clk_ctrl; qos_params.num = hw_wb->idx - WB_0; qos_params.is_rt = false; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index c2aaaded07ed..b0b662068377 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -350,6 +350,7 @@ static void _dpu_plane_set_ot_limit(struct drm_plane *plane, struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); memset(&ot_params, 0, sizeof(ot_params)); + ot_params.sspp = pipe->sspp; ot_params.xin_id = pipe->sspp->cap->xin_id; ot_params.num = pipe->sspp->idx - SSPP_NONE; ot_params.width = drm_rect_width(&pipe_cfg->src_rect); @@ -357,7 +358,6 @@ static void _dpu_plane_set_ot_limit(struct drm_plane *plane, ot_params.is_wfd = !pdpu->is_rt_pipe; ot_params.frame_rate = frame_rate; ot_params.vbif_idx = VBIF_RT; - ot_params.clk_ctrl = pipe->sspp->cap->clk_ctrl; ot_params.rd = true; dpu_vbif_set_ot_limit(dpu_kms, &ot_params); @@ -377,16 +377,15 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane, memset(&qos_params, 0, sizeof(qos_params)); qos_params.vbif_idx = VBIF_RT; - qos_params.clk_ctrl = pipe->sspp->cap->clk_ctrl; + qos_params.sspp = pipe->sspp; qos_params.xin_id = pipe->sspp->cap->xin_id; qos_params.num = pipe->sspp->idx - SSPP_VIG0; qos_params.is_rt = pdpu->is_rt_pipe; - DPU_DEBUG_PLANE(pdpu, "pipe:%d vbif:%d xin:%d rt:%d, clk_ctrl:%d\n", + DPU_DEBUG_PLANE(pdpu, "pipe:%d vbif:%d xin:%d rt:%d\n", qos_params.num, qos_params.vbif_idx, - qos_params.xin_id, qos_params.is_rt, - qos_params.clk_ctrl); + qos_params.xin_id, qos_params.is_rt); dpu_vbif_set_qos_remap(dpu_kms, &qos_params); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c index 2ae5cba1848b..a79559084a91 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c @@ -158,11 +158,19 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif, return ot_lim; } -static bool dpu_vbif_setup_clk_force_ctrl(struct dpu_hw_mdp *mdp, - unsigned int clk_ctrl, +static bool dpu_vbif_setup_clk_force_ctrl(struct dpu_hw_sspp *sspp, + struct dpu_hw_wb *wb, + struct dpu_hw_mdp *mdp, bool enable) { - return mdp->ops.setup_clk_force_ctrl(mdp, clk_ctrl, enable); + if (sspp && sspp->cap->clk_ctrl_reg) + return sspp->ops.setup_clk_force_ctrl(sspp, enable); + else if (wb && wb->caps->clk_ctrl_reg) + return wb->ops.setup_clk_force_ctrl(wb, enable); + else + return mdp->ops.setup_clk_force_ctrl(mdp, + sspp ? sspp->cap->clk_ctrl : wb->caps->clk_ctrl, + enable); } /** @@ -190,9 +198,13 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, return; } - if (!mdp->ops.setup_clk_force_ctrl || - !vbif->ops.set_limit_conf || - !vbif->ops.set_halt_ctrl) + if ((!params->sspp && !params->wb) || + (params->sspp && !params->sspp->ops.setup_clk_force_ctrl) || + (params->wb && !params->wb->ops.setup_clk_force_ctrl) || + !mdp->ops.setup_clk_force_ctrl) + return; + + if (!vbif->ops.set_limit_conf || !vbif->ops.set_halt_ctrl) return; /* set write_gather_en for all write clients */ @@ -207,7 +219,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, trace_dpu_perf_set_ot(params->num, params->xin_id, ot_lim, params->vbif_idx); - forced_on = dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, true); + forced_on = dpu_vbif_setup_clk_force_ctrl(params->sspp, params->wb, mdp, true); vbif->ops.set_limit_conf(vbif, params->xin_id, params->rd, ot_lim); @@ -220,7 +232,7 @@ void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms, vbif->ops.set_halt_ctrl(vbif, params->xin_id, false); if (forced_on) - dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, false); + dpu_vbif_setup_clk_force_ctrl(params->sspp, params->wb, mdp, false); } void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, @@ -245,7 +257,10 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, return; } - if (!vbif->ops.set_qos_remap || !mdp->ops.setup_clk_force_ctrl) { + if ((!params->sspp && !params->wb) || + (params->sspp && !params->sspp->ops.setup_clk_force_ctrl) || + (params->wb && !params->wb->ops.setup_clk_force_ctrl) || + !mdp->ops.setup_clk_force_ctrl || !vbif->ops.set_qos_remap) { DRM_DEBUG_ATOMIC("qos remap not supported\n"); return; } @@ -258,7 +273,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, return; } - forced_on = dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, true); + forced_on = dpu_vbif_setup_clk_force_ctrl(params->sspp, params->wb, mdp, true); for (i = 0; i < qos_tbl->npriority_lvl; i++) { DRM_DEBUG_ATOMIC("%s xin:%d lvl:%d/%d\n", @@ -269,7 +284,7 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, } if (forced_on) - dpu_vbif_setup_clk_force_ctrl(mdp, params->clk_ctrl, false); + dpu_vbif_setup_clk_force_ctrl(params->sspp, params->wb, mdp, false); } void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h index ab490177d886..a4fe76e390d9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.h @@ -7,7 +7,12 @@ #include "dpu_kms.h" +struct dpu_hw_sspp; +struct dpu_hw_wb; + struct dpu_vbif_set_ot_params { + struct dpu_hw_sspp *sspp; + struct dpu_hw_wb *wb; u32 xin_id; u32 num; u32 width; @@ -16,28 +21,27 @@ struct dpu_vbif_set_ot_params { bool rd; bool is_wfd; u32 vbif_idx; - u32 clk_ctrl; }; struct dpu_vbif_set_memtype_params { u32 xin_id; u32 vbif_idx; - u32 clk_ctrl; bool is_cacheable; }; /** * struct dpu_vbif_set_qos_params - QoS remapper parameter + * @sspp: backing SSPP * @vbif_idx: vbif identifier * @xin_id: client interface identifier - * @clk_ctrl: clock control identifier of the xin * @num: pipe identifier (debug only) * @is_rt: true if pipe is used in real-time use case */ struct dpu_vbif_set_qos_params { + struct dpu_hw_sspp *sspp; + struct dpu_hw_wb *wb; u32 vbif_idx; u32 xin_id; - u32 clk_ctrl; u32 num; bool is_rt; }; From patchwork Mon Oct 9 16:36:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13414022 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E48DECD6109 for ; Mon, 9 Oct 2023 16:36:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B73910E288; Mon, 9 Oct 2023 16:36:36 +0000 (UTC) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5787F10E171 for ; Mon, 9 Oct 2023 16:36:29 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3231d6504e1so4395734f8f.2 for ; Mon, 09 Oct 2023 09:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869388; x=1697474188; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Eo67TNhMGxEpsJXZTV7WocEXuldcPW1ccOBH3SYFfCo=; b=VBdiSnjPMxCVC0qA+Y6jPQkeop2zYU6/UCBgMyGpGXhaTsgj5J2ZmdfVltSgRo+v3o iD4DtxdPg/7AD/rjB2MzSupCGIi5auD5gfl1NBAQyHaSk+0K4ibDpH872reeLnKXyfjN lTE1aXRwDPnFaSHejkCCxGHVVK4pI4rafBJr2Ci0tBfdJUAXmO3/VwsVMGHY2D8Qfadf Hp+jn3r3N6glEABx+laG9Jt5JTmV7c+JIudyV3OEHP0kzB5CMKjs1pqa4GLFONQiYjmE BJSBrQaBKgqV0vO9/LQg9Y8cRMvl8rIrch6DdFmmt8noF5uomPrHP4Q2LcxcQoTrlu5A bHKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869388; x=1697474188; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eo67TNhMGxEpsJXZTV7WocEXuldcPW1ccOBH3SYFfCo=; b=YKvZPRAk28vVXJqWw5xuozV4hVur9u1vKDCRUzOIAyoXunqAZl4fwNSU8ht9L0KOol A3R6wMpwT1bK7iOjHU0jcQhvkUDrqGVLQRWnRqDDg5mga9TyqncqgB63eysOdFV1X9LS HpKe2D0+1MNTQgqzGgxFePQ5bIYBm0KMBpSDS54IIy3i/LXET0sBkYnX8ToPw2ecOSQb kJKZ+L4HGI9dNzQq+uYkm7yh28gEhjrvRbkHDh9KYHzzr70fpkz13/hVQaJ0z+YRSh18 gdHU5Ze0Sm8AN8nog/DkiVvzEFWC7jSdPW0KNccTqO932jkisVmxXJrul3OQT5edrKN8 X7/w== X-Gm-Message-State: AOJu0YwkmUnf2Nu1KzfIlJ6G6ufsiA+RwWUmIPUvagoRFEKRnLhBe+zj C0bjMHKmR7mt9+fatejr+Dgr2g== X-Google-Smtp-Source: AGHT+IGhwRNyCGj+Ar9gNga2RqmPIZTGhHzBhueR8p+ti6QVCDaRkjxYk74mb2hTjyViObL6rJCYgw== X-Received: by 2002:a5d:6a08:0:b0:320:896:5ea8 with SMTP id m8-20020a5d6a08000000b0032008965ea8mr13646712wru.19.1696869387725; Mon, 09 Oct 2023 09:36:27 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id f11-20020a5d50cb000000b00325c7295450sm10141046wrt.3.2023.10.09.09.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:36:27 -0700 (PDT) From: Neil Armstrong Date: Mon, 09 Oct 2023 18:36:16 +0200 Subject: [PATCH RFC 5/5] drm/msm: dpu1: sm8550: move split clock controls to sspp entries MIME-Version: 1.0 Message-Id: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-5-806c0dee4e43@linaro.org> References: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> In-Reply-To: <20231009-topic-sm8550-graphics-sspp-split-clk-v1-0-806c0dee4e43@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4767; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=rXNZZh0U0CRAs1SezapHV4WxBUWrXsKmahG1hZ3zZNk=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlJCwFnTWJsAER2yIeZLeIaUwvwtPF1lWZA63oFT6P DsY8haGJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZSQsBQAKCRB33NvayMhJ0booEA C52PH6JsPH69GimG9O/TqLJm6uLT1CP6O3DeHBomQYq0jcGdx8SsMpd9yab6ud4JwRN2oZGrgx2TS+ RBP0cyFrJMkcgA4gV8Afp0f2Slm93eHOuY42noW3SMZbQPR9kHJK69Ge6rHTta68xSkht/nBK+VHUj w8MWu/F0nrfeqg84un8/49Dgfvhabsd8y1z9NiLkDP3LiLb5FVT/cvFeNJp9Jaxml4voxVYiOPhC2o w2cKb5WD0hWsZxfhydbAEstT13Yhol8gS4xiFw0kZxok3WbCLyVNYZwawhOr5VIMRFlORGB3RcxTcT REZYAmnpEHbhxYahqRkINTxO6VW3OXiCwjZ58j5hnLoUJIY2ANWNm6pqIWMOTU2xUPOaLak4P62TYI M0T8Aks+0wDo6oSJaMlRMpoCTMOhuy81LEt/6WKJkHLVi3+l7MNAhL2bjOoB3yI1ZGbG4XW+oei90O EwsqSKtkfl3xudznsZAi2zZ+0/hS7vS942SPpAuQPRib9V8O1krzhBsVUsgAwETcTGT9qas+6FxRPT 1qg6kHR4+dKtsHnCO/k5sSswGqcqAGVINqQ5jooKdODzKTee6rs0fGMOsMdM4UkXDLZkgw2FaOCx8G aMxyCKlvisLiLQGFC50u5k/dYk9Zus3NUQb6G80WKB58J5PhX/LGm/Pzm9kA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE 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: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The SM8550 has the SSPP clk_ctrl in the SSPP registers, move them out of the MDP top. Signed-off-by: Neil Armstrong --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h index 7bed819dfc39..527ec020fba4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h @@ -24,16 +24,6 @@ static const struct dpu_mdp_cfg sm8550_mdp = { .base = 0, .len = 0x494, .features = BIT(DPU_MDP_PERIPH_0_REMOVED), .clk_ctrls = { - [DPU_CLK_CTRL_VIG0] = { .reg_off = 0x4330, .bit_off = 0 }, - [DPU_CLK_CTRL_VIG1] = { .reg_off = 0x6330, .bit_off = 0 }, - [DPU_CLK_CTRL_VIG2] = { .reg_off = 0x8330, .bit_off = 0 }, - [DPU_CLK_CTRL_VIG3] = { .reg_off = 0xa330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA0] = { .reg_off = 0x24330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA1] = { .reg_off = 0x26330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA2] = { .reg_off = 0x28330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2a330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA4] = { .reg_off = 0x2c330, .bit_off = 0 }, - [DPU_CLK_CTRL_DMA5] = { .reg_off = 0x2e330, .bit_off = 0 }, [DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 }, }, }; @@ -73,6 +63,11 @@ static const struct dpu_ctl_cfg sm8550_ctl[] = { }, }; +static const struct dpu_clk_ctrl_reg sm8550_sspp_clk_ctrl = { + .reg_off = 0x330, + .bit_off = 0 +}; + static const struct dpu_sspp_cfg sm8550_sspp[] = { { .name = "sspp_0", .id = SSPP_VIG0, @@ -81,7 +76,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_vig_sblk_0, .xin_id = 0, .type = SSPP_TYPE_VIG, - .clk_ctrl = DPU_CLK_CTRL_VIG0, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_1", .id = SSPP_VIG1, .base = 0x6000, .len = 0x344, @@ -89,7 +84,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_vig_sblk_1, .xin_id = 4, .type = SSPP_TYPE_VIG, - .clk_ctrl = DPU_CLK_CTRL_VIG1, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_2", .id = SSPP_VIG2, .base = 0x8000, .len = 0x344, @@ -97,7 +92,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_vig_sblk_2, .xin_id = 8, .type = SSPP_TYPE_VIG, - .clk_ctrl = DPU_CLK_CTRL_VIG2, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_3", .id = SSPP_VIG3, .base = 0xa000, .len = 0x344, @@ -105,7 +100,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_vig_sblk_3, .xin_id = 12, .type = SSPP_TYPE_VIG, - .clk_ctrl = DPU_CLK_CTRL_VIG3, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_8", .id = SSPP_DMA0, .base = 0x24000, .len = 0x344, @@ -113,7 +108,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sdm845_dma_sblk_0, .xin_id = 1, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA0, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_9", .id = SSPP_DMA1, .base = 0x26000, .len = 0x344, @@ -121,7 +116,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sdm845_dma_sblk_1, .xin_id = 5, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA1, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_10", .id = SSPP_DMA2, .base = 0x28000, .len = 0x344, @@ -129,7 +124,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sdm845_dma_sblk_2, .xin_id = 9, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA2, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_11", .id = SSPP_DMA3, .base = 0x2a000, .len = 0x344, @@ -137,7 +132,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sdm845_dma_sblk_3, .xin_id = 13, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA3, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_12", .id = SSPP_DMA4, .base = 0x2c000, .len = 0x344, @@ -145,7 +140,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_dma_sblk_4, .xin_id = 14, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA4, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, { .name = "sspp_13", .id = SSPP_DMA5, .base = 0x2e000, .len = 0x344, @@ -153,7 +148,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = { .sblk = &sm8550_dma_sblk_5, .xin_id = 15, .type = SSPP_TYPE_DMA, - .clk_ctrl = DPU_CLK_CTRL_DMA5, + .clk_ctrl_reg = &sm8550_sspp_clk_ctrl, }, };