diff mbox

[3/3] drm/i915: Bump CHV PFI credits to 63 when cdclk>=czclk

Message ID 1432660960-8979-4-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä May 26, 2015, 5:22 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Switch from using 31 PFI credits to 63 PFI credits when cdclk>=czclk on
CHV. The spec lists both 31 and 63 as "suggested" values, but based on
feedback from hardware folks we should actually be using 63. Originally
I picked the 31 basically by flipping a coin.

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

Comments

Taylor, Clinton A June 12, 2015, 4:24 p.m. UTC | #1
On 05/26/2015 10:22 AM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Switch from using 31 PFI credits to 63 PFI credits when cdclk>=czclk on
> CHV. The spec lists both 31 and 63 as "suggested" values, but based on
> feedback from hardware folks we should actually be using 63. Originally
> I picked the 31 basically by flipping a coin.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 067b1de..44b9c54 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5986,7 +5986,7 @@ static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv)
>   	if (DIV_ROUND_CLOSEST(dev_priv->cdclk_freq, 1000) >= dev_priv->rps.cz_freq) {
>   		/* CHV suggested value is 31 or 63 */
>   		if (IS_CHERRYVIEW(dev_priv))
> -			credits = PFI_CREDIT_31;
> +			credits = PFI_CREDIT_63;
>   		else
>   			credits = PFI_CREDIT(15);
>   	} else {
>

Although not part of this review the else clause is setting PFI_CREDIT 
to 15 when the BPSEC states that the default of 8 should be used when 
cdclk/czclk < 1. According to the original patch, 15 is the optimal 
value as stated by another driver team.

Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Daniel Vetter June 15, 2015, 10:26 a.m. UTC | #2
On Fri, Jun 12, 2015 at 09:24:24AM -0700, Clint Taylor wrote:
> On 05/26/2015 10:22 AM, ville.syrjala@linux.intel.com wrote:
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >Switch from using 31 PFI credits to 63 PFI credits when cdclk>=czclk on
> >CHV. The spec lists both 31 and 63 as "suggested" values, but based on
> >feedback from hardware folks we should actually be using 63. Originally
> >I picked the 31 basically by flipping a coin.
> >
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >---
> >  drivers/gpu/drm/i915/intel_display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >index 067b1de..44b9c54 100644
> >--- a/drivers/gpu/drm/i915/intel_display.c
> >+++ b/drivers/gpu/drm/i915/intel_display.c
> >@@ -5986,7 +5986,7 @@ static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv)
> >  	if (DIV_ROUND_CLOSEST(dev_priv->cdclk_freq, 1000) >= dev_priv->rps.cz_freq) {
> >  		/* CHV suggested value is 31 or 63 */
> >  		if (IS_CHERRYVIEW(dev_priv))
> >-			credits = PFI_CREDIT_31;
> >+			credits = PFI_CREDIT_63;
> >  		else
> >  			credits = PFI_CREDIT(15);
> >  	} else {
> >
> 
> Although not part of this review the else clause is setting PFI_CREDIT to 15
> when the BPSEC states that the default of 8 should be used when cdclk/czclk
> < 1. According to the original patch, 15 is the optimal value as stated by
> another driver team.

Can you please file a bspec correction notice to fix the issue with the 15
vs. 8?

> Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>

Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 067b1de..44b9c54 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5986,7 +5986,7 @@  static void vlv_program_pfi_credits(struct drm_i915_private *dev_priv)
 	if (DIV_ROUND_CLOSEST(dev_priv->cdclk_freq, 1000) >= dev_priv->rps.cz_freq) {
 		/* CHV suggested value is 31 or 63 */
 		if (IS_CHERRYVIEW(dev_priv))
-			credits = PFI_CREDIT_31;
+			credits = PFI_CREDIT_63;
 		else
 			credits = PFI_CREDIT(15);
 	} else {