[Intel-gfx] [PATCH 6/6] drm/i915/display: Simplify GLK display version tests

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Mar 22 15:19:26 UTC 2021


On Fri, Mar 19, 2021 at 09:42:45PM -0700, Matt Roper wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 4be848d0d156..eb1121e05c0d 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1433,7 +1433,7 @@ static void bxt_get_cdclk(struct drm_i915_private *dev_priv,
>  		break;
>  	case BXT_CDCLK_CD2X_DIV_SEL_1_5:
>  		drm_WARN(&dev_priv->drm,
> -			 IS_GEMINILAKE(dev_priv) || DISPLAY_VER(dev_priv) >= 10,
> +			 DISPLAY_VER(dev_priv) >= 10,
>  			 "Unsupported divider\n");
>  		div = 3;
>  		break;
> @@ -1591,7 +1591,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
>  		break;
>  	case 3:
>  		drm_WARN(&dev_priv->drm,
> -			 IS_GEMINILAKE(dev_priv) || DISPLAY_VER(dev_priv) >= 10,
> +			 DISPLAY_VER(dev_priv) >= 10,
>  			 "Unsupported divider\n");
>  		divider = BXT_CDCLK_CD2X_DIV_SEL_1_5;
>  		break;

Looks like you still end up with the wrong thing here for the case 8?
Atm it has a gen>=10 check, after this it should have gen>=11||is_cnl.

The approach I was thinking should work for this would be somehting
along the lines of:
gen>9 -> gen>=10
gen>=10 -> gen>=11||is_cnl
is_cnl||is_glk -> gen10
gen>=11||gen10 -> gen>=10

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list