mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drm/mgag200: Fix framebuffer pitch calculation
The framebuffer pitch calculation needs to be done differently for bpp == 24 - check xf86-video-mga for reference. Signed-off-by: Egbert Eich <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
This commit is contained in:
parent
3d5a1c5e30
commit
da55839870
1 changed files with 1 additions and 1 deletions
|
|
@ -877,7 +877,7 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
|
|||
|
||||
pitch = crtc->fb->pitches[0] / (crtc->fb->bits_per_pixel / 8);
|
||||
if (crtc->fb->bits_per_pixel == 24)
|
||||
pitch = pitch >> (4 - bppshift);
|
||||
pitch = (pitch * 3) >> (4 - bppshift);
|
||||
else
|
||||
pitch = pitch >> (4 - bppshift);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue