]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amd/display: writing stereo polarity register if swapped
authorMartin Leung <martin.leung@amd.com>
Thu, 27 Feb 2020 19:41:39 +0000 (14:41 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Mar 2020 17:50:15 +0000 (13:50 -0400)
[why]
on some displays that prefer swapped polarity we were seeing L/R images
swapped because OTG_STEREO_SYNC_OUTPUT_POLARITY would always be mapped
to 0

[how]
fix initial dal3 implementation to properly update the polarity field
according to the crtc_stereo_flags (same as
OTG_STEREO_EYE_FLAG_POLARITY)

Signed-off-by: Martin Leung <martin.leung@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c

index 94ac3410677623c49eb404d7270c35ee2f48a1c5..63acb8ff7462803690a54e09fcda6ca65a0bda7d 100644 (file)
@@ -1193,7 +1193,7 @@ static void optc1_enable_stereo(struct timing_generator *optc,
                        REG_UPDATE_3(OTG_STEREO_CONTROL,
                                OTG_STEREO_EN, stereo_en,
                                OTG_STEREO_SYNC_OUTPUT_LINE_NUM, 0,
-                               OTG_STEREO_SYNC_OUTPUT_POLARITY, 0);
+                               OTG_STEREO_SYNC_OUTPUT_POLARITY, flags->RIGHT_EYE_POLARITY == 0 ? 0 : 1);
 
                if (flags->PROGRAM_POLARITY)
                        REG_UPDATE(OTG_STEREO_CONTROL,