On Mon, 04 Apr 2016, Shashank Sharma <shashank.sharma@xxxxxxxxx> wrote: > This patch adds a hack to enable lspcon on GEN9 devices. > This should not be merged, and the hack must be replaced > by proper VBT parsing logic. > > Expecting this patch to enable lspcon bits in VBT: > https://lists.freedesktop.org/archives/intel-gfx/2016-March/089541.html FYI, an updated version of that patch has been pushed now. BR, Jani. > > Signed-off-by: Shashank Sharma <shashank.sharma@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_ddi.c | 15 +++++++++++++++ > drivers/gpu/drm/i915/intel_drv.h | 4 ++++ > drivers/gpu/drm/i915/intel_lspcon.c | 10 ++++++++++ > 3 files changed, 29 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index 91654ff..f6c2869 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -2169,6 +2169,21 @@ void intel_ddi_init(struct drm_device *dev, enum port port) > intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2); > intel_encoder->cloneable = 0; > > + > + /* Check if LSPCON is configured on this port */ > + if (is_lspcon_present_on_port(dev_priv, intel_dig_port->port)) { > + if (!intel_lspcon_init_connector(intel_dig_port)) { > + DRM_DEBUG_KMS("LSPCON configured for port %c\n", > + port_name(intel_dig_port->port)); > + return; > + } else { > + DRM_ERROR("Can't set LSPCON(port %c), falling to DP/HDMI\n", > + port_name(intel_dig_port->port)); > + init_dp = true; > + init_hdmi = true; > + } > + } > + > if (init_dp) { > if (!intel_ddi_init_dp_connector(intel_dig_port)) > goto err; > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h > index a6ec946..922852c 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -1345,6 +1345,10 @@ void intel_dsi_init(struct drm_device *dev); > /* intel_dvo.c */ > void intel_dvo_init(struct drm_device *dev); > > +/* intel_lspcon.c */ > +int intel_lspcon_init_connector(struct intel_digital_port *intel_dig_port); > +bool is_lspcon_present_on_port(struct drm_i915_private * dev_priv, > + enum port port); > > /* legacy fbdev emulation in intel_fbdev.c */ > #ifdef CONFIG_DRM_FBDEV_EMULATION > diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c > index 20f90e0..96e4c71 100644 > --- a/drivers/gpu/drm/i915/intel_lspcon.c > +++ b/drivers/gpu/drm/i915/intel_lspcon.c > @@ -397,6 +397,16 @@ static const struct drm_connector_helper_funcs lspcon_connector_helper_funcs = { > .best_encoder = intel_best_encoder, > }; > > +bool is_lspcon_present_on_port(struct drm_i915_private *dev_priv, enum port port) > +{ > + /* > + * TODO: HACK > + * Replace this with proper VBT child dev config check > + * logic once that patch is available in tree > + */ > + return IS_GEN9(dev_priv->dev) && (port == PORT_B); > +} > + > int intel_lspcon_init_connector(struct intel_digital_port *intel_dig_port) > { > int ret; -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx