drm/i915/dsi: add ports to intel_dsi to describe the ports being driven
authorJani Nikula <jani.nikula@intel.com>
Fri, 14 Nov 2014 14:54:22 +0000 (16:54 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Dec 2014 08:35:25 +0000 (09:35 +0100)
Later on this can include multiple ports (e.g. (1 << PORT_A) | (1 <<
PORT_C)) to describe dual link DSI.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dsi.c
drivers/gpu/drm/i915/intel_dsi.h

index 35842a6687d8decbb7a166d6e829e7976c37215b..259cb4ab20676c00d00dfc4ba429cfb6bef50e3d 100644 (file)
@@ -749,10 +749,13 @@ void intel_dsi_init(struct drm_device *dev)
        intel_connector->unregister = intel_connector_unregister;
 
        /* Pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI port C */
-       if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIA)
+       if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIA) {
                intel_encoder->crtc_mask = (1 << PIPE_A);
-       else if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIC)
+               intel_dsi->ports = (1 << PORT_A);
+       } else if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIC) {
                intel_encoder->crtc_mask = (1 << PIPE_B);
+               intel_dsi->ports = (1 << PORT_C);
+       }
 
        for (i = 0; i < ARRAY_SIZE(intel_dsi_devices); i++) {
                dsi = &intel_dsi_devices[i];
index 97a6f621774fc91a2eb140d8e23f2b4e7dc7df12..7f5d0280b9d78a6d6f289a669516b9e401aee0eb 100644 (file)
@@ -78,6 +78,9 @@ struct intel_dsi {
 
        struct intel_connector *attached_connector;
 
+       /* bit mask of ports being driven */
+       u16 ports;
+
        /* if true, use HS mode, otherwise LP */
        bool hs;