All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [RFC 2/4] drm/i915: Use macro in place of open-coded for_each_universal_plane loop
Date: Wed, 26 Oct 2016 15:51:29 -0700	[thread overview]
Message-ID: <1477522291-10874-3-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1477522291-10874-1-git-send-email-matthew.d.roper@intel.com>

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>
---
 drivers/gpu/drm/i915/intel_drv.h | 9 ---------
 drivers/gpu/drm/i915/intel_pm.c  | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index c2f3863..c31fddd 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -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);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 58d3ba0..6f19e60 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -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);
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-10-26 22:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 22:51 [RFC 0/4] Wire gen9 cursor interface to universal plane registers Matt Roper
2016-10-26 22:51 ` [RFC 1/4] drm/i915: Rename for_each_plane -> for_each_universal_plane Matt Roper
2016-10-28 18:15   ` Paulo Zanoni
2016-10-26 22:51 ` Matt Roper [this message]
2016-10-28 18:17   ` [RFC 2/4] drm/i915: Use macro in place of open-coded for_each_universal_plane loop Paulo Zanoni
2016-10-28 18:30     ` Matt Roper
2016-10-26 22:51 ` [RFC 3/4] drm/i915/gen9: Expose top-most universal plane as cursor Matt Roper
2016-10-27 20:03   ` Paulo Zanoni
2016-10-27 21:11     ` Matt Roper
2016-10-27 22:15   ` Lyude Paul
2016-10-27 22:35     ` Matt Roper
2016-10-27 22:55       ` Lyude Paul
2016-10-26 22:51 ` [RFC 4/4] drm/i915/gen9: Skip debugfs cursor output for universal plane platforms Matt Roper
2016-10-26 23:16 ` ✓ Fi.CI.BAT: success for Wire gen9 cursor interface to universal plane registers Patchwork
2016-10-27  0:15 ` [RFC 0/4] " Chris Wilson
2016-10-27  0:30   ` Matt Roper
2016-10-27  7:35     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477522291-10874-3-git-send-email-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.