All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paloma Arellano <quic_parellan@quicinc.com>
To: <freedreno@lists.freedesktop.org>
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>,
	<seanpaul@chromium.org>, <swboyd@chromium.org>,
	<dmitry.baryshkov@linaro.org>, <quic_abhinavk@quicinc.com>,
	<quic_jesszhan@quicinc.com>, <marijn.suijten@somainline.org>,
	<neil.armstrong@linaro.org>,
	Paloma Arellano <quic_parellan@quicinc.com>
Subject: [PATCH v5 14/19] drm/msm/dpu: add support of new peripheral flush mechanism
Date: Thu, 22 Feb 2024 11:39:59 -0800	[thread overview]
Message-ID: <20240222194025.25329-15-quic_parellan@quicinc.com> (raw)
In-Reply-To: <20240222194025.25329-1-quic_parellan@quicinc.com>

From: Kuogee Hsieh <quic_khsieh@quicinc.com>

Introduce a peripheral flushing mechanism to decouple peripheral
metadata flushing from timing engine related flush.

Changes in v2:
	- Fixed some misalignment issues

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Signed-off-by: Paloma Arellano <quic_parellan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 17 +++++++++++++++++
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 10 ++++++++++
 2 files changed, 27 insertions(+)

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 e76565c3e6a43..a06f69d0b257d 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -39,6 +39,7 @@
 #define   CTL_WB_FLUSH                  0x108
 #define   CTL_INTF_FLUSH                0x110
 #define   CTL_CDM_FLUSH                0x114
+#define   CTL_PERIPH_FLUSH              0x128
 #define   CTL_INTF_MASTER               0x134
 #define   CTL_DSPP_n_FLUSH(n)           ((0x13C) + ((n) * 4))
 
@@ -49,6 +50,7 @@
 #define  MERGE_3D_IDX   23
 #define  DSC_IDX        22
 #define CDM_IDX         26
+#define  PERIPH_IDX     30
 #define  INTF_IDX       31
 #define WB_IDX          16
 #define  DSPP_IDX       29  /* From DPU hw rev 7.x.x */
@@ -151,6 +153,10 @@ static inline void dpu_hw_ctl_trigger_flush_v1(struct dpu_hw_ctl *ctx)
 				ctx->pending_dspp_flush_mask[dspp - DSPP_0]);
 		}
 
+	if (ctx->pending_flush_mask & BIT(PERIPH_IDX))
+		DPU_REG_WRITE(&ctx->hw, CTL_PERIPH_FLUSH,
+			      ctx->pending_periph_flush_mask);
+
 	if (ctx->pending_flush_mask & BIT(DSC_IDX))
 		DPU_REG_WRITE(&ctx->hw, CTL_DSC_FLUSH,
 			      ctx->pending_dsc_flush_mask);
@@ -311,6 +317,13 @@ static void dpu_hw_ctl_update_pending_flush_intf_v1(struct dpu_hw_ctl *ctx,
 	ctx->pending_flush_mask |= BIT(INTF_IDX);
 }
 
