diff mbox

[1/5] drm/cma: use correct fb width/height

Message ID 1425676990-14341-2-git-send-email-robdclark@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rob Clark March 6, 2015, 9:23 p.m. UTC
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart March 7, 2015, 5:56 p.m. UTC | #1
Hi Rob,

Thank you for the patch.

On Friday 06 March 2015 16:23:06 Rob Clark wrote:

This deserves an explanation, the reason why this fix is needed is far from 
clear from the code only.

> Signed-off-by: Rob Clark <robdclark@gmail.com>
> ---
>  drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c
> b/drivers/gpu/drm/drm_fb_cma_helper.c index cc0ae04..5c1aca4 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -304,7 +304,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, sizes->fb_width, sizes->fb_height);
> 
>  	offset = fbi->var.xoffset * bytes_per_pixel;
>  	offset += fbi->var.yoffset * fb->pitches[0];
Rob Clark March 7, 2015, 6:35 p.m. UTC | #2
On Sat, Mar 7, 2015 at 12:56 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Rob,
>
> Thank you for the patch.
>
> On Friday 06 March 2015 16:23:06 Rob Clark wrote:
>
> This deserves an explanation, the reason why this fix is needed is far from
> clear from the code only.
>

as discussed on irc, I'll add a patch that kerneldoc's 'struct
drm_fb_helper_surface_size' and some commit msgs and re-send the
series

BR,
-R

>> Signed-off-by: Rob Clark <robdclark@gmail.com>
>> ---
>>  drivers/gpu/drm/drm_fb_cma_helper.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c
>> b/drivers/gpu/drm/drm_fb_cma_helper.c index cc0ae04..5c1aca4 100644
>> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
>> @@ -304,7 +304,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, sizes->fb_width, sizes->fb_height);
>>
>>       offset = fbi->var.xoffset * bytes_per_pixel;
>>       offset += fbi->var.yoffset * fb->pitches[0];
>
> --
> Regards,
>
> Laurent Pinchart
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index cc0ae04..5c1aca4 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -304,7 +304,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, sizes->fb_width, sizes->fb_height);
 
 	offset = fbi->var.xoffset * bytes_per_pixel;
 	offset += fbi->var.yoffset * fb->pitches[0];