diff options
author | Rob Clark <robdclark@gmail.com> | 2014-11-20 15:40:36 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-11-21 16:06:15 -0500 |
commit | 46df9adb2e7709e56ab8aacaff2fc997a6d17239 (patch) | |
tree | 3c3afeec99f63a52904f55906eb987bf89710612 | |
parent | 934ce1c23624526d9d784e0499190bb48113e6f4 (diff) |
drm/atomic: shutdown *current* encoder
In disable_outputs() we need to shut down the outgoing encoder, not the
incoming one (we have already swapped-state at this point). Without
this, we end up telling the driver to crtc->dpms(OFF) without first
encoder->dpms(OFF), and that makes some hw quite unhappy.
v2: missing WARN_ON() hunk and comment
Reviewed-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 3a74e81a78df..a17b8e9c0a81 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
@@ -499,9 +499,12 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) | |||
499 | if (!old_conn_state || !old_conn_state->crtc) | 499 | if (!old_conn_state || !old_conn_state->crtc) |
500 | continue; | 500 | continue; |
501 | 501 | ||
502 | encoder = connector->state->best_encoder; | 502 | encoder = old_conn_state->best_encoder; |
503 | 503 | ||
504 | if (!encoder) | 504 | /* We shouldn't get this far if we didn't previously have |
505 | * an encoder.. but WARN_ON() rather than explode. | ||
506 | */ | ||
507 | if (WARN_ON(!encoder)) | ||
505 | continue; | 508 | continue; |
506 | 509 | ||
507 | funcs = encoder->helper_private; | 510 | funcs = encoder->helper_private; |