[PATCH 6/8] drm/fb-cma-helper: Drop unnecessary fbdev buffer offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop the unnecessary fbdev buffer offset, it can only be zero since
drm_fb_helper_fill_var() sets xoffset and yoffset to zero;

Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
---
 drivers/gpu/drm/drm_fb_cma_helper.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index f0a2863..49623a4 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -316,7 +316,6 @@ drm_fbdev_cma_create(struct drm_fb_helper *helper,
 	struct drm_gem_cma_object *obj;
 	struct drm_framebuffer *fb;
 	unsigned int bytes_per_pixel;
-	unsigned long offset;
 	struct fb_info *fbi;
 	size_t size;
 	u32 format;
@@ -352,12 +351,9 @@ drm_fbdev_cma_create(struct drm_fb_helper *helper,
 	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
 	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
 
-	offset = fbi->var.xoffset * bytes_per_pixel;
-	offset += fbi->var.yoffset * fb->pitches[0];
-
 	dev->mode_config.fb_base = (resource_size_t)obj->paddr;
-	fbi->screen_base = obj->vaddr + offset;
-	fbi->fix.smem_start = (unsigned long)(obj->paddr + offset);
+	fbi->screen_base = obj->vaddr;
+	fbi->fix.smem_start = (unsigned long)obj->paddr;
 	fbi->screen_size = size;
 	fbi->fix.smem_len = size;
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux