Message ID | 1545208152-22658-1-git-send-email-raviraj.p.sitaram@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] drm/i915: correct the pitch check for NV12 framebuffer | expand |
Hi Ville, NV12 support for small src viewport sizes and rotation vs clipping scenarios are added into IGT by JP. Commit details are as follows. commit 8614d5eb114a660c3bd7ff77eab8bed53424cd30 Author: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Date: Fri Dec 21 15:42:33 2018 +0200 tests/kms_rotation_crc: add NV12 support for multiplane* tests Can you please review the patch again? As suggested I have removed the if..else check in intel_framebuffer_init(). Regards, Raviraj > -----Original Message----- > From: Sitaram, Raviraj P > Sent: Wednesday, December 19, 2018 1:59 PM > To: intel-gfx@lists.freedesktop.org > Cc: Sitaram, Raviraj P <raviraj.p.sitaram@intel.com>; Hwang, Dongseong > <dongseong.hwang@intel.com>; Konduru, Chandra <chandra.konduru@intel.com>; > Srinivas, Vidya <vidya.srinivas@intel.com>; Ville Syrjälä > <ville.syrjala@linux.intel.com>; Juha-Pekka Heikkila > <juhapekka.heikkila@gmail.com> > Subject: [PATCH v3] drm/i915: correct the pitch check for NV12 framebuffer > > From: P Raviraj Sitaram <raviraj.p.sitaram@intel.com> > > 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. > > Changes since v1: > - Removed check for NV12 buffer dimensions since additional checks > are done for viewport size in intel_sprite.c > > Signed-off-by: Dongseong Hwang <dongseong.hwang@intel.com> > Signed-off-by: P Raviraj Sitaram <raviraj.p.sitaram@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 | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 3b7094822aa9..fa349182d0da 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -14597,14 +14597,6 @@ static int intel_framebuffer_init(struct intel_framebuffer > *intel_fb, > > drm_helper_mode_fill_fb_struct(&dev_priv->drm, fb, mode_cmd); > > - 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)) { > - DRM_DEBUG_KMS("src dimensions not correct for NV12\n"); > - goto err; > - } > - > for (i = 0; i < fb->format->num_planes; i++) { > u32 stride_alignment; > > -- > 2.7.4
On Wed, Dec 19, 2018 at 01:59:12PM +0530, raviraj.p.sitaram@intel.com wrote: > From: P Raviraj Sitaram <raviraj.p.sitaram@intel.com> > > 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. > > Changes since v1: > - Removed check for NV12 buffer dimensions since additional checks > are done for viewport size in intel_sprite.c > > Signed-off-by: Dongseong Hwang <dongseong.hwang@intel.com> > Signed-off-by: P Raviraj Sitaram <raviraj.p.sitaram@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 | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 3b7094822aa9..fa349182d0da 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -14597,14 +14597,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, > > drm_helper_mode_fill_fb_struct(&dev_priv->drm, fb, mode_cmd); > > - 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)) { > - DRM_DEBUG_KMS("src dimensions not correct for NV12\n"); > - goto err; > - } Looks correct to me. Thanks for the patch, pushed to dinq. > - > for (i = 0; i < fb->format->num_planes; i++) { > u32 stride_alignment; > > -- > 2.7.4
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3b7094822aa9..fa349182d0da 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14597,14 +14597,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, drm_helper_mode_fill_fb_struct(&dev_priv->drm, fb, mode_cmd); - 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)) { - DRM_DEBUG_KMS("src dimensions not correct for NV12\n"); - goto err; - } - for (i = 0; i < fb->format->num_planes; i++) { u32 stride_alignment;