From: Sung Joon Kim Date: Thu, 11 Apr 2024 19:28:08 +0000 (-0400) Subject: drm/amd/display: Fix recout calculation for stereo side-by-side X-Git-Tag: v6.11-rc1~141^2~25^2~570 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2862b1637ea2bdaaf13d9b5e3635c096297a0f1d;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Fix recout calculation for stereo side-by-side [why & how] The recout x offset was incorrect which led to wrong viewport calculation. For stereo side-by-side case, the slice index should be 0 for both split pipes. Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index bb43c62e959a4..ebbeb37f36a6f 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -950,6 +950,9 @@ static struct rect calculate_mpc_slice_in_timing_active( stream->view_format != VIEW_3D_FORMAT_SIDE_BY_SIDE || mpc_rec.width % 2 == 0); + if (stream->view_format == VIEW_3D_FORMAT_SIDE_BY_SIDE) + mpc_rec.x -= (mpc_rec.width * mpc_slice_idx); + /* extra pixels in the division remainder need to go to pipes after * the extra pixel index minus one(epimo) defined here as: */