Skip to content

Commit

Permalink
drm/i915: switch the load detect code to the staged modeset config
Browse files Browse the repository at this point in the history
Now that set_mode also disables crtcs and expects it's new
configuration in the staged output links we need to adjust the load
detect code a bit.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Sep 6, 2012
1 parent 284637d commit fc30310
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5796,8 +5796,8 @@ bool intel_get_load_detect_pipe(struct drm_connector *connector,
return false;
}

encoder->crtc = crtc;
connector->encoder = encoder;
intel_encoder->new_crtc = to_intel_crtc(crtc);
to_intel_connector(connector)->new_encoder = intel_encoder;

intel_crtc = to_intel_crtc(crtc);
old->dpms_mode = connector->dpms;
Expand Down Expand Up @@ -5849,16 +5849,17 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
struct intel_encoder *intel_encoder =
intel_attached_encoder(connector);
struct drm_encoder *encoder = &intel_encoder->base;
struct drm_device *dev = encoder->dev;

DRM_DEBUG_KMS("[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
connector->base.id, drm_get_connector_name(connector),
encoder->base.id, drm_get_encoder_name(encoder));

if (old->load_detect_temp) {
connector->encoder = NULL;
encoder->crtc = NULL;
drm_helper_disable_unused_functions(dev);
struct drm_crtc *crtc = encoder->crtc;

to_intel_connector(connector)->new_encoder = NULL;
intel_encoder->new_crtc = NULL;
intel_set_mode(crtc, NULL, 0, 0, NULL);

if (old->release_fb)
old->release_fb->funcs->destroy(old->release_fb);
Expand Down

0 comments on commit fc30310

Please sign in to comment.