diff mbox series

drm/i915: remove the unnecessary restriction for NV12 in intel_framebuffer_init

Message ID 1533766795-57583-1-git-send-email-dongseong.hwang@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: remove the unnecessary restriction for NV12 in intel_framebuffer_init | expand

Commit Message

Hwang, Dongseong Aug. 8, 2018, 10:19 p.m. UTC
framebuffer for NV12 requires the pitch to the multiplier of 4, instead of the
width. This patch corrects it.

For instance, a 480p video, whose width and pitch are 854 and 896 respectively,
is excluded for NV12 plane so far.

Signed-off-by: Dongseong Hwang <dongseong.hwang@intel.com>
Cc: Chandra Konduru <chandra.konduru@intel.com>
Cc: Vidya Srinivas <vidya.srinivas@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 53e7a7e..87c9a53 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14566,7 +14566,7 @@  static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 	if (fb->format->format == DRM_FORMAT_NV12 &&
 	    (fb->width < SKL_MIN_YUV_420_SRC_W ||
 	     fb->height < SKL_MIN_YUV_420_SRC_H ||
-	     (fb->width % 4) != 0 || (fb->height % 4) != 0)) {
+	     (fb->pitches[0] % 4) != 0 || (fb->height % 4) != 0)) {
 		DRM_DEBUG_KMS("src dimensions not correct for NV12\n");
 		return -EINVAL;
 	}