]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/dsi: Use private flags to indicate TE in cmd mode
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Thu, 12 Mar 2020 05:38:37 +0000 (11:08 +0530)
committerJani Nikula <jani.nikula@intel.com>
Tue, 24 Mar 2020 14:22:02 +0000 (16:22 +0200)
On dsi cmd mode we do not receive vblanks instead
we would get TE and these flags indicate TE is expected on
which port.

Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200312053841.2794-6-vandita.kulkarni@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c

index 949f4867402baf388c5cc905e493fe26d559fe15..d452037b1ac91715af383853acdeba800f8a5e1a 100644 (file)
@@ -1550,6 +1550,24 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
        pipe_config->hw.adjusted_mode.private_flags &=
                                        ~I915_MODE_FLAG_DSI_PERIODIC_CMD_MODE;
 
+       /*
+        * In case of TE GATE cmd mode, we
+        * receive TE from the slave if
+        * dual link is enabled
+        */
+       if (is_cmd_mode(intel_dsi)) {
+               if (intel_dsi->ports == (BIT(PORT_B) | BIT(PORT_A)))
+                       pipe_config->hw.adjusted_mode.private_flags |=
+                                               I915_MODE_FLAG_DSI_USE_TE1 |
+                                               I915_MODE_FLAG_DSI_USE_TE0;
+               else if (intel_dsi->ports == BIT(PORT_B))
+                       pipe_config->hw.adjusted_mode.private_flags |=
+                                               I915_MODE_FLAG_DSI_USE_TE1;
+               else
+                       pipe_config->hw.adjusted_mode.private_flags |=
+                                               I915_MODE_FLAG_DSI_USE_TE0;
+       }
+
        return 0;
 }