Skip to content

Commit

Permalink
drm/i915: Propagate failure to set mode for load-detect pipe
Browse files Browse the repository at this point in the history
Check the return value from drm_crtc_set_mode(), report the failure
via a debug message and propagate the error back to the caller. This
prevents us from blissfully continuing to do the load detection on a
disabled pipe. Fortunately actual failure for modesetting is very rare,
and reported failures even rarer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
Chris Wilson authored and Keith Packard committed May 10, 2011
1 parent 7173188 commit be92558
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5551,7 +5551,11 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
if (!crtc->enabled) {
if (!mode)
mode = &load_detect_mode;
drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb);

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;
Expand Down

0 comments on commit be92558

Please sign in to comment.