Skip to content

Commit

Permalink
drm/i915: Use macro in place of open-coded for_each_universal_plane loop
Browse files Browse the repository at this point in the history
This was the only use of (misleadingly-named) intel_num_planes()
function, so we can remove it as well.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1477522291-10874-3-git-send-email-matthew.d.roper@intel.com
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
  • Loading branch information
Matt Roper committed Oct 28, 2016
1 parent 8b364b4 commit 2c4b49a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1108,15 +1108,6 @@ hdmi_to_dig_port(struct intel_hdmi *intel_hdmi)
return container_of(intel_hdmi, struct intel_digital_port, hdmi);
}

/*
* Returns the number of planes for this pipe, ie the number of sprites + 1
* (primary plane). This doesn't count the cursor plane then.
*/
static inline unsigned int intel_num_planes(struct intel_crtc *crtc)
{
return INTEL_INFO(crtc->base.dev)->num_sprites[crtc->pipe] + 1;
}

/* intel_fifo_underrun.c */
bool intel_set_cpu_fifo_underrun_reporting(struct drm_i915_private *dev_priv,
enum pipe pipe, bool enable);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4232,7 +4232,7 @@ static void skl_update_wm(struct drm_crtc *crtc)
if (crtc->state->active_changed) {
int plane;

for (plane = 0; plane < intel_num_planes(intel_crtc); plane++)
for_each_universal_plane(dev_priv, pipe, plane)
skl_write_plane_wm(intel_crtc, &pipe_wm->planes[plane],
&results->ddb, plane);

Expand Down

0 comments on commit 2c4b49a

Please sign in to comment.