1
0
Fork 0
Commit Graph

4 Commits (de6cc6515a445d5d81cad2dee899a0be1a6317f8)

Author SHA1 Message Date
Laurent Pinchart e482ae9b5f drm: writeback: Fix leak of writeback job
Writeback jobs are allocated when the WRITEBACK_FB_ID is set, and
deleted when the jobs complete. This results in both a memory leak of
the job and a leak of the framebuffer if the atomic commit returns
before the job is queued for processing, for instance if the atomic
check fails or if the commit runs in test-only mode.

Fix this by implementing the drm_writeback_cleanup_job() function and
calling it from __drm_atomic_helper_connector_destroy_state(). As
writeback jobs are removed from the state when they're queued for
processing, any job left in the state when the state gets destroyed
needs to be cleaned up.

The existing declaration of the drm_writeback_cleanup_job() function
without an implementation hints that this problem was considered, but
never addressed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
2019-03-18 17:24:32 +02:00
Deepak Rawat c75ff001f4 drm: Put damage blob when destroy plane state
Somehow the code to put the damage blob on destroy plane state and set
the blob to NULL when duplicate plane state was not merged. May be
because the files are refactored since the patch was written. With this
fix add those.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Fixes: d3b2176782 ("drm: Add a new plane property to send damage during plane update")
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181221193559.4346-1-drawat@vmware.com
2018-12-24 11:53:50 +01:00
Daniel Vetter 1d8224e790 drm: Fix up drm_atomic_state_helper.[hc] extraction
I've misplaced two functions by accident:
- drm_atomic_helper_duplicate_state is really part of the
  resume/suspend/shutdown device-wide helpers.
- drm_atomic_helper_legacy_gamma_set is part of the legacy ioctl
  compat helpers.

Move them both back.

Fixes: 9ef8a9dc4b ("drm: Extract drm_atomic_state_helper.[hc]")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181128100728.4674-1-daniel.vetter@ffwll.ch
2018-11-30 16:37:52 +01:00
Daniel Vetter 9ef8a9dc4b drm: Extract drm_atomic_state_helper.[hc]
We already have a separate overview doc for this, makes sense to
untangle it from the overall atomic helpers.

v2: Rebase

v3: Rebase more.

Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004202446.22905-4-daniel.vetter@ffwll.ch
2018-10-05 18:04:09 +02:00