diff mbox

drm/i915: Remove unecessary check for unsupported modifiers for NV12

Message ID 20180628061854.6430-1-dhinakaran.pandiyan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dhinakaran Pandiyan June 28, 2018, 6:18 a.m. UTC
There is already a check to allow only RGB8888 formats with CCS
modifiers.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Daniel Vetter June 28, 2018, 6:48 a.m. UTC | #1
On Wed, Jun 27, 2018 at 11:18:54PM -0700, Dhinakaran Pandiyan wrote:
> There is already a check to allow only RGB8888 formats with CCS
> modifiers.
> 
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Aside: intel_framebuffer_init is horribly long function, and it would
probably make a lot of sense to extract all the framebuffer related stuff
into a new intel_framebuffer.c file. intel_display.c is a bit ... big :-)
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index eaa0663963a5..c5ec13e0f484 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14521,11 +14521,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
>  		}
>  		break;
>  	case DRM_FORMAT_NV12:
> -		if (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED_CCS ||
> -		    mode_cmd->modifier[0] == I915_FORMAT_MOD_Yf_TILED_CCS) {
> -			DRM_DEBUG_KMS("RC not to be enabled with NV12\n");
> -			goto err;
> -		}
>  		if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv) ||
>  		    IS_BROXTON(dev_priv)) {
>  			DRM_DEBUG_KMS("unsupported pixel format: %s\n",
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Maarten Lankhorst June 28, 2018, 8:35 a.m. UTC | #2
Op 28-06-18 om 08:18 schreef Dhinakaran Pandiyan:
> There is already a check to allow only RGB8888 formats with CCS
> modifiers.
>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index eaa0663963a5..c5ec13e0f484 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14521,11 +14521,6 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
>  		}
>  		break;
>  	case DRM_FORMAT_NV12:
> -		if (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED_CCS ||
> -		    mode_cmd->modifier[0] == I915_FORMAT_MOD_Yf_TILED_CCS) {
> -			DRM_DEBUG_KMS("RC not to be enabled with NV12\n");
> -			goto err;
> -		}
>  		if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv) ||
>  		    IS_BROXTON(dev_priv)) {
>  			DRM_DEBUG_KMS("unsupported pixel format: %s\n",

Fair enough, probably rebase noise. :)

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Ville Syrjälä June 28, 2018, 6:21 p.m. UTC | #3
On Thu, Jun 28, 2018 at 11:36:00AM -0700, Dhinakaran Pandiyan wrote:
> On Thu, 2018-06-28 at 08:48 +0200, Daniel Vetter wrote:
> > On Wed, Jun 27, 2018 at 11:18:54PM -0700, Dhinakaran Pandiyan wrote:
> > > 
> > > There is already a check to allow only RGB8888 formats with CCS
> > > modifiers.
> > > 
> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> 
> Thanks for the reviews.
> 
> 
> > Aside: intel_framebuffer_init is horribly long function, and it would
> > probably make a lot of sense to extract all the framebuffer related
> > stuff
> > into a new intel_framebuffer.c file. intel_display.c is a bit ... big
> > :-)
> 
> Yup, it's become a pain to add new stuff. I'll add this to my todo
> list.

A big chunk of intel_framebuffer_init() should simply be disappeared.
I tried but couldn't really come up with any entirely satisfactory
solution. Someone should revisit that topic now that we at least
figured out what to do with the .format_mod_supported() vs.
plane->modifiers[].

https://patchwork.freedesktop.org/series/39384/
https://patchwork.freedesktop.org/series/39701/
https://patchwork.freedesktop.org/series/39814/
Dhinakaran Pandiyan June 28, 2018, 6:36 p.m. UTC | #4
On Thu, 2018-06-28 at 08:48 +0200, Daniel Vetter wrote:
> On Wed, Jun 27, 2018 at 11:18:54PM -0700, Dhinakaran Pandiyan wrote:
> > 
> > There is already a check to allow only RGB8888 formats with CCS
> > modifiers.
> > 
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 

Thanks for the reviews.


> Aside: intel_framebuffer_init is horribly long function, and it would
> probably make a lot of sense to extract all the framebuffer related
> stuff
> into a new intel_framebuffer.c file. intel_display.c is a bit ... big
> :-)

Yup, it's become a pain to add new stuff. I'll add this to my todo
list.


> -Daniel
> 
> > 
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 5 -----
> >  1 file changed, 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index eaa0663963a5..c5ec13e0f484 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -14521,11 +14521,6 @@ static int intel_framebuffer_init(struct
> > intel_framebuffer *intel_fb,
> >  		}
> >  		break;
> >  	case DRM_FORMAT_NV12:
> > -		if (mode_cmd->modifier[0] ==
> > I915_FORMAT_MOD_Y_TILED_CCS ||
> > -		    mode_cmd->modifier[0] ==
> > I915_FORMAT_MOD_Yf_TILED_CCS) {
> > -			DRM_DEBUG_KMS("RC not to be enabled with
> > NV12\n");
> > -			goto err;
> > -		}
> >  		if (INTEL_GEN(dev_priv) < 9 ||
> > IS_SKYLAKE(dev_priv) ||
> >  		    IS_BROXTON(dev_priv)) {
> >  			DRM_DEBUG_KMS("unsupported pixel format:
> > %s\n",
> > -- 
> > 2.14.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Dhinakaran Pandiyan July 2, 2018, 6:35 p.m. UTC | #5
On Thu, 2018-06-28 at 11:36 -0700, Dhinakaran Pandiyan wrote:
> On Thu, 2018-06-28 at 08:48 +0200, Daniel Vetter wrote:
> > 
> > On Wed, Jun 27, 2018 at 11:18:54PM -0700, Dhinakaran Pandiyan
> > wrote:
> > > 
> > > 
> > > There is already a check to allow only RGB8888 formats with CCS
> > > modifiers.
> > > 
> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com
> > > >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > 
> Thanks for the reviews.
Pushed this to -dinq.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eaa0663963a5..c5ec13e0f484 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14521,11 +14521,6 @@  static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 		}
 		break;
 	case DRM_FORMAT_NV12:
-		if (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED_CCS ||
-		    mode_cmd->modifier[0] == I915_FORMAT_MOD_Yf_TILED_CCS) {
-			DRM_DEBUG_KMS("RC not to be enabled with NV12\n");
-			goto err;
-		}
 		if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv) ||
 		    IS_BROXTON(dev_priv)) {
 			DRM_DEBUG_KMS("unsupported pixel format: %s\n",