Skip to contentSkip to conversation

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

PATCH In review Maarten Lankhorst 2 participants 2 messages Oct 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

These calls are unneeded because the previous memset/memcmp already handles PLANE_CURSOR too, so no need to treat it in a special way.

---

drivers/gpu/drm/i915/intel_pm.c +0 -6
index 0fb0459cf093..efa2b15e8b88 100644
@@ -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;
 }
 

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw
Quoted 10 lines · Maarten Lankhorst

These calls are unneeded because the previous memset/memcmp already handles PLANE_CURSOR too, so no need to treat it in a special way.

---

drivers/gpu/drm/i915/intel_pm.c +0 -0
index 0fb0459cf093..efa2b15e8b88 100644

drivers/gpu/drm/i915/intel_pm.c skl_allocate_pipe_ddb(struct intel_crtc_state *cstate, · line 2920

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +0 -2
@@ -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

Quoted 19 lines
drivers/gpu/drm/i915/intel_pm.c +0 -4
 		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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx