diff options
author | Vincent Abriou <vincent.abriou@st.com> | 2016-02-09 19:08:56 +0300 |
---|---|---|
committer | Vincent Abriou <vincent.abriou@st.com> | 2016-02-26 12:03:58 +0300 |
commit | 704cb30c5a0a2285208e5887a62d542926a52b3e (patch) | |
tree | 33c5787cd9020b1654500a5966a909fa4e0a25f2 /drivers/gpu/drm/sti | |
parent | a5b9a713f541464980d47b5cb78df7530af86437 (diff) | |
download | linux-704cb30c5a0a2285208e5887a62d542926a52b3e.tar.xz |
drm/sti: GDP cropping fails when we remove 2 pixels horizontally
GDP source width should be equal to the destination width to get
rid of this issue.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/sti')
-rw-r--r-- | drivers/gpu/drm/sti/sti_gdp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 0a696add1768..6c1a695a07e1 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -471,10 +471,6 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane, top_field->gam_gdp_pml += src_x * (bpp >> 3); top_field->gam_gdp_pml += src_y * fb->pitches[0]; - /* input parameters */ - top_field->gam_gdp_pmp = fb->pitches[0]; - top_field->gam_gdp_size = src_h << 16 | src_w; - /* output parameters (clamped / cropped) */ dst_w = sti_gdp_get_dst(gdp->dev, dst_w, src_w); dst_h = sti_gdp_get_dst(gdp->dev, dst_h, src_h); @@ -485,6 +481,11 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane, top_field->gam_gdp_vpo = (ydo << 16) | xdo; top_field->gam_gdp_vps = (yds << 16) | xds; + /* input parameters */ + src_w = dst_w; + top_field->gam_gdp_pmp = fb->pitches[0]; + top_field->gam_gdp_size = src_h << 16 | src_w; + /* Same content and chained together */ memcpy(btm_field, top_field, sizeof(*btm_field)); top_field->gam_gdp_nvn = list->btm_field_paddr; |