All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Marijn Suijten <marijn.suijten@somainline.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Bjorn Andersson <andersson@kernel.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Subject: [PATCH v2 4/9] drm/msm/dpu: rearrange QoS setting code
Date: Tue,  2 May 2023 18:05:28 +0300	[thread overview]
Message-ID: <20230502150533.3672840-5-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230502150533.3672840-1-dmitry.baryshkov@linaro.org>

Slightly rearrainge code in dpu_plane_sspp_update_pipe() to group
QoS/LUT related functions.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index b8ed7247a6af..586f089756fa 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1079,10 +1079,10 @@ static void dpu_plane_sspp_update_pipe(struct drm_plane *plane,
 		pipe->sspp->ops.setup_sourceaddress(pipe, layout);
 	}
 
-	_dpu_plane_set_qos_ctrl(plane, pipe, false, DPU_PLANE_QOS_PANIC_CTRL);
-
 	/* override for color fill */
 	if (pdpu->color_fill & DPU_PLANE_COLOR_FILL_FLAG) {
+		_dpu_plane_set_qos_ctrl(plane, pipe, false, DPU_PLANE_QOS_PANIC_CTRL);
+
 		/* skip remaining processing on color fill */
 		return;
 	}
@@ -1125,12 +1125,14 @@ static void dpu_plane_sspp_update_pipe(struct drm_plane *plane,
 
 	_dpu_plane_set_qos_lut(plane, pipe, fmt, pipe_cfg);
 	_dpu_plane_set_danger_lut(plane, pipe, fmt);
+	_dpu_plane_set_qos_ctrl(plane, pipe,
+				pipe->sspp->idx != SSPP_CURSOR0 &&
+				pipe->sspp->idx != SSPP_CURSOR1,
+				DPU_PLANE_QOS_PANIC_CTRL);
 
 	if (pipe->sspp->idx != SSPP_CURSOR0 &&
-	    pipe->sspp->idx != SSPP_CURSOR1) {
-		_dpu_plane_set_qos_ctrl(plane, pipe, true, DPU_PLANE_QOS_PANIC_CTRL);
+	    pipe->sspp->idx != SSPP_CURSOR1)
 		_dpu_plane_set_ot_limit(plane, pipe, pipe_cfg, frame_rate);
-	}
 
 	if (pstate->needs_qos_remap)
 		_dpu_plane_set_qos_remap(plane, pipe);
-- 
2.39.2


WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Marijn Suijten <marijn.suijten@somainline.org>
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	Bjorn Andersson <andersson@kernel.org>,
	dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>
Subject: [PATCH v2 4/9] drm/msm/dpu: rearrange QoS setting code
Date: Tue,  2 May 2023 18:05:28 +0300	[thread overview]
Message-ID: <20230502150533.3672840-5-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230502150533.3672840-1-dmitry.baryshkov@linaro.org>

Slightly rearrainge code in dpu_plane_sspp_update_pipe() to group
QoS/LUT related functions.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index b8ed7247a6af..586f089756fa 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1079,10 +1079,10 @@ static void dpu_plane_sspp_update_pipe(struct drm_plane *plane,
 		pipe->sspp->ops.setup_sourceaddress(pipe, layout);
 	}
 
-	_dpu_plane_set_qos_ctrl(plane, pipe, false, DPU_PLANE_QOS_PANIC_CTRL);
-
 	/* override for color fill */
 	if (pdpu->color_fill & DPU_PLANE_COLOR_FILL_FLAG) {
+		_dpu_plane_set_qos_ctrl(plane, pipe, false, DPU_PLANE_QOS_PANIC_CTRL);
+
 		/* skip remaining processing on color fill */
 		return;
 	}
@@ -1125,12 +1125,14 @@ static void dpu_plane_sspp_update_pipe(struct drm_plane *plane,
 
 	_dpu_plane_set_qos_lut(plane, pipe, fmt, pipe_cfg);
 	_dpu_plane_set_danger_lut(plane, pipe, fmt);
+	_dpu_plane_set_qos_ctrl(plane, pipe,
+				pipe->sspp->idx != SSPP_CURSOR0 &&
+				pipe->sspp->idx != SSPP_CURSOR1,
+				DPU_PLANE_QOS_PANIC_CTRL);
 
 	if (pipe->sspp->idx != SSPP_CURSOR0 &&
-	    pipe->sspp->idx != SSPP_CURSOR1) {
-		_dpu_plane_set_qos_ctrl(plane, pipe, true, DPU_PLANE_QOS_PANIC_CTRL);
+	    pipe->sspp->idx != SSPP_CURSOR1)
 		_dpu_plane_set_ot_limit(plane, pipe, pipe_cfg, frame_rate);
-	}
 
 	if (pstate->needs_qos_remap)
 		_dpu_plane_set_qos_remap(plane, pipe);
-- 
2.39.2


  parent reply	other threads:[~2023-05-02 15:05 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 15:05 [PATCH v2 0/9] drm/msm/dpu: simplify QoS/CDP programming Dmitry Baryshkov
2023-05-02 15:05 ` Dmitry Baryshkov
2023-05-02 15:05 ` [PATCH v2 1/9] drm/msm/dpu: fix SSPP register definitions Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:24   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:24     ` Jeykumar Sankaran
2023-05-05 19:04     ` Dmitry Baryshkov
2023-05-05 19:04       ` Dmitry Baryshkov
2023-05-02 15:05 ` [PATCH v2 2/9] drm/msm/dpu: simplify CDP programming Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:17   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:17     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 3/9] drm/msm/dpu: fix the condition for (not) applying QoS to CURSOR SSPP Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:17   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:17     ` Jeykumar Sankaran
2023-05-02 15:05 ` Dmitry Baryshkov [this message]
2023-05-02 15:05   ` [PATCH v2 4/9] drm/msm/dpu: rearrange QoS setting code Dmitry Baryshkov
2023-05-05 17:17   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:17     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 5/9] drm/msm/dpu: drop DPU_PLANE_QOS_VBLANK_CTRL Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:19   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:19     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 6/9] drm/msm/dpu: simplify qos_ctrl handling Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:20   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:20     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 7/9] drm/msm/dpu: drop DPU_PLANE_QOS_PANIC_CTRL Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:21   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:21     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 8/9] drm/msm/dpu: remove struct dpu_hw_pipe_qos_cfg Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:21   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:21     ` Jeykumar Sankaran
2023-05-02 15:05 ` [PATCH v2 9/9] drm/msm/dpu: use common helper for WB and SSPP QoS setup Dmitry Baryshkov
2023-05-02 15:05   ` Dmitry Baryshkov
2023-05-05 17:22   ` [Freedreno] " Jeykumar Sankaran
2023-05-05 17:22     ` Jeykumar Sankaran

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=20230502150533.3672840-5-dmitry.baryshkov@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --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.