[21/26] drm/rockchip: Use drm_fb_helper_fill_info
diff mbox series

Message ID 20190124165831.16427-22-daniel.vetter@ffwll.ch
State New
Headers show
Series
  • Untitled series #71021
Related show

Commit Message

Daniel Vetter Jan. 24, 2019, 4:58 p.m. UTC
This will set an fb name for the first time!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
---
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Heiko Stuebner Jan. 27, 2019, 7:18 p.m. UTC | #1
Am Donnerstag, 24. Januar 2019, 17:58:26 CET schrieb Daniel Vetter:
> This will set an fb name for the first time!
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Sandy Huang <hjc@rock-chips.com>
> Cc: "Heiko Stübner" <heiko@sntech.de>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-rockchip@lists.infradead.org

After looking up the rest of the series and also realizing that
fbi->par seems to be set when a client attaches to the fb,
this looks good to me, so

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index 7bd3b89022be..d12164878e05 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -90,13 +90,11 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
>  		goto out;
>  	}
>  
> -	fbi->par = helper;
>  	fbi->flags = FBINFO_FLAG_DEFAULT;
>  	fbi->fbops = &rockchip_drm_fbdev_ops;
>  
>  	fb = helper->fb;
> -	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);
> +	drm_fb_helper_fill_info(fbi, helper);
>  
>  	offset = fbi->var.xoffset * bytes_per_pixel;
>  	offset += fbi->var.yoffset * fb->pitches[0];
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index 7bd3b89022be..d12164878e05 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -90,13 +90,11 @@  static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper,
 		goto out;
 	}
 
-	fbi->par = helper;
 	fbi->flags = FBINFO_FLAG_DEFAULT;
 	fbi->fbops = &rockchip_drm_fbdev_ops;
 
 	fb = helper->fb;
-	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);
+	drm_fb_helper_fill_info(fbi, helper);
 
 	offset = fbi->var.xoffset * bytes_per_pixel;
 	offset += fbi->var.yoffset * fb->pitches[0];