diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-10-18 01:41:13 +0300 |
---|---|---|
committer | Archit Taneja <architt@codeaurora.org> | 2016-10-18 15:21:49 +0530 |
commit | ba0891d1120389ad44c4f4e6d0b71f5fbcc23163 (patch) | |
tree | 8429f9abab4a247e5d0e82508b76286fab560a64 | |
parent | 333d2da5b7cf8046aee88c0412170be5f6f1ed55 (diff) | |
download | linux-ba0891d1120389ad44c4f4e6d0b71f5fbcc23163.tar.gz linux-ba0891d1120389ad44c4f4e6d0b71f5fbcc23163.tar.bz2 linux-ba0891d1120389ad44c4f4e6d0b71f5fbcc23163.zip |
drm: hdlcd: 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: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1476744081-24485-6-git-send-email-laurent.pinchart@ideasonboard.com
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_crtc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index 48019ae22ddb..bbaa55add2d2 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c @@ -223,14 +223,12 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, { struct hdlcd_drm_private *hdlcd; struct drm_gem_cma_object *gem; - unsigned int depth, bpp; u32 src_w, src_h, dest_w, dest_h; dma_addr_t scanout_start; if (!plane->state->fb) return; - drm_fb_get_bpp_depth(plane->state->fb->pixel_format, &depth, &bpp); src_w = plane->state->src_w >> 16; src_h = plane->state->src_h >> 16; dest_w = plane->state->crtc_w; @@ -238,7 +236,8 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane, gem = drm_fb_cma_get_gem_obj(plane->state->fb, 0); scanout_start = gem->paddr + plane->state->fb->offsets[0] + plane->state->crtc_y * plane->state->fb->pitches[0] + - plane->state->crtc_x * bpp / 8; + plane->state->crtc_x * + drm_format_plane_cpp(plane->state->fb->pixel_format, 0); hdlcd = plane->dev->dev_private; hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, plane->state->fb->pitches[0]); |