View | Details | Raw Unified | Return to bug 235363 | Differences between
and this patch

Collapse All | Expand All

(-)bcm2835_fbd.c (-1 / +8 lines)
Lines 85-91 Link Here
85
	memset(fb, 0, sizeof(*fb));
85
	memset(fb, 0, sizeof(*fb));
86
	if (bcm2835_mbox_fb_get_w_h(fb) != 0)
86
	if (bcm2835_mbox_fb_get_w_h(fb) != 0)
87
		return (ENXIO);
87
		return (ENXIO);
88
	fb->bpp = FB_DEPTH;
88
	if (bcm2835_mbox_fb_get_bpp(fb) != 0)
89
		return (ENXIO);
90
	if (fb->bpp < FB_DEPTH) {
91
		device_printf(sc->dev, "Changing fb bpp from %d to %d\n", fb->bpp, FB_DEPTH);
92
		fb->bpp = FB_DEPTH;
93
	} else {
94
		device_printf(sc->dev, "Keeping existing fb bpp of %d\n", fb->bpp);
95
	}
89
96
90
	fb->vxres = fb->xres;
97
	fb->vxres = fb->xres;
91
	fb->vyres = fb->yres;
98
	fb->vyres = fb->yres;
(-)bcm2835_mbox.c (+21 lines)
Lines 499-504 Link Here
499
}
499
}
500
500
501
int
501
int
502
bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *fb)
503
{
504
	int err;
505
	struct msg_fb_get_bpp msg;
506
	
507
	memset(&msg, 0, sizeof(msg));
508
	msg.hdr.buf_size = sizeof(msg);
509
	msg.hdr.code = BCM2835_MBOX_CODE_REQ;
510
	BCM2835_MBOX_INIT_TAG(&msg.bpp, GET_DEPTH);
511
	msg.bpp.tag_hdr.val_len = 0;
512
	msg.end_tag = 0;
513
	
514
	err = bcm2835_mbox_property(&msg, sizeof(msg));
515
	if (err == 0) {
516
		fb->bpp = msg.bpp.body.resp.bpp;
517
	}
518
	
519
	return (err);
520
}
521
522
int
502
bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb)
523
bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb)
503
{
524
{
504
	int err;
525
	int err;
(-)bcm2835_mbox_prop.h (+8 lines)
Lines 474-479 Link Here
474
474
475
int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *);
475
int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *);
476
476
477
struct msg_fb_get_bpp {
478
	struct bcm2835_mbox_hdr hdr;
479
	struct bcm2835_mbox_tag_depth bpp;
480
	uint32_t end_tag;
481
};
482
483
int bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *);
484
477
struct msg_fb_setup {
485
struct msg_fb_setup {
478
	struct bcm2835_mbox_hdr hdr;
486
	struct bcm2835_mbox_hdr hdr;
479
	struct bcm2835_mbox_tag_fb_w_h physical_w_h;
487
	struct bcm2835_mbox_tag_fb_w_h physical_w_h;

Return to bug 235363