drm: Free the writeback_job when it with an empty fb
Adds the check if the writeback_job with an empty fb, then it should be freed in atomic_check phase. With this change, the driver users will not check empty fb case any more. So refined accordingly. Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com> Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/1564571048-15029-2-git-send-email-lowry.li@arm.com
This commit is contained in:

committed by
james qian wang (Arm Technology China)

parent
21670bd78a
commit
8581d51055
@@ -229,7 +229,7 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
|
||||
int i;
|
||||
|
||||
conn_state = drm_atomic_get_new_connector_state(state, conn);
|
||||
if (!conn_state->writeback_job || !conn_state->writeback_job->fb)
|
||||
if (!conn_state->writeback_job)
|
||||
return 0;
|
||||
|
||||
crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
|
||||
@@ -269,8 +269,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,
|
||||
u32 ctrl;
|
||||
int i;
|
||||
|
||||
if (WARN_ON(!conn_state->writeback_job ||
|
||||
!conn_state->writeback_job->fb))
|
||||
if (WARN_ON(!conn_state->writeback_job))
|
||||
return;
|
||||
|
||||
mode = &conn_state->crtc->state->adjusted_mode;
|
||||
|
Reference in New Issue
Block a user