Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2012 Russell King
0004  */
0005 #ifndef ARMADA_FB_H
0006 #define ARMADA_FB_H
0007 
0008 #include <drm/drm_framebuffer.h>
0009 
0010 struct armada_framebuffer {
0011     struct drm_framebuffer  fb;
0012     uint8_t         fmt;
0013     uint8_t         mod;
0014 };
0015 #define drm_fb_to_armada_fb(dfb) \
0016     container_of(dfb, struct armada_framebuffer, fb)
0017 #define drm_fb_obj(fb) drm_to_armada_gem((fb)->obj[0])
0018 
0019 struct armada_framebuffer *armada_framebuffer_create(struct drm_device *,
0020     const struct drm_mode_fb_cmd2 *, struct armada_gem_object *);
0021 struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
0022     struct drm_file *dfile, const struct drm_mode_fb_cmd2 *mode);
0023 #endif