drm/i915/tgl/dsi: Program TRANS_VBLANK register
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Tue, 30 Jul 2019 07:36:43 +0000 (13:06 +0530)
committerUma Shankar <uma.shankar@intel.com>
Thu, 8 Aug 2019 13:07:49 +0000 (18:37 +0530)
Program vblank register for mipi dsi in video mode
on TGL.

Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190730073648.5157-2-vandita.kulkarni@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c

index a42348be04383905d904d0b1ca80b3b659da313f..7b8fdb16b651755d4f16124f43c5352728cae831 100644 (file)
@@ -862,6 +862,15 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
                dsi_trans = dsi_port_to_transcoder(port);
                I915_WRITE(VSYNCSHIFT(dsi_trans), vsync_shift);
        }
+
+       /* program TRANS_VBLANK register, should be same as vtotal programmed */
+       if (INTEL_GEN(dev_priv) >= 12) {
+               for_each_dsi_port(port, intel_dsi->ports) {
+                       dsi_trans = dsi_port_to_transcoder(port);
+                       I915_WRITE(VBLANK(dsi_trans),
+                                  (vactive - 1) | ((vtotal - 1) << 16));
+               }
+       }
 }
 
 static void gen11_dsi_enable_transcoder(struct intel_encoder *encoder)