+static void dpu_hw_ctl_update_pending_flush_periph_v1(struct dpu_hw_ctl *ctx,
+						      enum dpu_intf intf)
+{
+	ctx->pending_periph_flush_mask |= BIT(intf - INTF_0);
+	ctx->pending_flush_mask |= BIT(PERIPH_IDX);
+}
+
 static void dpu_hw_ctl_update_pending_flush_merge_3d_v1(struct dpu_hw_ctl *ctx,
 		enum dpu_merge_3d merge_3d)
 {
@@ -680,6 +693,10 @@ static void _setup_ctl_ops(struct dpu_hw_ctl_ops *ops,
 		ops->reset_intf_cfg = dpu_hw_ctl_reset_intf_cfg_v1;
 		ops->update_pending_flush_intf =
 			dpu_hw_ctl_update_pending_flush_intf_v1;
+
+		ops->update_pending_flush_periph =
+			dpu_hw_ctl_update_pending_flush_periph_v1;
+
 		ops->update_pending_flush_merge_3d =
 			dpu_hw_ctl_update_pending_flush_merge_3d_v1;
 		ops->update_pending_flush_wb = dpu_hw_ctl_update_pending_flush_wb_v1;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
index ff85b5ee0acf8..ef56280bea932 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
@@ -122,6 +122,15 @@ struct dpu_hw_ctl_ops {
 	void (*update_pending_flush_intf)(struct dpu_hw_ctl *ctx,
 		enum dpu_intf blk);
 
+	/**
+	 * OR in the given flushbits to the cached pending_(periph_)flush_mask
+	 * No effect on hardware
+	 * @ctx       : ctl path ctx pointer
+	 * @blk       : interface block index
+	 */
+	void (*update_pending_flush_periph)(struct dpu_hw_ctl *ctx,
+					    enum dpu_intf blk);
+
 	/**
 	 * OR in the given flushbits to the cached pending_(merge_3d_)flush_mask
 	 * No effect on hardware
@@ -264,6 +273,7 @@ struct dpu_hw_ctl {
 	u32 pending_flush_mask;
 	u32 pending_intf_flush_mask;
 	u32 pending_wb_flush_mask;
+	u32 pending_periph_flush_mask;
 	u32 pending_merge_3d_flush_mask;
 	u32 pending_dspp_flush_mask[DSPP_MAX - DSPP_0];
 	u32 pending_dsc_flush_mask;
-- 
2.39.2


  parent reply	other threads:[~2024-02-22 19:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 19:39 [PATCH v5 00/19] Add support for CDM over DP Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 01/19] drm/msm/dpu: allow certain formats for CDM for DP Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 02/19] drm/msm/dpu: add division of drm_display_mode's hskew parameter Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 03/19] drm/msm/dpu: pass mode dimensions instead of fb size in CDM setup Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 04/19] drm/msm/dpu: allow dpu_encoder_helper_phys_setup_cdm to work for DP Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 05/19] drm/msm/dpu: move dpu_encoder_helper_phys_setup_cdm to dpu_encoder Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 06/19] drm/msm/dp: rename wide_bus_en to wide_bus_supported Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 07/19] drm/msm/dp: store mode YUV420 information to be used by rest of DP Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 08/19] drm/msm/dp: check if VSC SDP is supported in DP programming Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 09/19] drm/msm/dpu: move widebus logic to its own API Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 10/19] drm/msm/dp: program config ctrl for YUV420 over DP Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 11/19] drm/msm/dp: change clock related programming " Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 12/19] drm/msm/dp: move parity calculation to dp_utils Paloma Arellano
2024-02-22 19:39 ` [PATCH v5 13/19] drm/msm/dp: add VSC SDP support for YUV420 over DP Paloma Arellano
2024-02-22 21:18   ` Dmitry Baryshkov
2024-02-22 21:28     ` Paloma Arellano
2024-02-22 21:56       ` Dmitry Baryshkov
2024-02-22 23:11         ` Paloma Arellano
2024-02-22 19:39 ` Paloma Arellano [this message]
2024-02-22 19:40 ` [PATCH v5 15/19] drm/msm/dp: enable SDP and SDE periph flush update Paloma Arellano
2024-02-22 19:40 ` [PATCH v5 16/19] drm/msm/dpu: modify encoder programming for CDM over DP Paloma Arellano
2024-02-22 19:40 ` [PATCH v5 17/19] drm/msm/dpu: modify timing engine programming for YUV420 " Paloma Arellano
2024-02-22 19:40 ` [PATCH v5 18/19] drm/msm/dpu: reserve CDM blocks for DP if mode is YUV420 Paloma Arellano
2024-02-22 19:40 ` [PATCH v5 19/19] drm/msm/dp: allow YUV420 mode for DP connector when CDM available Paloma Arellano
2024-03-05  0:28 ` [PATCH v5 00/19] Add support for CDM over DP Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240222194025.25329-15-quic_parellan@quicinc.com \
    --to=quic_parellan@quicinc.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_jesszhan@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@chromium.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.