[Intel-gfx] Switcheroo support in i915

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 8 10:06:50 CEST 2014


On Sat, Sep 06, 2014 at 02:01:31PM +0100, Tom Pitcher wrote:
> I've been attempting to solve a bug with i915 & switcheroo on many Macbook 
> Pros (some with nvidia discrete cards, others radeon), report here:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=61115
> 
> Basically, after switching to i915 using switcheroo the display isn't 
> connected. It was mentioned that some kind of reprobing was needed, so I tried 
> the following:

Right, I guess the output states do need to be repolled as well. But we
need to effectively re-initialised the LVDS (and possibly all the other
connectors, but it is likely to only be the panel connectors that are
muxed).

This will require some rejigging of intel_lvds_init(), though it should
be safe enough to destroy and attempt to recreate it here:

for_each_connector_safe()
  if (connector->type == DRM_MODE_CONNECOR_LVDS)
     drm_connector_destroy(connector);

for_each_encoder_safe()
  if (encoder->type == DRM_MODE_ENCODER_LVDS)
     drm_encoder_destroy(encoder);

intel_lvds_init();
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list