Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250585
b: refs/heads/master
c: 6492711
h: refs/heads/master
i:
  250583: 6a3cc12
v: v3
  • Loading branch information
Chris Wilson authored and Keith Packard committed May 10, 2011
1 parent be5c42d commit 0e44642
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fbf69138ab3aa28a8f92512b7417d3d1829a086
refs/heads/master: 6492711d05b85f9794809cb4a961ce8cdc6fa720
28 changes: 10 additions & 18 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5491,8 +5491,6 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
struct drm_encoder *encoder = &intel_encoder->base;
struct drm_crtc *crtc = NULL;
struct drm_device *dev = encoder->dev;
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
struct drm_crtc_helper_funcs *crtc_funcs;
int i = -1;

/*
Expand All @@ -5515,8 +5513,13 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,

/* Make sure the crtc and connector are running */
if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) {
struct drm_encoder_helper_funcs *encoder_funcs;
struct drm_crtc_helper_funcs *crtc_funcs;

crtc_funcs = crtc->helper_private;
crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);

encoder_funcs = encoder->helper_private;
encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
}

Expand Down Expand Up @@ -5549,23 +5552,12 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
old->dpms_mode = intel_crtc->dpms_mode;
old->load_detect_temp = true;

if (!crtc->enabled) {
if (!mode)
mode = &load_detect_mode;

if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) {
DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n");
return false;
}
} else {
if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) {
crtc_funcs = crtc->helper_private;
crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);
}
if (!mode)
mode = &load_detect_mode;

/* Add this connector to the crtc */
encoder_funcs->mode_set(encoder, &crtc->mode, &crtc->hwmode);
encoder_funcs->commit(encoder);
if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) {
DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n");
return false;
}

/* let the connector get through one full cycle before testing */
Expand Down

0 comments on commit 0e44642

Please sign in to comment.