diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-08-20 20:05:56 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-10-04 10:06:00 +0900 |
commit | 01ed812671c1163b35bf6ce9be221bd371bf9a8f (patch) | |
tree | f79d48db7a6ae3cda29beedb9a827e7ea45ba87f /drivers/gpu/drm/exynos/exynos_drm_fb.h | |
parent | 3d05859fd78bbc0b04cca929aea494f5e6b8235b (diff) | |
download | blackbird-op-linux-01ed812671c1163b35bf6ce9be221bd371bf9a8f.tar.gz blackbird-op-linux-01ed812671c1163b35bf6ce9be221bd371bf9a8f.zip |
drm/exynos: check NV12M format specific to Exynos properly
this patch adds buf_cnt variable in exynos_drm_fb structure and
that means a buffer count to drm framebuffer and also adds two
functions to get/set the buffer count from/to exynos_drm_fb structure.
if pixel format is not DRM_FORMAT_NV12MT then it gets a buffer count
to drm framebuffer refering to mode_cmd->handles and offsets.
but when booted, the buffer count will always be 1 because pixel
format of console framebuffer is RGB format.
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 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h index 50823756cdea..96262e54f76d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h @@ -28,19 +28,6 @@ #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_NV12: - case DRM_FORMAT_NV12MT: - return 2; - case DRM_FORMAT_YUV420: - return 3; - default: - return 1; - } -} - struct drm_framebuffer * exynos_drm_framebuffer_init(struct drm_device *dev, struct drm_mode_fb_cmd2 *mode_cmd, @@ -52,4 +39,11 @@ struct exynos_drm_gem_buf *exynos_drm_fb_buffer(struct drm_framebuffer *fb, void exynos_drm_mode_config_init(struct drm_device *dev); +/* set a buffer count to drm framebuffer. */ +void exynos_drm_fb_set_buf_cnt(struct drm_framebuffer *fb, + unsigned int cnt); + +/* get a buffer count to drm framebuffer. */ +unsigned int exynos_drm_fb_get_buf_cnt(struct drm_framebuffer *fb); + #endif |