diff mbox series

[2/2] drm/i915: Reject compressed Y/Yf with interlaced modes

Message ID 20180828142707.31583-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Don't pass plane to .check_plane() | expand

Commit Message

Ville Syrjälä Aug. 28, 2018, 2:27 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Y/Yf tiling can't be used with IF-ID. We already reject uncompressed
Y/Yf but we should also reject them when compressed.

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_atomic_plane.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Mahesh Kumar Aug. 28, 2018, 3:57 p.m. UTC | #1
Hi,
On Tue, Aug 28, 2018 at 7:57 PM Ville Syrjala
<ville.syrjala@linux.intel.com> wrote:
>
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Y/Yf tiling can't be used with IF-ID. We already reject uncompressed
> Y/Yf but we should also reject them when compressed.
>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_atomic_plane.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index eddcdd6e4b3b..fa7df5fe154b 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -170,7 +170,9 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
>         if (state->fb && INTEL_GEN(dev_priv) >= 9 && crtc_state->base.enable &&
>             adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
>                 if (state->fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> -                   state->fb->modifier == I915_FORMAT_MOD_Yf_TILED) {
> +                   state->fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
> +                   state->fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
> +                   state->fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS) {
LGTM...
Reviewed-by:  Mahesh Kumar <mahesh1.sh.kumar@gmail.com>

-Mahesh
>                         DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-ID mode\n");
>                         return -EINVAL;
>                 }
> --
> 2.16.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Souza, Jose Aug. 28, 2018, 4:39 p.m. UTC | #2
On Tue, 2018-08-28 at 17:27 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Y/Yf tiling can't be used with IF-ID. We already reject uncompressed
> Y/Yf but we should also reject them when compressed.
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_atomic_plane.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c
> b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index eddcdd6e4b3b..fa7df5fe154b 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -170,7 +170,9 @@ int intel_plane_atomic_check_with_state(const
> struct intel_crtc_state *old_crtc_
>  	if (state->fb && INTEL_GEN(dev_priv) >= 9 && crtc_state-
> >base.enable &&
>  	    adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
>  		if (state->fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> -		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED) {
> +		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
> +		    state->fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS
> ||
> +		    state->fb->modifier ==
> I915_FORMAT_MOD_Yf_TILED_CCS) {
>  			DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-
> ID mode\n");
>  			return -EINVAL;
>  		}
Ville Syrjälä Aug. 28, 2018, 7:21 p.m. UTC | #3
On Tue, Aug 28, 2018 at 04:39:21PM +0000, Souza, Jose wrote:
> On Tue, 2018-08-28 at 17:27 +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Y/Yf tiling can't be used with IF-ID. We already reject uncompressed
> > Y/Yf but we should also reject them when compressed.
> > 
> 
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

Thanks for the reviews. Series pushed to dinq.

> 
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_atomic_plane.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c
> > b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > index eddcdd6e4b3b..fa7df5fe154b 100644
> > --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> > @@ -170,7 +170,9 @@ int intel_plane_atomic_check_with_state(const
> > struct intel_crtc_state *old_crtc_
> >  	if (state->fb && INTEL_GEN(dev_priv) >= 9 && crtc_state-
> > >base.enable &&
> >  	    adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
> >  		if (state->fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> > -		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED) {
> > +		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
> > +		    state->fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS
> > ||
> > +		    state->fb->modifier ==
> > I915_FORMAT_MOD_Yf_TILED_CCS) {
> >  			DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-
> > ID mode\n");
> >  			return -EINVAL;
> >  		}
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index eddcdd6e4b3b..fa7df5fe154b 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -170,7 +170,9 @@  int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 	if (state->fb && INTEL_GEN(dev_priv) >= 9 && crtc_state->base.enable &&
 	    adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
 		if (state->fb->modifier == I915_FORMAT_MOD_Y_TILED ||
-		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED) {
+		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
+		    state->fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
+		    state->fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS) {
 			DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-ID mode\n");
 			return -EINVAL;
 		}