File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ struct drm_minor;
43
43
* @broken_vblank: the vblank IRQ is broken on this variant
44
44
* @formats: array of supported pixel formats on this variant
45
45
* @nformats: the length of the array of supported pixel formats
46
+ * @fb_bpp: desired bits per pixel on the default framebuffer
46
47
*/
47
48
struct pl111_variant_data {
48
49
const char * name ;
@@ -52,6 +53,7 @@ struct pl111_variant_data {
52
53
bool broken_vblank ;
53
54
const u32 * formats ;
54
55
unsigned int nformats ;
56
+ unsigned int fb_bpp ;
55
57
};
56
58
57
59
struct pl111_drm_dev_private {
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ static int pl111_modeset_init(struct drm_device *dev)
192
192
193
193
drm_mode_config_reset (dev );
194
194
195
- drm_fb_cma_fbdev_init (dev , 32 , 0 );
195
+ drm_fb_cma_fbdev_init (dev , priv -> variant -> fb_bpp , 0 );
196
196
197
197
drm_kms_helper_poll_init (dev );
198
198
@@ -336,6 +336,7 @@ static const struct pl111_variant_data pl110_variant = {
336
336
.is_pl110 = true,
337
337
.formats = pl110_pixel_formats ,
338
338
.nformats = ARRAY_SIZE (pl110_pixel_formats ),
339
+ .fb_bpp = 16 ,
339
340
};
340
341
341
342
/* RealView, Versatile Express etc use this modern variant */
@@ -360,6 +361,7 @@ static const struct pl111_variant_data pl111_variant = {
360
361
.name = "PL111" ,
361
362
.formats = pl111_pixel_formats ,
362
363
.nformats = ARRAY_SIZE (pl111_pixel_formats ),
364
+ .fb_bpp = 32 ,
363
365
};
364
366
365
367
static const struct amba_id pl111_id_table [] = {
Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ static const struct pl111_variant_data pl110_integrator = {
241
241
.broken_vblank = true,
242
242
.formats = pl110_integrator_pixel_formats ,
243
243
.nformats = ARRAY_SIZE (pl110_integrator_pixel_formats ),
244
+ .fb_bpp = 16 ,
244
245
};
245
246
246
247
/*
@@ -253,6 +254,7 @@ static const struct pl111_variant_data pl110_versatile = {
253
254
.external_bgr = true,
254
255
.formats = pl110_versatile_pixel_formats ,
255
256
.nformats = ARRAY_SIZE (pl110_versatile_pixel_formats ),
257
+ .fb_bpp = 16 ,
256
258
};
257
259
258
260
int pl111_versatile_init (struct device * dev , struct pl111_drm_dev_private * priv )
You can’t perform that action at this time.
0 commit comments