]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/vram: Support scanline alignment for dumb buffers
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 3 Dec 2019 08:38:17 +0000 (09:38 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 6 Jan 2020 12:46:03 +0000 (13:46 +0100)
commit987073278624738573a845c85c4b0db6faaf7be0
tree841437d191bcba6491fb4a5cf90e7d118b2d3a2e
parent3e10d2ffd245f996c36f87b0a8027a719e6135c3
drm/vram: Support scanline alignment for dumb buffers

Adding the pitch alignment as an argument to
drm_gem_vram_fill_create_dumb() allows to align scanlines to certain
offsets. A value of 0 disables scanline pitches.

v3:
* only do power-of-2 test if pitch_align given; fails otherwise
* mgag200: call drm_gem_vram_fill_create_dumb() with pitch_align
v2:
* split of patch from related hibmc changes
* test if scanline pitch is power of 2

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-4-tzimmermann@suse.de
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/mgag200/mgag200_drv.c
include/drm/drm_gem_vram_helper.h