Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

drm exynos: use drm_fb_helper_set_par directly

info->fix.visual already is correctly set from drm_fb_helper_fill_fix.
info->fix.line_length is also set from drm_fb_helper_fill_fix,
so drm_fb_helper_set_par directly instead of a custom
exynos_drm_fbdev_set_par.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
  • Loading branch information...
commit 34418c25d64844625118b5eedc493f7904d77659 1 parent f7d8607
authored Inki Dae committed
28  drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -46,39 +46,13 @@ struct exynos_drm_fbdev {
46 46
 	struct exynos_drm_gem_obj	*exynos_gem_obj;
47 47
 };
48 48
 
49  
-static int exynos_drm_fbdev_set_par(struct fb_info *info)
50  
-{
51  
-	struct fb_var_screeninfo *var = &info->var;
52  
-
53  
-	switch (var->bits_per_pixel) {
54  
-	case 32:
55  
-	case 24:
56  
-	case 18:
57  
-	case 16:
58  
-	case 12:
59  
-		info->fix.visual = FB_VISUAL_TRUECOLOR;
60  
-		break;
61  
-	case 1:
62  
-		info->fix.visual = FB_VISUAL_MONO01;
63  
-		break;
64  
-	default:
65  
-		info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
66  
-		break;
67  
-	}
68  
-
69  
-	info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
70  
-
71  
-	return drm_fb_helper_set_par(info);
72  
-}
73  
-
74  
-
75 49
 static struct fb_ops exynos_drm_fb_ops = {
76 50
 	.owner		= THIS_MODULE,
77 51
 	.fb_fillrect	= cfb_fillrect,
78 52
 	.fb_copyarea	= cfb_copyarea,
79 53
 	.fb_imageblit	= cfb_imageblit,
80 54
 	.fb_check_var	= drm_fb_helper_check_var,
81  
-	.fb_set_par	= exynos_drm_fbdev_set_par,
  55
+	.fb_set_par	= drm_fb_helper_set_par,
82 56
 	.fb_blank	= drm_fb_helper_blank,
83 57
 	.fb_pan_display	= drm_fb_helper_pan_display,
84 58
 	.fb_setcmap	= drm_fb_helper_setcmap,

0 notes on commit 34418c2

Please sign in to comment.
Something went wrong with that request. Please try again.