RE: [PATCH] drm/amd/display: Fix dsc mismatch of acquire and validationn of dsc engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

Hi Bhawan,

Kindly correct the spelling to "validation" in Commit title - "drm/amd/display: Fix dsc mismatch of acquire and validationn of dsc engine" 
With that fixed, patch is good.
Thank you.

Acked-by: Praful Swarnakar <Praful.Swarnakar@xxxxxxx>

Thanks and Best Regards,
Praful Swarnakar

-----Original Message-----
From: Wu, Hersen <hersenxs.wu@xxxxxxx> 
Sent: Thursday, December 22, 2022 1:23 AM
To: Lakha, Bhawanpreet <Bhawanpreet.Lakha@xxxxxxx>; Swarnakar, Praful <Praful.Swarnakar@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Lakha, Bhawanpreet <Bhawanpreet.Lakha@xxxxxxx>; Liu, Wenjing <Wenjing.Liu@xxxxxxx>; Wu, Hersen <hersenxs.wu@xxxxxxx>
Subject: RE: [PATCH] drm/amd/display: Fix dsc mismatch of acquire and validationn of dsc engine

[AMD Official Use Only - General]

Reviewed-by: Hersen Wu <Hersenxs.Wu@xxxxxxx>

Regards!
Hersen


-----Original Message-----
From: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx> 
Sent: Wednesday, December 21, 2022 1:44 PM
To: Swarnakar, Praful <Praful.Swarnakar@xxxxxxx>; Wu, Hersen <hersenxs.wu@xxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Lakha, Bhawanpreet <Bhawanpreet.Lakha@xxxxxxx>; Liu, Wenjing <Wenjing.Liu@xxxxxxx>
Subject: [PATCH] drm/amd/display: Fix dsc mismatch of acquire and validationn of dsc engine

[Why]
We skip dsc_validation on pipes that are underlays, but in the acquire_dsc code we don't have this check.

In certain conditions (when underlay pipe index is lower) we will assign the dsc resource to the underlay pipe and skip the base pipe.

Now during dsc_validation we will skip the underlay pipe (this has the dsc resource) but try to validate the base pipe(this doesn't have a dsc
resource) due to this mismatch we hit a NULLPTR

[How]
In the acquire_dsc add a check for underlay pipe so we don't acquire a dsc resource for this pipe. This will match the acquire/validation conditions.

Reviewed-by: Wenjing Liu <Wenjing.Liu@xxxxxxx>
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index d0199ec045cb..f97d8ff16e71 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -1382,6 +1382,9 @@ enum dc_status dcn20_add_dsc_to_stream_resource(struct dc *dc,
 	for (i = 0; i < dc->res_pool->pipe_count; i++) {
 		struct pipe_ctx *pipe_ctx = &dc_ctx->res_ctx.pipe_ctx[i];
 
+		if (pipe_ctx->top_pipe)
+			continue;
+
 		if (pipe_ctx->stream != dc_stream)
 			continue;
 
--
2.25.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux