diff mbox

[06/11] drm/i915/skl+: no need to memset again

Message ID 20170508114902.18965-7-mahesh1.kumar@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kumar, Mahesh May 8, 2017, 11:48 a.m. UTC
We are already doing memset of ddb structure at the begining of skl_allocate_pipe_ddb
function, No need to again do a memset.

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Matt Roper May 12, 2017, 12:23 a.m. UTC | #1
On Mon, May 08, 2017 at 05:18:57PM +0530, Mahesh Kumar wrote:
> We are already doing memset of ddb structure at the begining of skl_allocate_pipe_ddb
> function, No need to again do a memset.
> 
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 1d7c67d7e539..2a4e9d89cd6f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3606,10 +3606,8 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
>  
>  	skl_ddb_get_pipe_allocation_limits(dev, cstate, alloc, &num_active);
>  	alloc_size = skl_ddb_entry_size(alloc);
> -	if (alloc_size == 0) {
> -		memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
> +	if (alloc_size == 0)
>  		return 0;
> -	}
>  
>  	skl_ddb_calc_min(cstate, num_active, minimum, y_minimum);
>  
> -- 
> 2.11.0
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 1d7c67d7e539..2a4e9d89cd6f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3606,10 +3606,8 @@  skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
 
 	skl_ddb_get_pipe_allocation_limits(dev, cstate, alloc, &num_active);
 	alloc_size = skl_ddb_entry_size(alloc);
-	if (alloc_size == 0) {
-		memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
+	if (alloc_size == 0)
 		return 0;
-	}
 
 	skl_ddb_calc_min(cstate, num_active, minimum, y_minimum);