@@ -155,7 +155,7 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
struct drm_atomic_state *state,
bool nonblock)
{
- struct drm_plane_state *plane_state;
+ struct drm_plane_state *old_plane_state, *new_plane_state;
struct drm_plane *plane;
struct dma_buf *dma_buf;
int i;
@@ -164,13 +164,13 @@ static int imx_drm_atomic_commit(struct drm_device *dev,
* If the plane fb has an dma-buf attached, fish out the exclusive
* fence for the atomic helper to wait on.
*/
- for_each_plane_in_state(state, plane, plane_state, i) {
- if ((plane->state->fb != plane_state->fb) && plane_state->fb) {
- dma_buf = drm_fb_cma_get_gem_obj(plane_state->fb,
+ for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
+ if ((old_plane_state->fb != new_plane_state->fb) && new_plane_state->fb) {
+ dma_buf = drm_fb_cma_get_gem_obj(new_plane_state->fb,
0)->base.dma_buf;
if (!dma_buf)
continue;
- plane_state->fence =
+ new_plane_state->fence =
reservation_object_get_excl_rcu(dma_buf->resv);
}
}
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/imx/imx-drm-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)