linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features
@ 2025-10-17 19:58 Vladimir Lypak
  2025-10-17 19:58 ` [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling Vladimir Lypak
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

This patch series fix some issues found during testing on MDSS v1.16.

Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
Vladimir Lypak (6):
      drm/msm/dpu: Fix allocation of RGB SSPPs without scaling
      drm/msm/dpu: Propagate error from dpu_assign_plane_resources
      drm/msm/dpu: Disable scaling for unsupported scaler types
      drm/msm/dpu: Fix pixel extension sub-sampling
      drm/msm/dpu: Require linear modifier for writeback framebuffers
      drm/msm/dpu: Disable broken YUV on QSEED2 hardware

 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c |  4 ++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c      | 14 ++++++++------
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c         |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c  |  3 +++
 4 files changed, 14 insertions(+), 9 deletions(-)
---
base-commit: 6f3b6e91f7201e248d83232538db14d30100e9c7
change-id: 20251016-b4-dpu-fixes-c847c48e0e5d

Best regards,
-- 
Vladimir Lypak <vladimir.lypak@gmail.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
@ 2025-10-17 19:58 ` Vladimir Lypak
  2025-10-28 21:24   ` Dmitry Baryshkov
  2025-10-17 19:58 ` [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources Vladimir Lypak
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

Due to condition in dpu_rm_reserve_sspp, RGB SSPPs are only tried when
scaling is requested, which prevents those SSPPs from being reserved if
we don't need scaling at all. Instead we should check if YUV support is
requested, since scaling on RGB SSPPs is optional and is not implemented
in driver yet.

Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index 2c77c74fac0fda649da8ce19b7b3c6cb32b9535c..d9c3b0a1d0914a47f86ac9a854fbcede021e73cb 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -842,7 +842,7 @@ struct dpu_hw_sspp *dpu_rm_reserve_sspp(struct dpu_rm *rm,
 
 	if (!reqs->scale && !reqs->yuv)
 		hw_sspp = dpu_rm_try_sspp(rm, global_state, crtc, reqs, SSPP_TYPE_DMA);
-	if (!hw_sspp && reqs->scale)
+	if (!hw_sspp && !reqs->yuv)
 		hw_sspp = dpu_rm_try_sspp(rm, global_state, crtc, reqs, SSPP_TYPE_RGB);
 	if (!hw_sspp)
 		hw_sspp = dpu_rm_try_sspp(rm, global_state, crtc, reqs, SSPP_TYPE_VIG);

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
  2025-10-17 19:58 ` [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling Vladimir Lypak
@ 2025-10-17 19:58 ` Vladimir Lypak
  2025-10-28 21:24   ` Dmitry Baryshkov
  2025-10-17 19:58 ` [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types Vladimir Lypak
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

The dpu_plane_virtual_assign_resources function might fail if there is
no suitable SSPP(s) for the plane. This leaves sspp field in plane
state uninitialized and later leads to NULL dereference during commit:

Call trace:
 _dpu_crtc_blend_setup+0x194/0x620 [msm] (P)
 dpu_crtc_atomic_begin+0xe4/0x240 [msm]
 drm_atomic_helper_commit_planes+0x88/0x358
 msm_atomic_commit_tail+0x1b4/0x8b8 [msm]
 commit_tail+0xa8/0x1b0
 drm_atomic_helper_commit+0x180/0x1a0
 drm_atomic_commit+0x94/0xe0
 drm_mode_atomic_ioctl+0xa88/0xd60
 drm_ioctl_kernel+0xc4/0x138
 drm_ioctl+0x364/0x4f0
 __arm64_sys_ioctl+0xac/0x108
 invoke_syscall.constprop.0+0x48/0x100
 el0_svc_common.constprop.0+0x40/0xe8
 do_el0_svc+0x24/0x38
 el0_svc+0x30/0xe0
 el0t_64_sync_handler+0xa0/0xe8
 el0t_64_sync+0x198/0x1a0

Fixes: 3ed12a3664b3 ("drm/msm/dpu: allow sharing SSPP between planes")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index f54cf0faa1c7c8c00eb68b8b45ca2fc776f7f62f..d198a65a2c5fef5fbdebc9c383a4b08bc71b8bf3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -1278,7 +1278,7 @@ int dpu_assign_plane_resources(struct dpu_global_state *global_state,
 							     state, plane_state,
 							     prev_adjacent_plane_state);
 		if (ret)
-			break;
+			return ret;
 
 		prev_adjacent_plane_state = plane_state;
 	}

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
  2025-10-17 19:58 ` [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling Vladimir Lypak
  2025-10-17 19:58 ` [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources Vladimir Lypak
@ 2025-10-17 19:58 ` Vladimir Lypak
  2025-10-28 21:25   ` Dmitry Baryshkov
  2025-10-17 19:58 ` [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling Vladimir Lypak
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

Scaling is not implemented for some type of scalers (QSEED2 and RGB) but
it was unintentionally re-enabled with change below. The remaining
condition in dpu_plane_atomic_check_pipe is not enough because it only
checks for length of scaler block (which is present). This patch adds a
additional check for setup_scaler operation.

Fixes: 8f15005783b8 ("drm/msm/dpu: move scaling limitations out of the hw_catalog")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index d198a65a2c5fef5fbdebc9c383a4b08bc71b8bf3..6effe0fa4837284a1f038e4907c4c91d239aeb8b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -740,7 +740,7 @@ static int dpu_plane_atomic_check_pipe(struct dpu_plane *pdpu,
 	 * We already have verified scaling against platform limitations.
 	 * Now check if the SSPP supports scaling at all.
 	 */
-	if (!sblk->scaler_blk.len &&
+	if (!(sblk->scaler_blk.len && pipe->sspp->ops.setup_scaler) &&
 	    ((drm_rect_width(&new_plane_state->src) >> 16 !=
 	      drm_rect_width(&new_plane_state->dst)) ||
 	     (drm_rect_height(&new_plane_state->src) >> 16 !=

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
                   ` (2 preceding siblings ...)
  2025-10-17 19:58 ` [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types Vladimir Lypak
@ 2025-10-17 19:58 ` Vladimir Lypak
  2025-10-28 21:26   ` Dmitry Baryshkov
  2025-10-17 19:58 ` [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers Vladimir Lypak
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

In _dpu_plane_setup_pixel_ext function instead of dividing just chroma
source resolution once (component 1 and 2), second component is divided
once more because src_w and src_h variable is reused between iterations.
Third component receives wrong source resolution too (from component 2).
To fix this introduce temporary variables for each iteration.

Fixes: dabfdd89eaa9 ("drm/msm/disp/dpu1: add inline rotation support for sc7280")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 6effe0fa4837284a1f038e4907c4c91d239aeb8b..905524ceeb1f192c093f1be7f571b29eb4b53379 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -500,13 +500,15 @@ static void _dpu_plane_setup_pixel_ext(struct dpu_hw_scaler3_cfg *scale_cfg,
 	int i;
 
 	for (i = 0; i < DPU_MAX_PLANES; i++) {
+		uint32_t w = src_w, h = src_h;
+
 		if (i == DPU_SSPP_COMP_1_2 || i == DPU_SSPP_COMP_2) {
-			src_w /= chroma_subsmpl_h;
-			src_h /= chroma_subsmpl_v;
+			w /= chroma_subsmpl_h;
+			h /= chroma_subsmpl_v;
 		}
 
-		pixel_ext->num_ext_pxls_top[i] = src_h;
-		pixel_ext->num_ext_pxls_left[i] = src_w;
+		pixel_ext->num_ext_pxls_top[i] = h;
+		pixel_ext->num_ext_pxls_left[i] = w;
 	}
 }
 

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
                   ` (3 preceding siblings ...)
  2025-10-17 19:58 ` [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling Vladimir Lypak
@ 2025-10-17 19:58 ` Vladimir Lypak
  2025-10-28 21:26   ` Dmitry Baryshkov
  2025-10-18 14:33 ` [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware Vladimir Lypak
  2025-10-29  0:30 ` [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Dmitry Baryshkov
  6 siblings, 1 reply; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-17 19:58 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

UBWC-related register configuration for writeback is not implemented in
the driver yet but there aren't any checks for non-linear modifiers in
atomic_check. Thus when compressed framebuffer is attached to writeback
connector it will be filled with linear image data. This patch forbids
non-linear modifiers for writeback framebuffers until UBWC support for
writeback is properly implemented.

Fixes: 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
index cd73468e369a93c50303db2a7d4499bcb17be5d1..7545c0293efbd8f7eb34a4ac56f616b7cadae1c0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c
@@ -72,6 +72,9 @@ static int dpu_wb_conn_atomic_check(struct drm_connector *connector,
 		DPU_ERROR("invalid fb w=%d, maxlinewidth=%u\n",
 			  fb->width, dpu_wb_conn->maxlinewidth);
 		return -EINVAL;
+	} else if (fb->modifier != DRM_FORMAT_MOD_LINEAR) {
+		DPU_ERROR("unsupported fb modifier:%#llx\n", fb->modifier);
+		return -EINVAL;
 	}
 
 	return drm_atomic_helper_check_wb_connector_state(conn_state->connector, conn_state->state);

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
                   ` (4 preceding siblings ...)
  2025-10-17 19:58 ` [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers Vladimir Lypak
@ 2025-10-18 14:33 ` Vladimir Lypak
  2025-10-28 21:27   ` Dmitry Baryshkov
  2025-10-28 22:14   ` Dmitry Baryshkov
  2025-10-29  0:30 ` [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Dmitry Baryshkov
  6 siblings, 2 replies; 15+ messages in thread
From: Vladimir Lypak @ 2025-10-18 14:33 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Vladimir Lypak

YUV formats on this hardware needs scaling for chroma planes. However it
is not implemented for QSEED2 which breaks display pipeline if YUV format
is used (causing partial and corrupted output with PPDONE timeouts).
This patch temporarily disables YUV by switching affected sub-block to
RGB only format list.

Fixes: daf9a92daeb8 ("drm/msm/dpu: Add support for MSM8996")
Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 6641455c4ec6a2d082644f1488ea5f5605ccc208..9f8d1bba9139a7e09ee321cf1b6f30f96890918f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -267,8 +267,8 @@ static const u32 wb2_formats_rgb_yuv[] = {
 		.base = 0x200, .len = 0xa0,}, \
 	.csc_blk = {.name = "csc", \
 		.base = 0x320, .len = 0x100,}, \
-	.format_list = plane_formats_yuv, \
-	.num_formats = ARRAY_SIZE(plane_formats_yuv), \
+	.format_list = plane_formats, \
+	.num_formats = ARRAY_SIZE(plane_formats), \
 	.rotation_cfg = NULL, \
 	}
 

-- 
2.51.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling
  2025-10-17 19:58 ` [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling Vladimir Lypak
@ 2025-10-28 21:24   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:24 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Oct 17, 2025 at 07:58:35PM +0000, Vladimir Lypak wrote:
> Due to condition in dpu_rm_reserve_sspp, RGB SSPPs are only tried when
> scaling is requested, which prevents those SSPPs from being reserved if
> we don't need scaling at all. Instead we should check if YUV support is
> requested, since scaling on RGB SSPPs is optional and is not implemented
> in driver yet.
> 
> Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources
  2025-10-17 19:58 ` [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources Vladimir Lypak
@ 2025-10-28 21:24   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:24 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Oct 17, 2025 at 07:58:36PM +0000, Vladimir Lypak wrote:
> The dpu_plane_virtual_assign_resources function might fail if there is
> no suitable SSPP(s) for the plane. This leaves sspp field in plane
> state uninitialized and later leads to NULL dereference during commit:
> 
> Call trace:
>  _dpu_crtc_blend_setup+0x194/0x620 [msm] (P)
>  dpu_crtc_atomic_begin+0xe4/0x240 [msm]
>  drm_atomic_helper_commit_planes+0x88/0x358
>  msm_atomic_commit_tail+0x1b4/0x8b8 [msm]
>  commit_tail+0xa8/0x1b0
>  drm_atomic_helper_commit+0x180/0x1a0
>  drm_atomic_commit+0x94/0xe0
>  drm_mode_atomic_ioctl+0xa88/0xd60
>  drm_ioctl_kernel+0xc4/0x138
>  drm_ioctl+0x364/0x4f0
>  __arm64_sys_ioctl+0xac/0x108
>  invoke_syscall.constprop.0+0x48/0x100
>  el0_svc_common.constprop.0+0x40/0xe8
>  do_el0_svc+0x24/0x38
>  el0_svc+0x30/0xe0
>  el0t_64_sync_handler+0xa0/0xe8
>  el0t_64_sync+0x198/0x1a0
> 
> Fixes: 3ed12a3664b3 ("drm/msm/dpu: allow sharing SSPP between planes")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types
  2025-10-17 19:58 ` [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types Vladimir Lypak
@ 2025-10-28 21:25   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:25 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Oct 17, 2025 at 07:58:37PM +0000, Vladimir Lypak wrote:
> Scaling is not implemented for some type of scalers (QSEED2 and RGB) but
> it was unintentionally re-enabled with change below. The remaining
> condition in dpu_plane_atomic_check_pipe is not enough because it only
> checks for length of scaler block (which is present). This patch adds a
> additional check for setup_scaler operation.

Nit: in future please refrain from using constructions like 'This patch
makes foo' (see Documentation/process/submitting-patches.rst).

For this patch:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


> 
> Fixes: 8f15005783b8 ("drm/msm/dpu: move scaling limitations out of the hw_catalog")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling
  2025-10-17 19:58 ` [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling Vladimir Lypak
@ 2025-10-28 21:26   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:26 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Oct 17, 2025 at 07:58:38PM +0000, Vladimir Lypak wrote:
> In _dpu_plane_setup_pixel_ext function instead of dividing just chroma
> source resolution once (component 1 and 2), second component is divided
> once more because src_w and src_h variable is reused between iterations.
> Third component receives wrong source resolution too (from component 2).
> To fix this introduce temporary variables for each iteration.
> 
> Fixes: dabfdd89eaa9 ("drm/msm/disp/dpu1: add inline rotation support for sc7280")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers
  2025-10-17 19:58 ` [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers Vladimir Lypak
@ 2025-10-28 21:26   ` Dmitry Baryshkov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:26 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Fri, Oct 17, 2025 at 07:58:39PM +0000, Vladimir Lypak wrote:
> UBWC-related register configuration for writeback is not implemented in
> the driver yet but there aren't any checks for non-linear modifiers in
> atomic_check. Thus when compressed framebuffer is attached to writeback
> connector it will be filled with linear image data. This patch forbids
> non-linear modifiers for writeback framebuffers until UBWC support for
> writeback is properly implemented.
> 
> Fixes: 71174f362d67 ("drm/msm/dpu: move writeback's atomic_check to dpu_writeback.c")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_writeback.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware
  2025-10-18 14:33 ` [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware Vladimir Lypak
@ 2025-10-28 21:27   ` Dmitry Baryshkov
  2025-10-28 22:14   ` Dmitry Baryshkov
  1 sibling, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 21:27 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sat, Oct 18, 2025 at 02:33:43PM +0000, Vladimir Lypak wrote:
> YUV formats on this hardware needs scaling for chroma planes. However it
> is not implemented for QSEED2 which breaks display pipeline if YUV format
> is used (causing partial and corrupted output with PPDONE timeouts).
> This patch temporarily disables YUV by switching affected sub-block to
> RGB only format list.
> 
> Fixes: daf9a92daeb8 ("drm/msm/dpu: Add support for MSM8996")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Does it apply to all QSEED2 platforms or just some of them?

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware
  2025-10-18 14:33 ` [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware Vladimir Lypak
  2025-10-28 21:27   ` Dmitry Baryshkov
@ 2025-10-28 22:14   ` Dmitry Baryshkov
  1 sibling, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-28 22:14 UTC (permalink / raw)
  To: Vladimir Lypak
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, linux-arm-msm, dri-devel,
	freedreno, linux-kernel

On Sat, Oct 18, 2025 at 02:33:43PM +0000, Vladimir Lypak wrote:
> YUV formats on this hardware needs scaling for chroma planes. However it
> is not implemented for QSEED2 which breaks display pipeline if YUV format
> is used (causing partial and corrupted output with PPDONE timeouts).
> This patch temporarily disables YUV by switching affected sub-block to
> RGB only format list.
> 
> Fixes: daf9a92daeb8 ("drm/msm/dpu: Add support for MSM8996")
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features
  2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
                   ` (5 preceding siblings ...)
  2025-10-18 14:33 ` [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware Vladimir Lypak
@ 2025-10-29  0:30 ` Dmitry Baryshkov
  6 siblings, 0 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2025-10-29  0:30 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
	Konrad Dybcio, Kalyan Thota, Vinod Polimera, Konrad Dybcio,
	Barnabás Czémán, Vladimir Lypak
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel


On Fri, 17 Oct 2025 19:58:34 +0000, Vladimir Lypak wrote:
> This patch series fix some issues found during testing on MDSS v1.16.
> 
> 

Applied, thanks!

[1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling
      https://gitlab.freedesktop.org/lumag/msm/-/commit/2319551e97f0
[2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources
      https://gitlab.freedesktop.org/lumag/msm/-/commit/23ab0d6228bf
[3/6] drm/msm/dpu: Disable scaling for unsupported scaler types
      https://gitlab.freedesktop.org/lumag/msm/-/commit/425da3305972
[4/6] drm/msm/dpu: Fix pixel extension sub-sampling
      https://gitlab.freedesktop.org/lumag/msm/-/commit/2f8bed917542
[5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers
      https://gitlab.freedesktop.org/lumag/msm/-/commit/5e0656b12534
[6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware
      https://gitlab.freedesktop.org/lumag/msm/-/commit/bbc65d1bde82

Best regards,
-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-10-29  0:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 19:58 [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Vladimir Lypak
2025-10-17 19:58 ` [PATCH 1/6] drm/msm/dpu: Fix allocation of RGB SSPPs without scaling Vladimir Lypak
2025-10-28 21:24   ` Dmitry Baryshkov
2025-10-17 19:58 ` [PATCH 2/6] drm/msm/dpu: Propagate error from dpu_assign_plane_resources Vladimir Lypak
2025-10-28 21:24   ` Dmitry Baryshkov
2025-10-17 19:58 ` [PATCH 3/6] drm/msm/dpu: Disable scaling for unsupported scaler types Vladimir Lypak
2025-10-28 21:25   ` Dmitry Baryshkov
2025-10-17 19:58 ` [PATCH 4/6] drm/msm/dpu: Fix pixel extension sub-sampling Vladimir Lypak
2025-10-28 21:26   ` Dmitry Baryshkov
2025-10-17 19:58 ` [PATCH 5/6] drm/msm/dpu: Require linear modifier for writeback framebuffers Vladimir Lypak
2025-10-28 21:26   ` Dmitry Baryshkov
2025-10-18 14:33 ` [PATCH 6/6] drm/msm/dpu: Disable broken YUV on QSEED2 hardware Vladimir Lypak
2025-10-28 21:27   ` Dmitry Baryshkov
2025-10-28 22:14   ` Dmitry Baryshkov
2025-10-29  0:30 ` [PATCH 0/6] drm/msm/dpu: Fixes for virtual planes and 1.x features Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).