Move the initialization of encoder variables a bit higher inside the
intel_dsi_init() function. So that the encoder can safely be passed to
intel_connector_get_hw_state() inside intel_dsi_vbt_init().

This is a preparation patch for reading back the GOP configured pclk
from intel_dsi_vbt_init().

Signed-off-by: Hans de Goede <hdego...@redhat.com>
---
 drivers/gpu/drm/i915/intel_dsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 3b7acb5a70b3..103fe460f78c 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -1769,6 +1769,9 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
        intel_connector->get_hw_state = intel_connector_get_hw_state;
 
        intel_encoder->port = port;
+       intel_encoder->type = INTEL_OUTPUT_DSI;
+       intel_encoder->power_domain = POWER_DOMAIN_PORT_DSI;
+       intel_encoder->cloneable = 0;
 
        /*
         * On BYT/CHV, pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI
@@ -1820,9 +1823,6 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)
                }
        }
 
-       intel_encoder->type = INTEL_OUTPUT_DSI;
-       intel_encoder->power_domain = POWER_DOMAIN_PORT_DSI;
-       intel_encoder->cloneable = 0;
        drm_connector_init(dev, connector, &intel_dsi_connector_funcs,
                           DRM_MODE_CONNECTOR_DSI);
 
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to