FreeBSD Bugzilla – Attachment 206862 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]
Same patch as the previous, but with fixed formatting
bcm2835.patch (text/plain), 1.81 KB, created by
Florian Märkl
on 2019-08-24 20:04:46 UTC
(
hide
)
Description:
Same patch as the previous, but with fixed formatting
Filename:
MIME Type:
Creator:
Florian Märkl
Created:
2019-08-24 20:04:46 UTC
Size:
1.81 KB
patch
obsolete
>Index: bcm2835_fbd.c >=================================================================== >--- bcm2835_fbd.c (Revision 351452) >+++ bcm2835_fbd.c (Arbeitskopie) >@@ -85,7 +85,14 @@ > 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: bcm2835_mbox.c >=================================================================== >--- bcm2835_mbox.c (Revision 351452) >+++ bcm2835_mbox.c (Arbeitskopie) >@@ -499,6 +499,27 @@ > } > > 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: bcm2835_mbox_prop.h >=================================================================== >--- bcm2835_mbox_prop.h (Revision 351452) >+++ bcm2835_mbox_prop.h (Arbeitskopie) >@@ -474,6 +474,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;
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