From: Chandra Konduru <chandra.kond...@intel.com>

This patch adds NV12 to format_is_yuv() function
for sprite planes.

v2:
-Use intel_ prefix for format_is_yuv (Ville)

v3: Rebased (me)

v4: Rebased and addressed review comments from Clinton A Taylor.
        "static function in intel_sprite.c is not available
        to the primary plane functions".
        Changed commit message - function modified for
        sprite planes.

v5: Missed the Tested-by/Reviewed-by in the previous series
        Adding the same to commit message in this version.

v6: Rebased (me)

v7: Rebased (me)

Tested-by: Clinton Taylor <clinton.a.tay...@intel.com>
Reviewed-by: Clinton Taylor <clinton.a.tay...@intel.com>
Signed-off-by: Chandra Konduru <chandra.kond...@intel.com>
Signed-off-by: Nabendu Maiti <nabendu.bikash.ma...@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srini...@intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
b/drivers/gpu/drm/i915/intel_sprite.c
index 524933b..54f876e 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -42,13 +42,14 @@
 #include "i915_drv.h"
 
 static bool
-format_is_yuv(uint32_t format)
+intel_format_is_yuv(uint32_t format)
 {
        switch (format) {
        case DRM_FORMAT_YUYV:
        case DRM_FORMAT_UYVY:
        case DRM_FORMAT_VYUY:
        case DRM_FORMAT_YVYU:
+       case DRM_FORMAT_NV12:
                return true;
        default:
                return false;
@@ -331,7 +332,7 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
        enum plane_id plane_id = plane->id;
 
        /* Seems RGB data bypasses the CSC always */
-       if (!format_is_yuv(format))
+       if (!intel_format_is_yuv(format))
                return;
 
        /*
@@ -895,7 +896,7 @@ static u32 g4x_sprite_ctl(const struct intel_crtc_state 
*crtc_state,
                src_y = src->y1 >> 16;
                src_h = drm_rect_height(src) >> 16;
 
-               if (format_is_yuv(fb->format->format)) {
+               if (intel_format_is_yuv(fb->format->format)) {
                        src_x &= ~1;
                        src_w &= ~1;
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to