[Intel-gfx] [PATCH 1/3] drm/atomic-helper: Fix leak in disable_all
Chris Wilson
chris at chris-wilson.co.uk
Sat Jul 15 10:10:07 UTC 2017
Quoting Daniel Vetter (2017-07-14 23:46:54)
> @@ -2902,6 +2907,8 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
> struct drm_connector_state *new_conn_state;
> struct drm_crtc *crtc;
> struct drm_crtc_state *new_crtc_state;
> + struct drm_device *dev = state->dev;
> + int ret;
>
> state->acquire_ctx = ctx;
>
> @@ -2914,7 +2921,10 @@ int drm_atomic_helper_commit_duplicated_state(struct drm_atomic_state *state,
> for_each_new_connector_in_state(state, connector, new_conn_state, i)
> state->connectors[i].old_state = connector->state;
>
> - return drm_atomic_commit(state);
> + ret = drm_atomic_commit(state);
> + drm_atomic_clean_old_fb(dev, ~0U, ret);
I have no idea what the rules should be here. Or how it should interact
with error. Should we just try the "drm: Track framebuffer references at
the point of assignment" approach to simplify the rules (at least from
my perspective)? The problem with that patch is sorting out the state
duplication done in a couple of drivers and figuring out if they are
transferring ownership or not.
-Chris
More information about the Intel-gfx
mailing list