Message ID | 20210128192413.1715802-3-matthew.d.roper@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Preliminary Display13 support | expand |
On Thu, Jan 28, 2021 at 11:23:57AM -0800, Matt Roper wrote: >Display13 has new AUX interrupt bits for DDI-D and DDI-E. > >Bspec: 50064 >Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> >Signed-off-by: Matt Roper <matthew.d.roper@intel.com> >--- > drivers/gpu/drm/i915/i915_irq.c | 12 +++++++++++- > drivers/gpu/drm/i915/i915_reg.h | 2 ++ > 2 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c >index 06937a2d2714..1bced71470a5 100644 >--- a/drivers/gpu/drm/i915/i915_irq.c >+++ b/drivers/gpu/drm/i915/i915_irq.c >@@ -2251,7 +2251,17 @@ static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv) > { > u32 mask; > >- if (INTEL_GEN(dev_priv) >= 12) >+ if (HAS_DISPLAY13(dev_priv)) >+ return TGL_DE_PORT_AUX_DDIA | >+ TGL_DE_PORT_AUX_DDIB | >+ TGL_DE_PORT_AUX_DDIC | >+ D13_DE_PORT_AUX_DDID | >+ D13_DE_PORT_AUX_DDIE | >+ TGL_DE_PORT_AUX_USBC1 | >+ TGL_DE_PORT_AUX_USBC2 | >+ TGL_DE_PORT_AUX_USBC3 | >+ TGL_DE_PORT_AUX_USBC4; >+ else if (INTEL_GEN(dev_priv) >= 12) > return TGL_DE_PORT_AUX_DDIA | > TGL_DE_PORT_AUX_DDIB | > TGL_DE_PORT_AUX_DDIC | >diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h >index 3031897239a0..10fd0e3af2d4 100644 >--- a/drivers/gpu/drm/i915/i915_reg.h >+++ b/drivers/gpu/drm/i915/i915_reg.h >@@ -7858,6 +7858,8 @@ enum { > #define TGL_DE_PORT_AUX_USBC3 (1 << 10) > #define TGL_DE_PORT_AUX_USBC2 (1 << 9) > #define TGL_DE_PORT_AUX_USBC1 (1 << 8) >+#define D13_DE_PORT_AUX_DDIE (1 << 13) >+#define D13_DE_PORT_AUX_DDID (1 << 12) maybe this is a gray area, but the rule here is to define following the bit order, regardless of the meaning of the bit. in gen8_de_port_aux_mask() I guess it's fine to leave it in the logical order, but here it would be good not to create exceptions. while at it, we could also add another commit to convert the surrounding code to REG_BIT() Lucas De Marchi > #define TGL_DE_PORT_AUX_DDIC (1 << 2) > #define TGL_DE_PORT_AUX_DDIB (1 << 1) > #define TGL_DE_PORT_AUX_DDIA (1 << 0) >-- >2.25.4 > >_______________________________________________ >Intel-gfx mailing list >Intel-gfx@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 06937a2d2714..1bced71470a5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2251,7 +2251,17 @@ static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv) { u32 mask; - if (INTEL_GEN(dev_priv) >= 12) + if (HAS_DISPLAY13(dev_priv)) + return TGL_DE_PORT_AUX_DDIA | + TGL_DE_PORT_AUX_DDIB | + TGL_DE_PORT_AUX_DDIC | + D13_DE_PORT_AUX_DDID | + D13_DE_PORT_AUX_DDIE | + TGL_DE_PORT_AUX_USBC1 | + TGL_DE_PORT_AUX_USBC2 | + TGL_DE_PORT_AUX_USBC3 | + TGL_DE_PORT_AUX_USBC4; + else if (INTEL_GEN(dev_priv) >= 12) return TGL_DE_PORT_AUX_DDIA | TGL_DE_PORT_AUX_DDIB | TGL_DE_PORT_AUX_DDIC | diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 3031897239a0..10fd0e3af2d4 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -7858,6 +7858,8 @@ enum { #define TGL_DE_PORT_AUX_USBC3 (1 << 10) #define TGL_DE_PORT_AUX_USBC2 (1 << 9) #define TGL_DE_PORT_AUX_USBC1 (1 << 8) +#define D13_DE_PORT_AUX_DDIE (1 << 13) +#define D13_DE_PORT_AUX_DDID (1 << 12) #define TGL_DE_PORT_AUX_DDIC (1 << 2) #define TGL_DE_PORT_AUX_DDIB (1 << 1) #define TGL_DE_PORT_AUX_DDIA (1 << 0)
Display13 has new AUX interrupt bits for DDI-D and DDI-E. Bspec: 50064 Cc: Anusha Srivatsa <anusha.srivatsa@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> --- drivers/gpu/drm/i915/i915_irq.c | 12 +++++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-)