drm: Stop updating plane->crtc/fb/old_fb on atomic drivers
Stop playing around with plane->crtc/fb/old_fb with atomic drivers. Make life a lot simpler when we don't have to do the magic old_fb vs. fb dance around plane updates. That way we can't risk plane->fb getting out of sync with plane->state->fb and we're less likely to leak any refcounts as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180525185045.29689-14-ville.syrjala@linux.intel.com Reviewed-by: Sinclair Yeh <syeh@vmware.com>
This commit is contained in:
@@ -368,7 +368,6 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ
|
||||
struct drm_plane *plane;
|
||||
struct drm_atomic_state *state;
|
||||
int i, ret;
|
||||
unsigned int plane_mask;
|
||||
struct drm_modeset_acquire_ctx ctx;
|
||||
|
||||
drm_modeset_acquire_init(&ctx, 0);
|
||||
@@ -381,7 +380,6 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ
|
||||
|
||||
state->acquire_ctx = &ctx;
|
||||
retry:
|
||||
plane_mask = 0;
|
||||
drm_for_each_plane(plane, dev) {
|
||||
plane_state = drm_atomic_get_plane_state(state, plane);
|
||||
if (IS_ERR(plane_state)) {
|
||||
@@ -391,9 +389,6 @@ retry:
|
||||
|
||||
plane_state->rotation = DRM_MODE_ROTATE_0;
|
||||
|
||||
plane->old_fb = plane->fb;
|
||||
plane_mask |= 1 << drm_plane_index(plane);
|
||||
|
||||
/* disable non-primary: */
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
|
||||
continue;
|
||||
@@ -430,8 +425,6 @@ retry:
|
||||
ret = drm_atomic_commit(state);
|
||||
|
||||
out_state:
|
||||
drm_atomic_clean_old_fb(dev, plane_mask, ret);
|
||||
|
||||
if (ret == -EDEADLK)
|
||||
goto backoff;
|
||||
|
||||
|
Reference in New Issue
Block a user