diff mbox

drm/i915: Fix maxfifo watermark calc on vlv cursor planes

Message ID 1445608538-17998-1-git-send-email-thomas.daniel@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Daniel Oct. 23, 2015, 1:55 p.m. UTC
A typo resulted in the watermarks for cursor planes not being calculated
correctly.  Fixed the typo.

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

Comments

Ville Syrjälä Oct. 23, 2015, 2:05 p.m. UTC | #1
On Fri, Oct 23, 2015 at 02:55:38PM +0100, Thomas Daniel wrote:
> A typo resulted in the watermarks for cursor planes not being calculated
> correctly.  Fixed the typo.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Thomas Daniel <thomas.daniel@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0fb0459..c01dd2b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1135,7 +1135,7 @@ static void vlv_compute_wm(struct intel_crtc *crtc)
>  		case DRM_PLANE_TYPE_CURSOR:
>  			for (level = 0; level < wm_state->num_levels; level++)
>  				wm_state->sr[level].cursor =
> -					wm_state->sr[level].cursor;
> +					wm_state->wm[level].cursor;

Yeah, the code is clearly wrong, but due to the fact that we initialize
the sr wm to the max (63) initially, this shouldn't have actually caused
any underruns and whatnot.

The patch is correct in any case.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  			break;
>  		case DRM_PLANE_TYPE_PRIMARY:
>  			for (level = 0; level < wm_state->num_levels; level++)
> -- 
> 1.9.1
Jani Nikula Oct. 27, 2015, 1:54 p.m. UTC | #2
On Fri, 23 Oct 2015, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Oct 23, 2015 at 02:55:38PM +0100, Thomas Daniel wrote:
>> A typo resulted in the watermarks for cursor planes not being calculated
>> correctly.  Fixed the typo.
>> 
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Thomas Daniel <thomas.daniel@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 0fb0459..c01dd2b 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -1135,7 +1135,7 @@ static void vlv_compute_wm(struct intel_crtc *crtc)
>>  		case DRM_PLANE_TYPE_CURSOR:
>>  			for (level = 0; level < wm_state->num_levels; level++)
>>  				wm_state->sr[level].cursor =
>> -					wm_state->sr[level].cursor;
>> +					wm_state->wm[level].cursor;
>
> Yeah, the code is clearly wrong, but due to the fact that we initialize
> the sr wm to the max (63) initially, this shouldn't have actually caused
> any underruns and whatnot.
>
> The patch is correct in any case.
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Pushed to drm-intel-next-fixes, thanks for the patch and review.

BR,
Jani.

>
>>  			break;
>>  		case DRM_PLANE_TYPE_PRIMARY:
>>  			for (level = 0; level < wm_state->num_levels; level++)
>> -- 
>> 1.9.1
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 0fb0459..c01dd2b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1135,7 +1135,7 @@  static void vlv_compute_wm(struct intel_crtc *crtc)
 		case DRM_PLANE_TYPE_CURSOR:
 			for (level = 0; level < wm_state->num_levels; level++)
 				wm_state->sr[level].cursor =
-					wm_state->sr[level].cursor;
+					wm_state->wm[level].cursor;
 			break;
 		case DRM_PLANE_TYPE_PRIMARY:
 			for (level = 0; level < wm_state->num_levels; level++)