diff mbox

[04/11] drm/i915: Update format_is_yuv() to include NV12

Message ID 1430451795-9657-5-git-send-email-chandra.konduru@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chandra Konduru May 1, 2015, 3:43 a.m. UTC
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@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 mbox

Patch

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;