From 97eb9eaeb95ba8eb3c7a77a7ec7786d47a1bcaee Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 21 Feb 2019 12:17:32 +0200 Subject: drm: writeback: Cleanup job ownership handling when queuing job The drm_writeback_queue_job() function takes ownership of the passed job and requires the caller to manually set the connector state writeback_job pointer to NULL. To simplify drivers and avoid errors (such as the missing NULL set in the vc4 driver), pass the connector state pointer to the function instead of the job pointer, and set the writeback_job pointer to NULL internally. Signed-off-by: Laurent Pinchart Reviewed-by: Brian Starkey Acked-by: Eric Anholt Acked-by: Liviu Dudau Reviewed-by: Kieran Bingham --- drivers/gpu/drm/arm/malidp_mw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/drm/arm/malidp_mw.c') diff --git a/drivers/gpu/drm/arm/malidp_mw.c b/drivers/gpu/drm/arm/malidp_mw.c index 041a64dc7167..87627219ce3b 100644 --- a/drivers/gpu/drm/arm/malidp_mw.c +++ b/drivers/gpu/drm/arm/malidp_mw.c @@ -252,8 +252,7 @@ void malidp_mw_atomic_commit(struct drm_device *drm, &mw_state->addrs[0], mw_state->format); - drm_writeback_queue_job(mw_conn, conn_state->writeback_job); - conn_state->writeback_job = NULL; + drm_writeback_queue_job(mw_conn, conn_state); hwdev->hw->enable_memwrite(hwdev, mw_state->addrs, mw_state->pitches, mw_state->n_planes, fb->width, fb->height, mw_state->format, -- cgit