Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Rename the confusing 'plane_id' to 'color_plane'

A variable whose name is 'plane_id' is expected to be of the
enum plane_id type. In this case we have a raw int, which turns
out to refer to the plane of the framebuffer. Rename the variable
to 'color_plane' in line with the trend started earlier.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-13-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

+4 -4
+4 -4
drivers/gpu/drm/i915/intel_pm.c
··· 4618 4618 static int 4619 4619 skl_compute_plane_wm_params(const struct intel_crtc_state *cstate, 4620 4620 const struct intel_plane_state *intel_pstate, 4621 - struct skl_wm_params *wp, int plane_id) 4621 + struct skl_wm_params *wp, int color_plane) 4622 4622 { 4623 4623 struct intel_plane *plane = to_intel_plane(intel_pstate->base.plane); 4624 4624 struct drm_i915_private *dev_priv = to_i915(plane->base.dev); ··· 4630 4630 bool apply_memory_bw_wa = skl_needs_memory_bw_wa(state); 4631 4631 4632 4632 /* only NV12 format has two planes */ 4633 - if (plane_id == 1 && fb->format->format != DRM_FORMAT_NV12) { 4633 + if (color_plane == 1 && fb->format->format != DRM_FORMAT_NV12) { 4634 4634 DRM_DEBUG_KMS("Non NV12 format have single plane\n"); 4635 4635 return -EINVAL; 4636 4636 } ··· 4655 4655 wp->width = drm_rect_width(&intel_pstate->base.src) >> 16; 4656 4656 } 4657 4657 4658 - if (plane_id == 1 && wp->is_planar) 4658 + if (color_plane == 1 && wp->is_planar) 4659 4659 wp->width /= 2; 4660 4660 4661 - wp->cpp = fb->format->cpp[plane_id]; 4661 + wp->cpp = fb->format->cpp[color_plane]; 4662 4662 wp->plane_pixel_rate = skl_adjusted_plane_pixel_rate(cstate, 4663 4663 intel_pstate); 4664 4664