[Intel-gfx] [PATCH 04/11] drm/i915: Update format_is_yuv() to include NV12
Chandra Konduru
chandra.konduru at intel.com
Thu Apr 30 20:43:08 PDT 2015
This patch adds NV12 to format_is_yuv() function
and made it available for both primary and sprite
planes.
Signed-off-by: Chandra Konduru <chandra.konduru at intel.com>
---
drivers/gpu/drm/i915/intel_drv.h | 1 +
drivers/gpu/drm/i915/intel_sprite.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 8079865..ccf89f8 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1376,6 +1376,7 @@ bool intel_pipe_update_start(struct intel_crtc *crtc,
void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count);
void intel_post_enable_primary(struct drm_crtc *crtc);
void intel_pre_disable_primary(struct drm_crtc *crtc);
+bool format_is_yuv(uint32_t format);
/* intel_tv.c */
void intel_tv_init(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 68de97c..5698a07 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -39,7 +39,7 @@
#include <drm/i915_drm.h>
#include "i915_drv.h"
-static bool
+bool
format_is_yuv(uint32_t format)
{
switch (format) {
@@ -47,6 +47,7 @@ format_is_yuv(uint32_t format)
case DRM_FORMAT_UYVY:
case DRM_FORMAT_VYUY:
case DRM_FORMAT_YVYU:
+ case DRM_FORMAT_NV12:
return true;
default:
return false;
--
1.7.9.5
More information about the Intel-gfx
mailing list