summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2017-06-13 12:18:03 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2017-06-21 10:30:01 +0100
commit49a58f26af7b5ee28ea8788fcd2bb7b590c711c5 (patch)
treec871ae0cfb520c1a1ee6e449738b8e4488c28cd3 /drivers/gpu/drm/arm
parentde5cc8155cd250a31da67dea49aff7637ce98887 (diff)
drm/arm: hdlcd: Use CMA helper for plane buffer address calculation
CMA has gained a recent helper function for calculating the start of the plane buffer's physical address. Use that instead of the hand rolled version. Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_crtc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c
index 1a3359c0f6cd..0128ebd318f5 100644
--- a/drivers/gpu/drm/arm/hdlcd_crtc.c
+++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
@@ -261,21 +261,14 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane,
{
struct drm_framebuffer *fb = plane->state->fb;
struct hdlcd_drm_private *hdlcd;
- struct drm_gem_cma_object *gem;
u32 src_x, src_y, dest_h;
dma_addr_t scanout_start;
if (!fb)
return;
- src_x = plane->state->src.x1 >> 16;
- src_y = plane->state->src.y1 >> 16;
dest_h = drm_rect_height(&plane->state->dst);
- gem = drm_fb_cma_get_gem_obj(fb, 0);
-
- scanout_start = gem->paddr + fb->offsets[0] +
- src_y * fb->pitches[0] +
- src_x * fb->format->cpp[0];
+ scanout_start = drm_fb_cma_get_gem_addr(fb, plane->state, 0);
hdlcd = plane->dev->dev_private;
hdlcd_write(hdlcd, HDLCD_REG_FB_LINE_LENGTH, fb->pitches[0]);