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

Collapse All | Expand All

(-)sys/arm/broadcom/bcm2835/bcm2835_fbd.c (-1 / +7 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);
89
95
90
	fb->vxres = fb->xres;
96
	fb->vxres = fb->xres;
91
	fb->vyres = fb->yres;
97
	fb->vyres = fb->yres;
(-)sys/arm/broadcom/bcm2835/bcm2835_mbox.c (+20 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
	return (err);
519
}
520
521
int
502
bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb)
522
bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb)
503
{
523
{
504
	int err;
524
	int err;
(-)sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h (+8 lines)
Lines 475-480 Link Here
475
475
476
int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *);
476
int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *);
477
477
478
struct msg_fb_get_bpp {
479
	struct bcm2835_mbox_hdr hdr;
480
	struct bcm2835_mbox_tag_depth bpp;
481
	uint32_t end_tag;
482
};
483
484
int bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *);
485
478
struct msg_fb_setup {
486
struct msg_fb_setup {
479
	struct bcm2835_mbox_hdr hdr;
487
	struct bcm2835_mbox_hdr hdr;
480
	struct bcm2835_mbox_tag_fb_w_h physical_w_h;
488
	struct bcm2835_mbox_tag_fb_w_h physical_w_h;

Return to bug 235363