[11/11] drm/i915: s/intel_plane/plane/ in sprite init

Submitted by Ville Syrjälä on March 5, 2018, 4:51 p.m.

Details

Message ID 20180305165109.31588-12-ville.syrjala@linux.intel.com
State Superseded
Headers show
Series "drm/i915: Some plane init cleanups" ( rev: 2 1 ) in Intel GFX

Browsing this patch as part of:
"drm/i915: Some plane init cleanups" rev 1 in Intel GFX
<< prev patch [11/11] next patch >>

Commit Message

Ville Syrjälä March 5, 2018, 4:51 p.m.
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use a more familiar naming pattern for our variables in the sprite plane
init function.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_sprite.c | 78 ++++++++++++++++++-------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index ec0bba810fe7..a4968ddd98cc 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1524,9 +1524,9 @@  skl_universal_plane_create(struct drm_i915_private *dev_priv,
 
 struct intel_plane *
 intel_sprite_plane_create(struct drm_i915_private *dev_priv,
-			  enum pipe pipe, int plane)
+			  enum pipe pipe, int sprite)
 {
-	struct intel_plane *intel_plane;
+	struct intel_plane *plane;
 	unsigned long possible_crtcs;
 	const uint32_t *plane_formats;
 	const uint64_t *modifiers;
@@ -1535,55 +1535,55 @@  intel_sprite_plane_create(struct drm_i915_private *dev_priv,
 	int ret;
 
 	if (INTEL_GEN(dev_priv) >= 9) {
-		intel_plane = skl_universal_plane_create(dev_priv, pipe,
-							 PLANE_SPRITE0 + plane);
-		if (IS_ERR(intel_plane))
-			return intel_plane;
+		plane = skl_universal_plane_create(dev_priv, pipe,
+						   PLANE_SPRITE0 + sprite);
+		if (IS_ERR(plane))
+			return plane;
 
 		/* FIXME unify */
-		intel_plane->check_plane = intel_check_sprite_plane;
+		plane->check_plane = intel_check_sprite_plane;
 
-		return intel_plane;
+		return plane;
 	}
 
-	intel_plane = intel_plane_alloc();
-	if (IS_ERR(intel_plane))
-		return intel_plane;
+	plane = intel_plane_alloc();
+	if (IS_ERR(plane))
+		return plane;
 
 	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
-		intel_plane->can_scale = false;
-		intel_plane->max_downscale = 1;
+		plane->can_scale = false;
+		plane->max_downscale = 1;
 
-		intel_plane->update_plane = vlv_update_plane;
-		intel_plane->disable_plane = vlv_disable_plane;
-		intel_plane->get_hw_state = vlv_plane_get_hw_state;
+		plane->update_plane = vlv_update_plane;
+		plane->disable_plane = vlv_disable_plane;
+		plane->get_hw_state = vlv_plane_get_hw_state;
 
 		plane_formats = vlv_plane_formats;
 		num_plane_formats = ARRAY_SIZE(vlv_plane_formats);
 		modifiers = i9xx_plane_format_modifiers;
 	} else if (INTEL_GEN(dev_priv) >= 7) {
 		if (IS_IVYBRIDGE(dev_priv)) {
-			intel_plane->can_scale = true;
-			intel_plane->max_downscale = 2;
+			plane->can_scale = true;
+			plane->max_downscale = 2;
 		} else {
-			intel_plane->can_scale = false;
-			intel_plane->max_downscale = 1;
+			plane->can_scale = false;
+			plane->max_downscale = 1;
 		}
 
-		intel_plane->update_plane = ivb_update_plane;
-		intel_plane->disable_plane = ivb_disable_plane;
-		intel_plane->get_hw_state = ivb_plane_get_hw_state;
+		plane->update_plane = ivb_update_plane;
+		plane->disable_plane = ivb_disable_plane;
+		plane->get_hw_state = ivb_plane_get_hw_state;
 
 		plane_formats = snb_plane_formats;
 		num_plane_formats = ARRAY_SIZE(snb_plane_formats);
 		modifiers = i9xx_plane_format_modifiers;
 	} else {
-		intel_plane->can_scale = true;
-		intel_plane->max_downscale = 16;
+		plane->can_scale = true;
+		plane->max_downscale = 16;
 
-		intel_plane->update_plane = g4x_update_plane;
-		intel_plane->disable_plane = g4x_disable_plane;
-		intel_plane->get_hw_state = g4x_plane_get_hw_state;
+		plane->update_plane = g4x_update_plane;
+		plane->disable_plane = g4x_disable_plane;
+		plane->get_hw_state = g4x_plane_get_hw_state;
 
 		modifiers = i9xx_plane_format_modifiers;
 		if (IS_GEN6(dev_priv)) {
@@ -1604,27 +1604,27 @@  intel_sprite_plane_create(struct drm_i915_private *dev_priv,
 			DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180;
 	}
 
-	intel_plane->pipe = pipe;
-	intel_plane->id = PLANE_SPRITE0 + plane;
-	intel_plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, intel_plane->id);
-	intel_plane->check_plane = intel_check_sprite_plane;
+	plane->pipe = pipe;
+	plane->id = PLANE_SPRITE0 + sprite;
+	plane->frontbuffer_bit = INTEL_FRONTBUFFER(pipe, plane->id);
+	plane->check_plane = intel_check_sprite_plane;
 
 	possible_crtcs = BIT(pipe);
 
-	ret = drm_universal_plane_init(&dev_priv->drm, &intel_plane->base,
+	ret = drm_universal_plane_init(&dev_priv->drm, &plane->base,
 				       possible_crtcs, &intel_sprite_plane_funcs,
 				       plane_formats, num_plane_formats,
 				       modifiers,
 				       DRM_PLANE_TYPE_OVERLAY,
-				       "sprite %c", sprite_name(pipe, plane));
+				       "sprite %c", sprite_name(pipe, sprite));
 	if (ret)
 		goto fail;
 
-	drm_plane_create_rotation_property(&intel_plane->base,
+	drm_plane_create_rotation_property(&plane->base,
 					   DRM_MODE_ROTATE_0,
 					   supported_rotations);
 
-	drm_plane_create_color_properties(&intel_plane->base,
+	drm_plane_create_color_properties(&plane->base,
 					  BIT(DRM_COLOR_YCBCR_BT601) |
 					  BIT(DRM_COLOR_YCBCR_BT709),
 					  BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
@@ -1632,12 +1632,12 @@  intel_sprite_plane_create(struct drm_i915_private *dev_priv,
 					  DRM_COLOR_YCBCR_BT709,
 					  DRM_COLOR_YCBCR_LIMITED_RANGE);
 
-	drm_plane_helper_add(&intel_plane->base, &intel_plane_helper_funcs);
+	drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
 
-	return intel_plane;
+	return plane;
 
 fail:
-	intel_plane_free(intel_plane);
+	intel_plane_free(plane);
 
 	return ERR_PTR(ret);
 }