]> git.baikalelectronics.ru Git - kernel.git/commit
drm/core: Allow drivers allocate a subclass of struct drm_framebuffer
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Wed, 11 Mar 2020 14:55:36 +0000 (15:55 +0100)
committerAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Wed, 18 Mar 2020 10:21:32 +0000 (11:21 +0100)
commitf2b816d78a94319b7230430c3d1f99d9f1cb5bd0
treef543a58e44d640501c05573df27f8a0151c535ec
parent51b8479ab20ba3804348824c63abdb3f35b0aaeb
drm/core: Allow drivers allocate a subclass of struct drm_framebuffer

Allow allocating a specialized version of struct drm_framebuffer
by moving the actual fb allocation out of drm_gem_fb_create_with_funcs();
the respective functions names are adjusted to reflect that fact.
Please note, though, that standard size checks are performed on buffers,
so the drm_gem_fb_init_with_funcs() is useful for cases where those
standard size checks are appropriate or at least don't conflict the
checks to be performed in the specialized case.

Thanks to this change the drivers can call drm_gem_fb_init_with_funcs()
having allocated their special version of struct drm_framebuffer, exactly
the way the new version of drm_gem_fb_create_with_funcs() does.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: James Qian Wang <james.qian.wang@arm.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200311145541.29186-2-andrzej.p@collabora.com
drivers/gpu/drm/drm_gem_framebuffer_helper.c
include/drm/drm_gem_framebuffer_helper.h