All of lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 01/10] drm/i915: Parametrize cursor/primary pipe select bits
Date: Tue,  7 Mar 2017 17:27:00 +0200	[thread overview]
Message-ID: <20170307152709.31957-2-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20170307152709.31957-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h      | 7 ++-----
 drivers/gpu/drm/i915/intel_display.c | 6 +++---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index cc843f96576f..07cae03e8727 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -5439,9 +5439,7 @@ enum {
 #define   CURSOR_MODE_128_ARGB_AX ((1 << 5) | CURSOR_MODE_128_32B_AX)
 #define   CURSOR_MODE_256_ARGB_AX ((1 << 5) | CURSOR_MODE_256_32B_AX)
 #define   CURSOR_MODE_64_ARGB_AX ((1 << 5) | CURSOR_MODE_64_32B_AX)
-#define   MCURSOR_PIPE_SELECT	(1 << 28)
-#define   MCURSOR_PIPE_A	0x00
-#define   MCURSOR_PIPE_B	(1 << 28)
+#define   MCURSOR_PIPE_SELECT(pipe)	((pipe) << 28)
 #define   MCURSOR_GAMMA_ENABLE  (1 << 26)
 #define   CURSOR_ROTATE_180	(1<<15)
 #define   CURSOR_TRICKLE_FEED_DISABLE	(1 << 14)
@@ -5499,8 +5497,7 @@ enum {
 #define   DISPPLANE_PIPE_CSC_ENABLE		(1<<24)
 #define   DISPPLANE_SEL_PIPE_SHIFT		24
 #define   DISPPLANE_SEL_PIPE_MASK		(3<<DISPPLANE_SEL_PIPE_SHIFT)
-#define   DISPPLANE_SEL_PIPE_A			0
-#define   DISPPLANE_SEL_PIPE_B			(1<<DISPPLANE_SEL_PIPE_SHIFT)
+#define   DISPPLANE_SEL_PIPE(pipe)		((pipe)<<DISPPLANE_SEL_PIPE_SHIFT)
 #define   DISPPLANE_SRC_KEY_ENABLE		(1<<22)
 #define   DISPPLANE_SRC_KEY_DISABLE		0
 #define   DISPPLANE_LINE_DOUBLE			(1<<20)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e77ca7dfa44d..4e8351d89d10 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2989,8 +2989,7 @@ static void i9xx_update_primary_plane(struct drm_plane *primary,
 	dspcntr |= DISPLAY_PLANE_ENABLE;
 
 	if (INTEL_GEN(dev_priv) < 4) {
-		if (intel_crtc->pipe == PIPE_B)
-			dspcntr |= DISPPLANE_SEL_PIPE_B;
+		dspcntr |= DISPPLANE_SEL_PIPE(intel_crtc->pipe);
 
 		/* pipesrc and dspsize control the size that is scaled from,
 		 * which should always be the user's requested size.
@@ -9247,7 +9246,8 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base,
 				MISSING_CASE(plane_state->base.crtc_w);
 				return;
 		}
-		cntl |= pipe << 28; /* Connect to correct pipe */
+
+		cntl |= MCURSOR_PIPE_SELECT(pipe);
 
 		if (HAS_DDI(dev_priv))
 			cntl |= CURSOR_PIPE_CSC_ENABLE;
-- 
2.10.2

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

  reply	other threads:[~2017-03-07 15:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07 15:26 [PATCH 00/10] drm/i915: Cursor code cleanup and cursor "FBC" support for IVB+ ville.syrjala
2017-03-07 15:27 ` ville.syrjala [this message]
2017-03-07 21:51   ` [PATCH 01/10] drm/i915: Parametrize cursor/primary pipe select bits Chris Wilson
2017-03-07 15:27 ` [PATCH 02/10] drm/i915: Pass intel_plane and intel_crtc to plane hooks ville.syrjala
2017-03-07 21:50   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 03/10] drm/i915: Refactor CURBASE calculation ville.syrjala
2017-03-07 21:56   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 04/10] drm/i915: Clean up cursor junk from intel_crtc ville.syrjala
2017-03-07 22:33   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 05/10] drm/i915: Refactor CURPOS calculation ville.syrjala
2017-03-07 21:49   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 06/10] drm/i915: Move cursor position and base handling into the platform specific functions ville.syrjala
2017-03-07 22:35   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 07/10] drm/i915: Drop useless posting reads from cursor commit ville.syrjala
2017-03-07 22:00   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 08/10] drm/i915: Split cursor check_plane into i845 and i9xx variants ville.syrjala
2017-03-07 22:24   ` Chris Wilson
2017-03-08 10:52     ` Ville Syrjälä
2017-03-07 15:27 ` [PATCH 09/10] drm/i915: Use fb->pitches[0] in cursor code ville.syrjala
2017-03-07 22:25   ` Chris Wilson
2017-03-07 15:27 ` [PATCH 10/10] drm/i915: Support variable cursor height on ivb+ ville.syrjala
2017-03-07 22:32   ` Chris Wilson
2017-03-08 10:40     ` Ville Syrjälä
2017-03-08 11:00       ` Chris Wilson
2017-03-08 10:45     ` Daniel Vetter
2017-03-07 16:18 ` ✓ Fi.CI.BAT: success for drm/i915: Cursor code cleanup and cursor "FBC" support for IVB+ Patchwork

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=20170307152709.31957-2-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.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.