You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
917 B

  1. --- a/src/serdisp_specific_framebuffer.c
  2. +++ b/src/serdisp_specific_framebuffer.c
  3. @@ -312,13 +312,15 @@ serdisp_t* serdisp_framebuffer_setup(con
  4. if (fb_success) {
  5. /* check if colour mode is supported */
  6. - if (! (vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
  7. + if (! (vinfo.bits_per_pixel == 1 ||vinfo.bits_per_pixel == 16 || vinfo.bits_per_pixel == 24 || vinfo.bits_per_pixel == 32) ) {
  8. sd_error(SERDISP_ERUNTIME, "unsupported colour depth (%d)", vinfo.bits_per_pixel);
  9. fb_success = 0;
  10. }
  11. }
  12. -
  13. - dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
  14. + if (vinfo.bits_per_pixel == 1)
  15. + dd->scrbuf_size = (vinfo.xres * vinfo.yres) / 8;
  16. + else
  17. + dd->scrbuf_size = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel/8;
  18. if (fb_success) {
  19. /* map framebuffer device to memory */