diff mbox

drm/i915: Simplify platform checks in intel_fb_pitch_limit()

Message ID 20170208175328.11064-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Feb. 8, 2017, 5:53 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Replace the VLV/CHV check with a HAS_GMCH_DISPLAY check
intel_fb_pitch_limit(), because it's shorter.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ander Conselvan de Oliveira Feb. 9, 2017, 1:15 p.m. UTC | #1
On Wed, 2017-02-08 at 19:53 +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Replace the VLV/CHV check with a HAS_GMCH_DISPLAY check

in

> intel_fb_pitch_limit(), because it's shorter.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index f6259c949da2..d4e84244862f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14346,8 +14346,7 @@ u32 intel_fb_pitch_limit(struct drm_i915_private
> *dev_priv,
>  		 *  pixels and 32K bytes."
>  		 */
>  		return min(8192 * cpp, 32768);
> -	} else if (gen >= 5 && !IS_VALLEYVIEW(dev_priv) &&
> -		   !IS_CHERRYVIEW(dev_priv)) {
> +	} else if (gen >= 5 && !HAS_GMCH_DISPLAY(dev_priv)) {
>  		return 32*1024;
>  	} else if (gen >= 4) {
>  		if (fb_modifier == I915_FORMAT_MOD_X_TILED)
Ville Syrjälä Feb. 10, 2017, 4:51 p.m. UTC | #2
On Thu, Feb 09, 2017 at 03:15:35PM +0200, Ander Conselvan De Oliveira wrote:
> On Wed, 2017-02-08 at 19:53 +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Replace the VLV/CHV check with a HAS_GMCH_DISPLAY check
> 
> in

Fixed, and pushed to dinq. Thanks for the review.

> 
> > intel_fb_pitch_limit(), because it's shorter.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
> 
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index f6259c949da2..d4e84244862f 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -14346,8 +14346,7 @@ u32 intel_fb_pitch_limit(struct drm_i915_private
> > *dev_priv,
> >  		 *  pixels and 32K bytes."
> >  		 */
> >  		return min(8192 * cpp, 32768);
> > -	} else if (gen >= 5 && !IS_VALLEYVIEW(dev_priv) &&
> > -		   !IS_CHERRYVIEW(dev_priv)) {
> > +	} else if (gen >= 5 && !HAS_GMCH_DISPLAY(dev_priv)) {
> >  		return 32*1024;
> >  	} else if (gen >= 4) {
> >  		if (fb_modifier == I915_FORMAT_MOD_X_TILED)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f6259c949da2..d4e84244862f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14346,8 +14346,7 @@  u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
 		 *  pixels and 32K bytes."
 		 */
 		return min(8192 * cpp, 32768);
-	} else if (gen >= 5 && !IS_VALLEYVIEW(dev_priv) &&
-		   !IS_CHERRYVIEW(dev_priv)) {
+	} else if (gen >= 5 && !HAS_GMCH_DISPLAY(dev_priv)) {
 		return 32*1024;
 	} else if (gen >= 4) {
 		if (fb_modifier == I915_FORMAT_MOD_X_TILED)