From: Mika Kahola <mika.kahola@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 4/7] drm/i915: Clean up cursor defines
Date: Fri, 01 Jun 2018 11:42:23 +0300 [thread overview]
Message-ID: <1527842543.27355.9.camel@intel.com> (raw)
In-Reply-To: <20180131143709.875-1-ville.syrjala@linux.intel.com>
On Wed, 2018-01-31 at 16:37 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Use MCURSOR_ instead of CURSOR_ as the prefix for the non-845/865
> cursor defines consistently, and move the pipe CSC enable bit next
> to the other non-845/865 cursor defines.
>
> v2: Take care of gvt uses as well
>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gvt/fb_decoder.c | 12 ++++++------
> drivers/gpu/drm/i915/i915_reg.h | 22 +++++++++++-----------
> drivers/gpu/drm/i915/intel_display.c | 16 ++++++++--------
> 3 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/fb_decoder.c
> b/drivers/gpu/drm/i915/gvt/fb_decoder.c
> index 6b50fe78dc1b..73c0c2096a62 100644
> --- a/drivers/gpu/drm/i915/gvt/fb_decoder.c
> +++ b/drivers/gpu/drm/i915/gvt/fb_decoder.c
> @@ -303,16 +303,16 @@ static int cursor_mode_to_drm(int mode)
> int cursor_pixel_formats_index = 4;
>
> switch (mode) {
> - case CURSOR_MODE_128_ARGB_AX:
> + case MCURSOR_MODE_128_ARGB_AX:
> cursor_pixel_formats_index = 0;
> break;
> - case CURSOR_MODE_256_ARGB_AX:
> + case MCURSOR_MODE_256_ARGB_AX:
> cursor_pixel_formats_index = 1;
> break;
> - case CURSOR_MODE_64_ARGB_AX:
> + case MCURSOR_MODE_64_ARGB_AX:
> cursor_pixel_formats_index = 2;
> break;
> - case CURSOR_MODE_64_32B_AX:
> + case MCURSOR_MODE_64_32B_AX:
> cursor_pixel_formats_index = 3;
> break;
>
> @@ -345,8 +345,8 @@ int intel_vgpu_decode_cursor_plane(struct
> intel_vgpu *vgpu,
> return -ENODEV;
>
> val = vgpu_vreg_t(vgpu, CURCNTR(pipe));
> - mode = val & CURSOR_MODE;
> - plane->enabled = (mode != CURSOR_MODE_DISABLE);
> + mode = val & MCURSOR_MODE;
> + plane->enabled = (mode != MCURSOR_MODE_DISABLE);
> if (!plane->enabled)
> return -ENODEV;
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> index ebb41f279134..dbcb4de92a63 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5891,7 +5891,6 @@ enum {
> #define CURSOR_GAMMA_ENABLE 0x40000000
> #define CURSOR_STRIDE_SHIFT 28
> #define CURSOR_STRIDE(x) ((ffs(x)-9) <<
> CURSOR_STRIDE_SHIFT) /* 256,512,1k,2k */
> -#define CURSOR_PIPE_CSC_ENABLE (1<<24)
> #define CURSOR_FORMAT_SHIFT 24
> #define CURSOR_FORMAT_MASK (0x07 << CURSOR_FORMAT_SHIFT)
> #define CURSOR_FORMAT_2C (0x00 << CURSOR_FORMAT_SHIFT)
> @@ -5900,20 +5899,21 @@ enum {
> #define CURSOR_FORMAT_ARGB (0x04 << CURSOR_FORMAT_SHIFT)
> #define CURSOR_FORMAT_XRGB (0x05 << CURSOR_FORMAT_SHIFT)
> /* New style CUR*CNTR flags */
> -#define CURSOR_MODE 0x27
> -#define CURSOR_MODE_DISABLE 0x00
> -#define CURSOR_MODE_128_32B_AX 0x02
> -#define CURSOR_MODE_256_32B_AX 0x03
> -#define CURSOR_MODE_64_32B_AX 0x07
> -#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_MODE 0x27
> +#define MCURSOR_MODE_DISABLE 0x00
> +#define MCURSOR_MODE_128_32B_AX 0x02
> +#define MCURSOR_MODE_256_32B_AX 0x03
> +#define MCURSOR_MODE_64_32B_AX 0x07
> +#define MCURSOR_MODE_128_ARGB_AX ((1 << 5) |
> MCURSOR_MODE_128_32B_AX)
> +#define MCURSOR_MODE_256_ARGB_AX ((1 << 5) |
> MCURSOR_MODE_256_32B_AX)
> +#define MCURSOR_MODE_64_ARGB_AX ((1 << 5) |
> MCURSOR_MODE_64_32B_AX)
> #define MCURSOR_PIPE_SELECT_MASK (0x3 << 28)
> #define MCURSOR_PIPE_SELECT_SHIFT 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)
> +#define MCURSOR_PIPE_CSC_ENABLE (1<<24)
> +#define MCURSOR_ROTATE_180 (1<<15)
> +#define MCURSOR_TRICKLE_FEED_DISABLE (1 << 14)
> #define _CURABASE 0x70084
> #define _CURAPOS 0x70088
> #define CURSOR_POS_MASK 0x007FF
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index feae6bd51a44..0cf02f226fd4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9549,20 +9549,20 @@ static u32 i9xx_cursor_ctl(const struct
> intel_crtc_state *crtc_state,
> cntl = MCURSOR_GAMMA_ENABLE;
>
> if (HAS_DDI(dev_priv))
> - cntl |= CURSOR_PIPE_CSC_ENABLE;
> + cntl |= MCURSOR_PIPE_CSC_ENABLE;
>
> if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv))
> cntl |= MCURSOR_PIPE_SELECT(crtc->pipe);
>
> switch (plane_state->base.crtc_w) {
> case 64:
> - cntl |= CURSOR_MODE_64_ARGB_AX;
> + cntl |= MCURSOR_MODE_64_ARGB_AX;
> break;
> case 128:
> - cntl |= CURSOR_MODE_128_ARGB_AX;
> + cntl |= MCURSOR_MODE_128_ARGB_AX;
> break;
> case 256:
> - cntl |= CURSOR_MODE_256_ARGB_AX;
> + cntl |= MCURSOR_MODE_256_ARGB_AX;
> break;
> default:
> MISSING_CASE(plane_state->base.crtc_w);
> @@ -9570,7 +9570,7 @@ static u32 i9xx_cursor_ctl(const struct
> intel_crtc_state *crtc_state,
> }
>
> if (plane_state->base.rotation & DRM_MODE_ROTATE_180)
> - cntl |= CURSOR_ROTATE_180;
> + cntl |= MCURSOR_ROTATE_180;
>
> return cntl;
> }
> @@ -9751,7 +9751,7 @@ static bool i9xx_cursor_get_hw_state(struct
> intel_plane *plane,
>
> val = I915_READ(CURCNTR(plane->pipe));
>
> - ret = val & CURSOR_MODE;
> + ret = val & MCURSOR_MODE;
>
> if (INTEL_GEN(dev_priv) >= 5 || IS_G4X(dev_priv))
> *pipe = plane->pipe;
> @@ -14768,8 +14768,8 @@ void i830_disable_pipe(struct
> drm_i915_private *dev_priv, enum pipe pipe)
> WARN_ON(I915_READ(DSPCNTR(PLANE_A)) & DISPLAY_PLANE_ENABLE);
> WARN_ON(I915_READ(DSPCNTR(PLANE_B)) & DISPLAY_PLANE_ENABLE);
> WARN_ON(I915_READ(DSPCNTR(PLANE_C)) & DISPLAY_PLANE_ENABLE);
> - WARN_ON(I915_READ(CURCNTR(PIPE_A)) & CURSOR_MODE);
> - WARN_ON(I915_READ(CURCNTR(PIPE_B)) & CURSOR_MODE);
> + WARN_ON(I915_READ(CURCNTR(PIPE_A)) & MCURSOR_MODE);
> + WARN_ON(I915_READ(CURCNTR(PIPE_B)) & MCURSOR_MODE);
>
> I915_WRITE(PIPECONF(pipe), 0);
> POSTING_READ(PIPECONF(pipe));
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-06-01 8:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 20:38 [PATCH 1/7] drm/i915: Don't set cursor pipe select bits on g4x+ Ville Syrjala
2018-01-30 20:38 ` [PATCH 2/7] drm/i915: Set the primary plane pipe select bits on gen4 Ville Syrjala
2018-02-02 9:15 ` Mika Kahola
2018-01-30 20:38 ` [PATCH 3/7] drm/i915: Have plane->get_hw_state() return the current pipe Ville Syrjala
2018-06-01 8:38 ` Mika Kahola
2018-01-30 20:38 ` [PATCH 4/7] drm/i915: Clean up cursor defines Ville Syrjala
2018-01-31 14:37 ` [PATCH v2 " Ville Syrjala
2018-06-01 8:42 ` Mika Kahola [this message]
2018-01-30 20:38 ` [PATCH 5/7] drm/i915: Disable trickle feed for SNB/IVB cursors Ville Syrjala
2018-06-01 10:25 ` Mika Kahola
2018-01-30 20:38 ` [PATCH 6/7] drm/i915: Drop WaDoubleCursorLP3Latency:ivb Ville Syrjala
2018-01-31 14:10 ` Mika Kahola
2018-02-20 19:01 ` Ville Syrjälä
2018-01-30 20:38 ` [PATCH 7/7] drm/i915: s/plane/i9xx_plane/ Ville Syrjala
2018-06-01 10:29 ` Mika Kahola
2018-06-01 15:52 ` Ville Syrjälä
2018-01-30 21:03 ` ✗ Fi.CI.BAT: failure for series starting with [1/7] drm/i915: Don't set cursor pipe select bits on g4x+ Patchwork
2018-01-31 14:55 ` ✓ Fi.CI.BAT: success for series starting with [1/7] drm/i915: Don't set cursor pipe select bits on g4x+ (rev2) Patchwork
2018-01-31 17:18 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-01 13:32 ` [PATCH 1/7] drm/i915: Don't set cursor pipe select bits on g4x+ Mika Kahola
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=1527842543.27355.9.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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.