drivers/lcd_framebuffer.c: If BPP is less then 8, then we need to byte-align the update region.
This commit is contained in:
parent
a645b18860
commit
9a4c3bbe99
@ -215,6 +215,16 @@ static void lcdfb_update(FAR struct lcdfb_dev_s *priv,
|
||||
endy = priv->yres-1;
|
||||
}
|
||||
|
||||
/* If the display uses a value of BPP < 8, then we may have to extend the
|
||||
* rectangle on the left so that it is byte aligned. Works for BPP={1,2,4}
|
||||
*/
|
||||
|
||||
if (pinfo->bpp < 8)
|
||||
{
|
||||
unsigned int pixperbyte = 8 / pinfo->bpp;
|
||||
startx &= ~(pixperbyte - 1);
|
||||
}
|
||||
|
||||
/* Get the starting position in the framebuffer */
|
||||
|
||||
run = priv->fbmem + starty * priv->stride;
|
||||
|
Loading…
Reference in New Issue
Block a user