diff mbox

drm/i915/skl: Remove duplicated mem calls for PLANE_CURSOR.

Message ID 562E2D6C.8010903@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst Oct. 26, 2015, 1:41 p.m. UTC
These calls are unneeded because the previous memset/memcmp already handles PLANE_CURSOR too,
so no need to treat it in a special way.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---

Comments

Ville Syrjälä Oct. 26, 2015, 6:46 p.m. UTC | #1
On Mon, Oct 26, 2015 at 02:41:00PM +0100, Maarten Lankhorst wrote:
> These calls are unneeded because the previous memset/memcmp already handles PLANE_CURSOR too,
> so no need to treat it in a special way.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0fb0459cf093..efa2b15e8b88 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2916,8 +2916,6 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
>  	alloc_size = skl_ddb_entry_size(alloc);
>  	if (alloc_size == 0) {
>  		memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
> -		memset(&ddb->plane[pipe][PLANE_CURSOR], 0,
> -		       sizeof(ddb->plane[pipe][PLANE_CURSOR]));

This hunk is good, the other is made obsolete by
http://lists.freedesktop.org/archives/intel-gfx/2015-October/078803.html

>  		return;
>  	}
>  
> @@ -3070,10 +3068,6 @@ static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
>  		   sizeof(new_ddb->plane[pipe])))
>  		return true;
>  
> -	if (memcmp(&new_ddb->plane[pipe][PLANE_CURSOR], &cur_ddb->plane[pipe][PLANE_CURSOR],
> -		    sizeof(new_ddb->plane[pipe][PLANE_CURSOR])))
> -		return true;
> -
>  	return false;
>  }
>  
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 0fb0459cf093..efa2b15e8b88 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2916,8 +2916,6 @@  skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
 	alloc_size = skl_ddb_entry_size(alloc);
 	if (alloc_size == 0) {
 		memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
-		memset(&ddb->plane[pipe][PLANE_CURSOR], 0,
-		       sizeof(ddb->plane[pipe][PLANE_CURSOR]));
 		return;
 	}
 
@@ -3070,10 +3068,6 @@  static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
 		   sizeof(new_ddb->plane[pipe])))
 		return true;
 
-	if (memcmp(&new_ddb->plane[pipe][PLANE_CURSOR], &cur_ddb->plane[pipe][PLANE_CURSOR],
-		    sizeof(new_ddb->plane[pipe][PLANE_CURSOR])))
-		return true;
-
 	return false;
 }