diff options
| author | Clarence Ip <cip@codeaurora.org> | 2016-09-29 15:58:00 -0400 |
|---|---|---|
| committer | Clarence Ip <cip@codeaurora.org> | 2016-10-03 18:18:53 -0400 |
| commit | 998f933826fc282e078eea680f4a7a1d70a1faf3 (patch) | |
| tree | ee848cb7e074e26aa1514d6b95776ac9f398e1c9 | |
| parent | fc2ed9a426a0e1ac1c7316505c91efb7b88bcb15 (diff) | |
drm/msm/sde: don't duplicate input fence pointer with state
Avoid duplicating the input fence structure within the plane
driver's duplicate state callback. The user context is not
always available at this point and the pointer can't be
safely copied without taking an extra reference to it.
Change-Id: I0aeb4f83b871e4c9add95113ffc80f10b56f51a6
Signed-off-by: Clarence Ip <cip@codeaurora.org>
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_plane.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index 606b0576fc9f..dbc531b68d66 100644 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -1775,6 +1775,7 @@ sde_plane_duplicate_state(struct drm_plane *plane) struct sde_plane *psde; struct sde_plane_state *pstate; struct sde_plane_state *old_state; + uint64_t input_fence_default; if (!plane || !plane->state) return NULL; @@ -1795,12 +1796,12 @@ sde_plane_duplicate_state(struct drm_plane *plane) if (pstate->base.fb) drm_framebuffer_reference(pstate->base.fb); - /* add ref count for fence */ - if (pstate->input_fence) { - pstate->input_fence = 0; - _sde_plane_set_input_fence(plane, pstate, pstate-> - property_values[PLANE_PROP_INPUT_FENCE]); - } + /* clear out any input fence */ + pstate->input_fence = 0; + input_fence_default = msm_property_get_default( + &psde->property_info, PLANE_PROP_INPUT_FENCE); + msm_property_set_property(&psde->property_info, pstate->property_values, + PLANE_PROP_INPUT_FENCE, input_fence_default); pstate->dirty = 0x0; pstate->pending = false; |
