Search
SailfishOS Open Build Service
>
Projects
>
home:mike7b4
:
bbb
>
kernel-adaptation-bbb-v3.14
> 0001-HACK-drm-fb_helper-enable-panning-support.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0001-HACK-drm-fb_helper-enable-panning-support.patch of Package kernel-adaptation-bbb-v3.14
From d9d8fea4c60b3a44e8660408eb9337413b108b15 Mon Sep 17 00:00:00 2001 From: Darren Etheridge <detheridge@ti.com> Date: Thu, 24 Jul 2014 11:49:28 -0500 Subject: [PATCH 1/6] HACK: drm/fb_helper: enable panning support Increase the size of the buffer that is created in the fbdev emulation helpers. And fill in the var structure with the amount that was allocated. Signed-off-by: Darren Etheridge <detheridge@ti.com> --- drivers/gpu/drm/drm_fb_cma_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c index 61b5a47..2e2c489 100644 --- a/drivers/gpu/drm/drm_fb_cma_helper.c +++ b/drivers/gpu/drm/drm_fb_cma_helper.c @@ -25,6 +25,12 @@ #include <drm/drm_fb_cma_helper.h> #include <linux/module.h> +/* + * number of buffers to allocate from CMA pool, often increased for + * double/triple buffering + */ +#define DRM_NUM_FBDEV_BUFFERS 3 + struct drm_fb_cma { struct drm_framebuffer fb; struct drm_gem_cma_object *obj[4]; @@ -265,7 +271,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); mode_cmd.width = sizes->surface_width; - mode_cmd.height = sizes->surface_height; + mode_cmd.height = sizes->surface_height * DRM_NUM_FBDEV_BUFFERS; mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel; mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth); @@ -304,7 +310,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, } drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth); - drm_fb_helper_fill_var(fbi, helper, fb->width, fb->height); + drm_fb_helper_fill_var(fbi, helper, fb->width, sizes->surface_height); offset = fbi->var.xoffset * bytes_per_pixel; offset += fbi->var.yoffset * fb->pitches[0]; -- 1.9.1