diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2011-12-15 09:36:22 +0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2011-12-29 06:21:42 +0400 |
commit | 229d3534f5bd73fe6247a9e2a92ab0ef69fbc980 (patch) | |
tree | 29adacc9826be07a9628ef7fedeb6dc85ca9db63 /drivers/gpu/drm/exynos/exynos_drm_fb.h | |
parent | 83052d4d5cd518332440bb4ee63d68bb5f744e0f (diff) | |
download | linux-229d3534f5bd73fe6247a9e2a92ab0ef69fbc980.tar.xz |
drm/exynos: Support multi buffers
These formats(NV12M, NV12MT and YUV420M) have non contiguous multi
planes, so each plane uses different buffer. The exynos drm should
support multi buffer for them.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_fb.h')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fb.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h index 8b3e12f97719..3ecb30d93552 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h @@ -28,11 +28,28 @@ #ifndef _EXYNOS_DRM_FB_H_ #define _EXYNOS_DRM_FB_H +static inline int exynos_drm_format_num_buffers(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_NV12M: + case DRM_FORMAT_NV12MT: + return 2; + case DRM_FORMAT_YUV420M: + return 3; + default: + return 1; + } +} + struct drm_framebuffer * exynos_drm_framebuffer_init(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object *obj); +/* get memory information of a drm framebuffer */ +struct exynos_drm_gem_buf *exynos_drm_fb_buffer(struct drm_framebuffer *fb, + int index); + void exynos_drm_mode_config_init(struct drm_device *dev); #endif |