Re: [PATCH 19/21] drm/udl: Use drm_fb_helper_fill_info

2019-03-26 Thread Noralf Trønnes


Den 26.03.2019 14.20, skrev Daniel Vetter:
> This should not result in any changes.
> 
> v2: Rebase
> 
> Signed-off-by: Daniel Vetter 
> Cc: Dave Airlie 
> Cc: Sean Paul 
> Cc: Mikulas Patocka 
> Cc: Daniel Vetter 
> Cc: Greg Kroah-Hartman 
> Cc: Emil Lundmark 
> ---
>  drivers/gpu/drm/udl/udl_fb.c | 7 ++-
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
> index dd9ffded223b..59e005edf309 100644
> --- a/drivers/gpu/drm/udl/udl_fb.c
> +++ b/drivers/gpu/drm/udl/udl_fb.c
> @@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | 
> S_IRGRP);
>  module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
>  
>  struct udl_fbdev {
> - struct drm_fb_helper helper;
> + struct drm_fb_helper helper; /* must be first */
>   struct udl_framebuffer ufb;
>   int fb_count;
>  };
> @@ -402,15 +402,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
>  

You forgot to remove the info->par assignement here. With that:

Acked-by: Noralf Trønnes 

>   ufbdev->helper.fb = fb;
>  
> - strcpy(info->fix.id, "udldrmfb");
> -
>   info->screen_base = ufbdev->ufb.obj->vmapping;
>   info->fix.smem_len = size;
>   info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
>  
>   info->fbops = _ops;
> - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
> - drm_fb_helper_fill_var(info, >helper, sizes->fb_width, 
> sizes->fb_height);
> + drm_fb_helper_fill_info(info, >helper, sizes);
>  
>   DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
> fb->width, fb->height,
> 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 19/21] drm/udl: Use drm_fb_helper_fill_info

2019-03-26 Thread Daniel Vetter
This should not result in any changes.

v2: Rebase

Signed-off-by: Daniel Vetter 
Cc: Dave Airlie 
Cc: Sean Paul 
Cc: Mikulas Patocka 
Cc: Daniel Vetter 
Cc: Greg Kroah-Hartman 
Cc: Emil Lundmark 
---
 drivers/gpu/drm/udl/udl_fb.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index dd9ffded223b..59e005edf309 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | 
S_IRGRP);
 module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
 
 struct udl_fbdev {
-   struct drm_fb_helper helper;
+   struct drm_fb_helper helper; /* must be first */
struct udl_framebuffer ufb;
int fb_count;
 };
@@ -402,15 +402,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
 
ufbdev->helper.fb = fb;
 
-   strcpy(info->fix.id, "udldrmfb");
-
info->screen_base = ufbdev->ufb.obj->vmapping;
info->fix.smem_len = size;
info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
 
info->fbops = _ops;
-   drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-   drm_fb_helper_fill_var(info, >helper, sizes->fb_width, 
sizes->fb_height);
+   drm_fb_helper_fill_info(info, >helper, sizes);
 
DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
  fb->width, fb->height,
-- 
2.20.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel