summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.com>2013-07-17 15:07:26 +0200
committerDave Airlie <airlied@redhat.com>2013-07-30 09:44:30 +1000
commitda55839870263563cc70e700a7f58090a860576d (patch)
tree6b89810f61008e81d4a7e6393a33b4464f34cdcb /drivers/gpu/drm
parent3d5a1c5e300483df005c81c55792268d4a7bff9f (diff)
downloadblackbird-op-linux-da55839870263563cc70e700a7f58090a860576d.tar.gz
blackbird-op-linux-da55839870263563cc70e700a7f58090a860576d.zip
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 <eich@suse.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 020a62377ff0..c8983f92bc67 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -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);
OpenPOWER on IntegriCloud