]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Fix recout calculation for stereo side-by-side
authorSung Joon Kim <sungjoon.kim@amd.com>
Thu, 11 Apr 2024 19:28:08 +0000 (15:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 13:48:55 +0000 (09:48 -0400)
[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 <dmytro.laktyushkin@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Sung Joon Kim <sungjoon.kim@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

index bb43c62e959a496b2cb568919b988742c5b1c7b1..ebbeb37f36a6f1af79cbba479bbff9ea9add2ff6 100644 (file)
@@ -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:
         */