All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>,
	"Mika Kahola" <mika.kahola@intel.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/i915/ptl: Use everywhere the correct DDI port clock select mask
Date: Mon, 12 May 2025 23:26:05 +0300	[thread overview]
Message-ID: <aCJZXWBsS7Is6Zpz@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <174708023231.10493.6499863984617165104@intel.com>

On Mon, May 12, 2025 at 05:03:52PM -0300, Gustavo Sousa wrote:
> Quoting Imre Deak (2025-05-12 11:26:00-03:00)
>
> [...]
>
> >diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h b/drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h
> >index 960f7f778fb81..59c22beaf1de5 100644
> >--- a/drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h
> >+++ b/drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h
> >@@ -192,10 +192,17 @@
> > 
> > #define   XELPDP_TBT_CLOCK_REQUEST                        REG_BIT(19)
> > #define   XELPDP_TBT_CLOCK_ACK                                REG_BIT(18)
> >-#define   XELPDP_DDI_CLOCK_SELECT_MASK                        REG_GENMASK(15, 12)
> >-#define   XE3_DDI_CLOCK_SELECT_MASK                        REG_GENMASK(16, 12)
> >-#define   XELPDP_DDI_CLOCK_SELECT(val)                        REG_FIELD_PREP(XELPDP_DDI_CLOCK_SELECT_MASK, val)
> >-#define   XE3_DDI_CLOCK_SELECT(val)                        REG_FIELD_PREP(XE3_DDI_CLOCK_SELECT_MASK, val)
> >+#define   _XELPDP_DDI_CLOCK_SELECT_MASK                        REG_GENMASK(15, 12)
> >+#define   _XE3_DDI_CLOCK_SELECT_MASK                        REG_GENMASK(16, 12)
> 
> Since bit 16 is unused for pre-Xe3 display IPs, I wonder if we should
> simply redefine XELPDP_DDI_CLOCK_SELECT_MASK to be REG_GENMASK(16, 12)
> and add a comment noting changes by display IP? Are we aware of
> something that would be wired to bit 16 that would prevent us from doing
> that?

Not sure if a register bit is not used, unless it's defined as reserved.
For pre-Xe3 (pre-PTL) bits 16-17 are not defined as reserved.

> I remember something similar was done to other register fields in the
> past. Some examples I found:
> 
>     3fe856180c94 ("drm/i915/xe3lpd: Add new bit range of MAX swing setup")
>     247bdac958fc ("drm/i915/adl_p: Add ddb allocation support")
>     d7e449a858ec ("drm/i915: Just use icl+ definition for PLANE_WM blocks field")
> 
> --
> Gustavo Sousa
> 
> >+#define   XELPDP_DDI_CLOCK_SELECT_MASK(display)                (DISPLAY_VER(display) >= 30 ? \
> >+                                                         _XE3_DDI_CLOCK_SELECT_MASK : _XELPDP_DDI_CLOCK_SELECT_MASK)
> >+#define   XELPDP_DDI_CLOCK_SELECT_PREP(display, val)        (DISPLAY_VER(display) >= 30 ? \
> >+                                                         REG_FIELD_PREP(_XE3_DDI_CLOCK_SELECT_MASK, (val)) : \
> >+                                                         REG_FIELD_PREP(_XELPDP_DDI_CLOCK_SELECT_MASK, (val)))
> >+#define   XELPDP_DDI_CLOCK_SELECT_GET(display, val)        (DISPLAY_VER(display) >= 30 ? \
> >+                                                         REG_FIELD_GET(_XE3_DDI_CLOCK_SELECT_MASK, (val)) : \
> >+                                                         REG_FIELD_GET(_XELPDP_DDI_CLOCK_SELECT_MASK, (val)))
> >+
> > #define   XELPDP_DDI_CLOCK_SELECT_NONE                        0x0
> > #define   XELPDP_DDI_CLOCK_SELECT_MAXPCLK                0x8
> > #define   XELPDP_DDI_CLOCK_SELECT_DIV18CLK                0x9
> >-- 
> >2.44.2
> >

  reply	other threads:[~2025-05-12 20:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 14:26 [PATCH] drm/i915/ptl: Use everywhere the correct DDI port clock select mask Imre Deak
2025-05-12 15:37 ` ✓ CI.Patch_applied: success for " Patchwork
2025-05-12 15:37 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-12 15:38 ` ✓ CI.KUnit: success " Patchwork
2025-05-12 15:48 ` ✗ CI.Build: failure " Patchwork
2025-05-12 17:32 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-05-12 17:56 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-12 20:03 ` [PATCH] " Gustavo Sousa
2025-05-12 20:26   ` Imre Deak [this message]
2025-05-13  7:04     ` Kahola, Mika
2025-05-12 21:01 ` ✗ i915.CI.Full: failure for " Patchwork
2025-05-14 13:12   ` Imre Deak
2025-05-13  9:17 ` ✓ CI.Patch_applied: success " Patchwork
2025-05-13  9:17 ` ✗ CI.checkpatch: warning " Patchwork
2025-05-13  9:18 ` ✓ CI.KUnit: success " Patchwork
2025-05-13  9:27 ` ✓ CI.Build: " Patchwork
2025-05-13  9:29 ` ✓ CI.Hooks: " Patchwork
2025-05-13  9:31 ` ✓ CI.checksparse: " Patchwork
2025-05-13  9:59 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-13 11:24 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-26 21:32 ` ✗ CI.Patch_applied: " 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=aCJZXWBsS7Is6Zpz@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=stable@vger.kernel.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.