drm/mgag200: Set pitch in a separate helper function
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 15 May 2020 08:32:25 +0000 (10:32 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 19 May 2020 07:41:33 +0000 (09:41 +0200)
commit72a03a358c1c3d334e16b940448e3b32137e6597
treecaa4343f98dddb86f7337dc96fc3fd10a1303644
parentddb8d0520bbc6ffdf900fb2a2a21d203199c64b8
drm/mgag200: Set pitch in a separate helper function

The framebuffer's pitch is now set in mgag200_set_offset().

v2:
* move offset and bpp-shift calculation into helper functions
* use u8 instead of uint8_t
* add MGAREG_CRTCEXT0_OFFSET_MASK

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: John Donnelly <John.p.donnelly@oracle.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-8-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_mode.c
drivers/gpu/drm/mgag200/mgag200_reg.h