提交 da558398 编写于 作者: T Takashi Iwai 提交者: Dave Airlie

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: NEgbert Eich <eich@suse.de>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 3d5a1c5e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册