diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-23 18:41:59 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-23 18:41:59 -0400 |
commit | 17efca93c8728445522dedafc033b3384a26a39d (patch) | |
tree | 44c3b4a4e24a202077f4746fb240c850d86f8853 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | 568d7c764ae01f3706085ac8f0d8a8ac7e826bd7 (diff) | |
parent | b47bcb93bbf201e9c5af698945755efeb60c0bc8 (diff) |
Merge tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel into drm-next
Bunch of small fixupes all over. Plus a dma-buf patch that Sumit asked me
to cherry-pick since that's the only one he had in his tree.
There's a sparse issue outstanding in the color mgr stuff, but Lionel is
still working on something that actually appeases sparse.
* tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel:
dma-buf/fence: fix fence_is_later v2
dma-buf: Update docs for SYNC ioctl
drm: remove excess description
dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
drm/atmel-hlcdc: use helper to get crtc state
drm/atomic: use helper to get crtc state
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 2bb90faa0ee2..4befe25c81c7 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
@@ -67,7 +67,8 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state, | |||
67 | struct drm_crtc_state *crtc_state; | 67 | struct drm_crtc_state *crtc_state; |
68 | 68 | ||
69 | if (plane->state->crtc) { | 69 | if (plane->state->crtc) { |
70 | crtc_state = state->crtc_states[drm_crtc_index(plane->state->crtc)]; | 70 | crtc_state = drm_atomic_get_existing_crtc_state(state, |
71 | plane->state->crtc); | ||
71 | 72 | ||
72 | if (WARN_ON(!crtc_state)) | 73 | if (WARN_ON(!crtc_state)) |
73 | return; | 74 | return; |
@@ -76,8 +77,8 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state, | |||
76 | } | 77 | } |
77 | 78 | ||
78 | if (plane_state->crtc) { | 79 | if (plane_state->crtc) { |
79 | crtc_state = | 80 | crtc_state = drm_atomic_get_existing_crtc_state(state, |
80 | state->crtc_states[drm_crtc_index(plane_state->crtc)]; | 81 | plane_state->crtc); |
81 | 82 | ||
82 | if (WARN_ON(!crtc_state)) | 83 | if (WARN_ON(!crtc_state)) |
83 | return; | 84 | return; |
@@ -374,8 +375,8 @@ mode_fixup(struct drm_atomic_state *state) | |||
374 | if (!conn_state->crtc || !conn_state->best_encoder) | 375 | if (!conn_state->crtc || !conn_state->best_encoder) |
375 | continue; | 376 | continue; |
376 | 377 | ||
377 | crtc_state = | 378 | crtc_state = drm_atomic_get_existing_crtc_state(state, |
378 | state->crtc_states[drm_crtc_index(conn_state->crtc)]; | 379 | conn_state->crtc); |
379 | 380 | ||
380 | /* | 381 | /* |
381 | * Each encoder has at most one connector (since we always steal | 382 | * Each encoder has at most one connector (since we always steal |
@@ -679,7 +680,8 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) | |||
679 | if (!old_conn_state->crtc) | 680 | if (!old_conn_state->crtc) |
680 | continue; | 681 | continue; |
681 | 682 | ||
682 | old_crtc_state = old_state->crtc_states[drm_crtc_index(old_conn_state->crtc)]; | 683 | old_crtc_state = drm_atomic_get_existing_crtc_state(old_state, |
684 | old_conn_state->crtc); | ||
683 | 685 | ||
684 | if (!old_crtc_state->active || | 686 | if (!old_crtc_state->active || |
685 | !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state)) | 687 | !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state)) |