drm/msm/sde: avoid fence creation if property reset
Avoid creating fence on crtc and connector if property reset value set. This will avoid creating get_unsed_fd on dying process. Change-Id: Id4e898c55167b3568962384cade5e60b38c30468 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org> Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
This commit is contained in:
parent
d9f7a5cfa7
commit
6e84efb6ff
2 changed files with 6 additions and 0 deletions
|
@ -474,6 +474,9 @@ static int sde_connector_atomic_set_property(struct drm_connector *connector,
|
|||
}
|
||||
break;
|
||||
case CONNECTOR_PROP_RETIRE_FENCE:
|
||||
if (!val)
|
||||
goto end;
|
||||
|
||||
rc = sde_fence_create(&c_conn->retire_fence, &fence_fd, 0);
|
||||
if (rc) {
|
||||
SDE_ERROR("fence create failed rc:%d\n", rc);
|
||||
|
|
|
@ -1761,6 +1761,9 @@ static int sde_crtc_atomic_set_property(struct drm_crtc *crtc,
|
|||
_sde_crtc_set_input_fence_timeout(cstate);
|
||||
break;
|
||||
case CRTC_PROP_OUTPUT_FENCE:
|
||||
if (!val)
|
||||
goto exit;
|
||||
|
||||
ret = _sde_crtc_get_output_fence(crtc,
|
||||
state, &fence_fd);
|
||||
if (ret) {
|
||||
|
|
Loading…
Add table
Reference in a new issue