diff options
author | Vincent Abriou <vincent.abriou@st.com> | 2017-02-02 03:50:48 -0500 |
---|---|---|
committer | Vincent Abriou <vincent.abriou@st.com> | 2017-02-10 03:34:39 -0500 |
commit | e9f494d36fc4cab2ba7e9e7f3bb4edf5b214f651 (patch) | |
tree | ae5e20023a96ae50af923e7943ee8ed68151d846 | |
parent | c5649ee49761f5367c46c5ae6579ab8e8b03575d (diff) |
drm/sti: do not post GDP command if no update
Do not process update requests with unmodified parameters.
This typically happens when the driver is called with legacy
(non-atomic) IOCTL : in that case atomic_update() is called multiple
times with the same parameters.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
-rw-r--r-- | drivers/gpu/drm/sti/sti_gdp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 7f6d0790cca6..86279f5022c2 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c | |||
@@ -708,6 +708,21 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane, | |||
708 | if (!crtc || !fb) | 708 | if (!crtc || !fb) |
709 | return; | 709 | return; |
710 | 710 | ||
711 | if ((oldstate->fb == state->fb) && | ||
712 | (oldstate->crtc_x == state->crtc_x) && | ||
713 | (oldstate->crtc_y == state->crtc_y) && | ||
714 | (oldstate->crtc_w == state->crtc_w) && | ||
715 | (oldstate->crtc_h == state->crtc_h) && | ||
716 | (oldstate->src_x == state->src_x) && | ||
717 | (oldstate->src_y == state->src_y) && | ||
718 | (oldstate->src_w == state->src_w) && | ||
719 | (oldstate->src_h == state->src_h)) { | ||
720 | /* No change since last update, do not post cmd */ | ||
721 | DRM_DEBUG_DRIVER("No change, not posting cmd\n"); | ||
722 | plane->status = STI_PLANE_UPDATED; | ||
723 | return; | ||
724 | } | ||
725 | |||
711 | if (!gdp->vtg) { | 726 | if (!gdp->vtg) { |
712 | struct sti_compositor *compo = dev_get_drvdata(gdp->dev); | 727 | struct sti_compositor *compo = dev_get_drvdata(gdp->dev); |
713 | struct sti_mixer *mixer = to_sti_mixer(crtc); | 728 | struct sti_mixer *mixer = to_sti_mixer(crtc); |