|
@@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
|
|
|
{
|
|
|
struct drm_crtc *crtc;
|
|
|
struct drm_crtc_state *crtc_state;
|
|
|
- struct drm_plane *plane;
|
|
|
- struct drm_plane_state *old_plane_state, *new_plane_state;
|
|
|
+ struct drm_plane *plane = NULL;
|
|
|
+ struct drm_plane_state *old_plane_state = NULL;
|
|
|
+ struct drm_plane_state *new_plane_state = NULL;
|
|
|
const struct drm_plane_helper_funcs *funcs;
|
|
|
int i, n_planes = 0;
|
|
|
|
|
@@ -1527,7 +1528,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
|
|
|
if (n_planes != 1)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- if (!new_plane_state->crtc)
|
|
|
+ if (!new_plane_state->crtc ||
|
|
|
+ old_plane_state->crtc != new_plane_state->crtc)
|
|
|
return -EINVAL;
|
|
|
|
|
|
funcs = plane->helper_private;
|