summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-09 02:32:11 +0300
committerVincent Abriou <vincent.abriou@st.com>2016-09-20 12:32:04 +0300
commitd27cd40addc06d34236bf818abcbe76f3527a69d (patch)
treee6b6951e103583b59aacce7a099bec24c4af88d2 /drivers/gpu/drm/sti
parent26e34d2d8ba7aca0fe86e5362ce5811749df77b2 (diff)
downloadlinux-d27cd40addc06d34236bf818abcbe76f3527a69d.tar.xz
drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
Diffstat (limited to 'drivers/gpu/drm/sti')
-rw-r--r--drivers/gpu/drm/sti/sti_gdp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index b8d942ca45e8..3fc62c1ea9c2 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -719,7 +719,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,
u32 dma_updated_top;
u32 dma_updated_btm;
int format;
- unsigned int depth, bpp;
+ unsigned int bpp;
u32 ydo, xdo, yds, xds;
if (!crtc || !fb)
@@ -758,9 +758,9 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,
(unsigned long)cma_obj->paddr);
/* pixel memory location */
- drm_fb_get_bpp_depth(fb->pixel_format, &depth, &bpp);
+ bpp = drm_format_plane_cpp(fb->pixel_format, 0);
top_field->gam_gdp_pml = (u32)cma_obj->paddr + fb->offsets[0];
- top_field->gam_gdp_pml += src_x * (bpp >> 3);
+ top_field->gam_gdp_pml += src_x * bpp;
top_field->gam_gdp_pml += src_y * fb->pitches[0];
/* output parameters (clamped / cropped) */