FreeBSD Bugzilla – Attachment 215211 Details for
Bug 235363
Hard coded bcm2835 framebuffer bpp breaks Qt QImage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
rpi12-fb-inherit.patch
rpi12-fb-inherit.patch (text/plain), 2.29 KB, created by
Oleksandr Tymoshenko
on 2020-06-04 04:01:05 UTC
(
hide
)
Description:
rpi12-fb-inherit.patch
Filename:
MIME Type:
Creator:
Oleksandr Tymoshenko
Created:
2020-06-04 04:01:05 UTC
Size:
2.29 KB
patch
obsolete
>Index: sys/arm/broadcom/bcm2835/bcm2835_fbd.c >=================================================================== >--- sys/arm/broadcom/bcm2835/bcm2835_fbd.c (revision 361782) >+++ sys/arm/broadcom/bcm2835/bcm2835_fbd.c (working copy) >@@ -85,7 +85,13 @@ > memset(fb, 0, sizeof(*fb)); > if (bcm2835_mbox_fb_get_w_h(fb) != 0) > return (ENXIO); >- fb->bpp = FB_DEPTH; >+ if (bcm2835_mbox_fb_get_bpp(fb) != 0) >+ return (ENXIO); >+ if (fb->bpp < FB_DEPTH) { >+ device_printf(sc->dev, "changing fb bpp from %d to %d\n", fb->bpp, FB_DEPTH); >+ fb->bpp = FB_DEPTH; >+ } else >+ device_printf(sc->dev, "keeping existing fb bpp of %d\n", fb->bpp); > > fb->vxres = fb->xres; > fb->vyres = fb->yres; >Index: sys/arm/broadcom/bcm2835/bcm2835_mbox.c >=================================================================== >--- sys/arm/broadcom/bcm2835/bcm2835_mbox.c (revision 361782) >+++ sys/arm/broadcom/bcm2835/bcm2835_mbox.c (working copy) >@@ -499,6 +499,26 @@ > } > > int >+bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *fb) >+{ >+ int err; >+ struct msg_fb_get_bpp msg; >+ >+ memset(&msg, 0, sizeof(msg)); >+ msg.hdr.buf_size = sizeof(msg); >+ msg.hdr.code = BCM2835_MBOX_CODE_REQ; >+ BCM2835_MBOX_INIT_TAG(&msg.bpp, GET_DEPTH); >+ msg.bpp.tag_hdr.val_len = 0; >+ msg.end_tag = 0; >+ >+ err = bcm2835_mbox_property(&msg, sizeof(msg)); >+ if (err == 0) >+ fb->bpp = msg.bpp.body.resp.bpp; >+ >+ return (err); >+} >+ >+int > bcm2835_mbox_fb_init(struct bcm2835_fb_config *fb) > { > int err; >Index: sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h >=================================================================== >--- sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h (revision 361782) >+++ sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h (working copy) >@@ -475,6 +475,14 @@ > > int bcm2835_mbox_fb_get_w_h(struct bcm2835_fb_config *); > >+struct msg_fb_get_bpp { >+ struct bcm2835_mbox_hdr hdr; >+ struct bcm2835_mbox_tag_depth bpp; >+ uint32_t end_tag; >+}; >+ >+int bcm2835_mbox_fb_get_bpp(struct bcm2835_fb_config *); >+ > struct msg_fb_setup { > struct bcm2835_mbox_hdr hdr; > struct bcm2835_mbox_tag_fb_w_h physical_w_h; >Index: . >=================================================================== >--- . (revision 361782) >+++ . (working copy) > >Property changes on: . >___________________________________________________________________ >Modified: svn:mergeinfo >## -0,0 +0,1 ## > Merged /head:r352028
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235363
:
201574
|
206862
| 215211