dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dongseong Hwang <dongseong.hwang@intel.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: Vidya Srinivas <vidya.srinivas@intel.com>,
	Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	airlied@linux.ie, rodrigo.vivi@intel.com,
	Chandra Konduru <chandra.konduru@intel.com>
Subject: [PATCH v2] drm/i915: correct the pitch check for NV12 framebuffer
Date: Tue, 11 Dec 2018 16:39:05 -0800	[thread overview]
Message-ID: <1544575145-10346-1-git-send-email-dongseong.hwang@intel.com> (raw)

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 --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 13e5650..8a3de12 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14600,7 +14600,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");
 		goto err;
 	}
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-12-12  0:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  0:39 Dongseong Hwang [this message]
2018-12-12 20:24 ` [PATCH v2] drm/i915: correct the pitch check for NV12 framebuffer Ville Syrjälä
2018-12-12 20:33   ` Daniel Vetter
2018-12-12 21:15     ` Ville Syrjälä
2018-12-12 21:18       ` [Intel-gfx] " Singaiah Chintalapudi
2018-12-13  0:51       ` Hwang, Dongseong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1544575145-10346-1-git-send-email-dongseong.hwang@intel.com \
    --to=dongseong.hwang@intel.com \
    --cc=airlied@linux.ie \
    --cc=chandra.konduru@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=vidya.srinivas@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox