diff options
author | Takashi Iwai <tiwai@suse.com> | 2013-07-17 15:07:26 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-07-30 09:44:30 +1000 |
commit | da55839870263563cc70e700a7f58090a860576d (patch) | |
tree | 6b89810f61008e81d4a7e6393a33b4464f34cdcb /drivers/gpu/drm/mgag200/mgag200_mode.c | |
parent | 3d5a1c5e300483df005c81c55792268d4a7bff9f (diff) | |
download | linux-da55839870263563cc70e700a7f58090a860576d.tar.gz |
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/mgag200/mgag200_mode.c')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_mode.c | 2 |
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); |