[RFC 2/7] drm: Add GEM backed framebuffer library

Eric Anholt eric at anholt.net
Wed Jul 19 20:59:34 UTC 2017


Noralf Trønnes <noralf at tronnes.org> writes:

> Den 12.07.2017 15.46, skrev Noralf Trønnes:
>> Add a library for drivers that can use a simple representation
>> of a GEM backed framebuffer.
>>
>> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
>> ---
>
> This patch adds a gem backed drm_framebuffer like this:
>
> struct drm_fb_gem {
>      /**
>       * @base: Base DRM framebuffer
>       */
>      struct drm_framebuffer base;
>      /**
>       * @obj: GEM object array backing the framebuffer. One object per
>       * plane.
>       */
>      struct drm_gem_object *obj[4];
> };
>
> Now I wonder if it would be better to extend drm_framebuffer instead:
>
>   struct drm_framebuffer {
> +    /**
> +     * @obj: GEM objects backing the framebuffer, one per plane (optional).
> +     */
> +    struct drm_gem_object *obj[4];
>   };

FWIW, I would love to see this tried.  I think we would end up with some
nice cleanups if we did so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170719/92f36bcd/attachment.sig>


More information about the dri-devel mailing list