]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915/icl: Get DSI transcoder for a given port
authorMadhav Chauhan <madhav.chauhan@intel.com>
Mon, 15 Oct 2018 14:27:56 +0000 (17:27 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 22 Oct 2018 06:44:58 +0000 (09:44 +0300)
This patch adds a helper function to retrieve DSI
transcoder for a given DSI port using newly defined
enum names for DSI transcoders.

Signed-off-by: Madhav Chauhan <madhav.chauhan@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/f88ff26fa10c68e37b7838bb7c8573c881474e73.1539613303.git.jani.nikula@intel.com
drivers/gpu/drm/i915/icl_dsi.c
drivers/gpu/drm/i915/intel_display.h

index f9df3a7fa66bc1b60d7371ef96a13b1f26e95264..407c3065d08d55fcd9d8c096bc4f6e1c2f48161b 100644 (file)
 
 #include "intel_dsi.h"
 
+static enum transcoder __attribute__((unused)) dsi_port_to_transcoder(enum port port)
+{
+       if (port == PORT_A)
+               return TRANSCODER_DSI_0;
+       else
+               return TRANSCODER_DSI_1;
+}
+
 static void dsi_program_swing_and_deemphasis(struct intel_encoder *encoder)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
index 9fac67e31205ff19ae9398b23bfd07a1191ac541..54087130f67efda271cddd063353f7668d83d783 100644 (file)
@@ -61,8 +61,10 @@ enum transcoder {
        TRANSCODER_B,
        TRANSCODER_C,
        TRANSCODER_EDP,
-       TRANSCODER_DSI_A,
-       TRANSCODER_DSI_C,
+       TRANSCODER_DSI_0,
+       TRANSCODER_DSI_1,
+       TRANSCODER_DSI_A = TRANSCODER_DSI_0,    /* legacy DSI */
+       TRANSCODER_DSI_C = TRANSCODER_DSI_1,    /* legacy DSI */
 
        I915_MAX_TRANSCODERS
 };