diff options
| author | Lloyd Atkinson <latkinso@codeaurora.org> | 2016-07-14 17:42:41 -0400 |
|---|---|---|
| committer | Clarence Ip <cip@codeaurora.org> | 2016-08-10 11:44:42 -0400 |
| commit | 0f5a4c99451fed56747258004521dcd28f759aa1 (patch) | |
| tree | 732b8197d0fbd6b45b3e76416b6cc3ddbc909363 /drivers/gpu | |
| parent | 547b234301e7814762287547580239f258462948 (diff) | |
drm/msm/sde: trigger plane modeset on buffer pitch change
Need to check the buffer pitches and trigger a source rectangle
update if they change to avoid possible smmu faults.
Change-Id: I6d692e7e1d8090c8dc7a11eee7f6c3643edc71ff
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_plane.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index ac1abb44d121..1be9a8caf6e4 100644 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -842,7 +842,9 @@ static void _sde_plane_atomic_check_mode_changed(struct sde_plane *psde, } else if (state->fb->pixel_format != old_state->fb->pixel_format) { DBG("%s: format change!", psde->pipe_name); pstate->mode_changed = true; - } else { + } + + if (!pstate->mode_changed) { uint64_t *new_mods = state->fb->modifier; uint64_t *old_mods = old_state->fb->modifier; int i; @@ -856,6 +858,22 @@ static void _sde_plane_atomic_check_mode_changed(struct sde_plane *psde, } } } + + if (!pstate->mode_changed) { + uint32_t *new_pitches = state->fb->pitches; + uint32_t *old_pitches = old_state->fb->pitches; + int i; + + for (i = 0; i < ARRAY_SIZE(state->fb->pitches); i++) { + if (new_pitches[i] != old_pitches[i]) { + DBG("%s: pitches change plane %d: %u, %u", + psde->pipe_name, i, old_pitches[i], + new_pitches[i]); + pstate->mode_changed = true; + break; + } + } + } } static int sde_plane_atomic_check(struct drm_plane *plane, |
