Tiger Lake part 2
Subsystems (3)
cover Tiger Lake part 2
Second batch of patches for basic platform definition for Tiger Lake. This includes some patches from the first batch
(https://patchwork.freedesktop.org/series/62726/) but that were removed in order to merge that series earlier.
Stolen memory is on its own:
https://patchwork.freedesktop.org/series/63665/
This one includes: hotplug detection, initial support for Dekel phy (the TC phy replacing MG from Ice Lake), support to load the DMC firmware, some DP interrupts, initial workarounds and MOCS table.
Anusha Srivatsa (1):
drm/i915/dmc: Load DMC on TGL
Jordan Justen (1):
drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP
register
José Roberto de Souza (3):
drm/i915/tgl: Update north display hotplug detection to TGL
connections
drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
Lucas De Marchi (5):
drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization drm/i915/tgl: Add hpd interrupt handling drm/i915/tgl: handle DP aux interrupts drm/i915/tgl: re-indent code to prepare for DKL changes drm/i915/tgl: start adding the DKL PLLs to use on TC ports
Mahesh Kumar (2):
drm/i915/tgl: select correct bit for port select drm/i915/tgl: update ddi/tc clock_off bits
Michel Thierry (5):
drm/i915/gen12: add support for reading the timestamp frequency drm/i915/tgl: Introduce initial Tigerlake Workarounds drm/i915/tgl: Implement Wa_1604555607
drm/i915/tgl: Implement Wa_1406941453
drm/i915/tgl: Tigerlake only has global MOCS registers
Tomasz Lis (1):
drm/i915/tgl: Define MOCS entries for Tigerlake
Tvrtko Ursulin (1):
drm/i915: Move MOCS setup to intel_mocs.c
Vandita Kulkarni (3):
drm/i915/tgl: Add DKL phy pll registers drm/i915/tgl: Add DKL phy pll state calculations drm/i915/tgl: Add support for dkl pll write
drivers/gpu/drm/i915/display/intel_ddi.c | 47 ++- drivers/gpu/drm/i915/display/intel_display.c | 6 +- .../drm/i915/display/intel_display_power.c | 12 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 335 ++++++++++++++---- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/gt/intel_gt.c | 12 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 2 + drivers/gpu/drm/i915/gt/intel_mocs.c | 81 ++++- drivers/gpu/drm/i915/gt/intel_mocs.h | 2 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 53 ++- drivers/gpu/drm/i915/i915_debugfs.c | 21 +- drivers/gpu/drm/i915/i915_drv.h | 6 + drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 11 +- drivers/gpu/drm/i915/i915_irq.c | 195 ++++++++-- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/i915_reg.h | 169 ++++++++- drivers/gpu/drm/i915/intel_csr.c | 7 + drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_device_info.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 4 +- drivers/gpu/drm/i915/intel_uncore.c | 4 +- 23 files changed, 852 insertions(+), 134 deletions(-)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/22 drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization
According to the spec when initializing the display in TGL we should not set PORT_CL_DW12 for the Aux channel of the combo PHYs. We will re-use the power well hooks from ICL so only set this register on gen < 12.
v2: Generalize check for gen 12 (suggested by José)
v3: Rebase after enum phy introduction
--- drivers/gpu/drm/i915/display/intel_display_power.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_display_power.c +8 -4
@@ -458,8 +458,10 @@ icl_combo_phy_aux_power_well_enable(struct drm_i915_private *dev_priv, val =I915_READ (regs->driver);I915_WRITE (regs->driver, val |HSW_PWR_WELL_CTL_REQ (pw_idx)); - val =I915_READ (ICL_PORT_CL_DW12 (phy)); -I915_WRITE (ICL_PORT_CL_DW12 (phy), val |ICL_LANE_ENABLE_AUX ); +if (INTEL_GEN (dev_priv) <12 ) { + val =I915_READ (ICL_PORT_CL_DW12 (phy)); +I915_WRITE (ICL_PORT_CL_DW12 (phy), val |ICL_LANE_ENABLE_AUX ); + }hsw_wait_for_power_well_enable (dev_priv, power_well);
@@ -487,8 +489,10 @@ icl_combo_phy_aux_power_well_disable(struct drm_i915_private *dev_priv,enum phy phy =ICL_AUX_PW_TO_PHY (pw_idx);u32 val; - val =I915_READ (ICL_PORT_CL_DW12 (phy)); -I915_WRITE (ICL_PORT_CL_DW12 (phy), val & ~ICL_LANE_ENABLE_AUX ); +if (INTEL_GEN (dev_priv) <12 ) { + val =I915_READ (ICL_PORT_CL_DW12 (phy)); +I915_WRITE (ICL_PORT_CL_DW12 (phy), val & ~ICL_LANE_ENABLE_AUX ); + } val =I915_READ (regs->driver);I915_WRITE (regs->driver, val & ~HSW_PWR_WELL_CTL_REQ (pw_idx));
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 01/22] drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization
Quoted 9 lines · Lucas De Marchi
According to the spec when initializing the display in TGL we should not
setPORT_CL_DW12for the Aux channel of the combo PHYs. We will re- use the
power well hooks from ICL so only set this register on gen < 12.v2: Generalize check for gen 12 (suggested by José)
v3: Rebase after enum phy introduction
Quoted 41 lines
Cc Imre Deak <[email protected]>Cc Matt Roper <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>Reviewed-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_display_power.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_display_power.c +4
-2@@ -458,8 +458,10 @@ icl_combo_phy_aux_power_well_enable(structdrm_i915_private *dev_priv, val =I915_READ (regs->driver);I915_WRITE (regs->driver, val |HSW_PWR_WELL_CTL_REQ (pw_idx)); - val =I915_READ (ICL_PORT_CL_DW12 (phy)); -I915_WRITE (ICL_PORT_CL_DW12 (phy), val |ICL_LANE_ENABLE_AUX ); +if (INTEL_GEN (dev_priv) <12 ) { + val =I915_READ (ICL_PORT_CL_DW12 (phy)); +I915_WRITE (ICL_PORT_CL_DW12 (phy), val |ICL_LANE_ENABLE_AUX ); + }drivers/gpu/drm/i915/display/intel_display_power.c +4
-2hsw_wait_for_power_well_enable (dev_priv, power_well);@@ -487,8 +489,10 @@ icl_combo_phy_aux_power_well_disable(structdrm_i915_private *dev_priv, enum phy phy = ICL_AUX_PW_TO_PHY(pw_idx);u32 val; - val =I915_READ (ICL_PORT_CL_DW12 (phy)); -I915_WRITE (ICL_PORT_CL_DW12 (phy), val & ~ICL_LANE_ENABLE_AUX ); +if (INTEL_GEN (dev_priv) <12 ) { + val =I915_READ (ICL_PORT_CL_DW12 (phy)); +I915_WRITE (ICL_PORT_CL_DW12 (phy), val & ~ICL_LANE_ENABLE_AUX ); + }
drivers/gpu/drm/i915/display/intel_display_power.c icl_combo_phy_aux_power_well_disable(struct drm_i915_private *dev_priv, · line 498
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_display_power.c +0
-0val =I915_READ (regs->driver);I915_WRITE (regs->driver, val & ~HSW_PWR_WELL_CTL_REQ (pw_idx));
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/22 drm/i915/tgl: select correct bit for port select
In reply to Lucas De MarchiFrom: Mahesh Kumar <[email protected]>
Bit definitions for port-select got changed for TRANS_CLK_SEL & TRANS_DDI_FUNC_CTL registers in TGL.
v2 (Lucas):
- Nuke TRANS_DDI_PORT_NONE since it's 0: we are already clearing {TGL_,}TRANS_DDI_PORT_MASK (suggested by Ville)
- Also cover haswell_get_ddi_port_state() in intel_display.c that was missing
- Define macros using the _SHIFT macros so we don't lose other users
--- drivers/gpu/drm/i915/display/intel_ddi.c | 47 +++++++++++++++----- drivers/gpu/drm/i915/display/intel_display.c | 6 ++- drivers/gpu/drm/i915/i915_reg.h | 11 +++-- 3 files changed, 50 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +37 -10
@@ -1773,7 +1773,10 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)/* Enable TRANS_DDI_FUNC_CTL for the pipe to work in HDMI mode */ temp =TRANS_DDI_FUNC_ENABLE ; - temp |=TRANS_DDI_SELECT_PORT (port); +if (INTEL_GEN (dev_priv) >=12 ) + temp |=TGL_TRANS_DDI_SELECT_PORT (port); +else + temp |=TRANS_DDI_SELECT_PORT (port);switch (crtc_state->pipe_bpp) {case 18 :
@@ -1853,8 +1856,13 @@ void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_statei915_reg_t reg =TRANS_DDI_FUNC_CTL (cpu_transcoder);u32 val =I915_READ (reg); - val &= ~(TRANS_DDI_FUNC_ENABLE |TRANS_DDI_PORT_MASK |TRANS_DDI_DP_VC_PAYLOAD_ALLOC ); - val |=TRANS_DDI_PORT_NONE ; +if (INTEL_GEN (dev_priv) >=12 ) { + val &= ~(TRANS_DDI_FUNC_ENABLE |TGL_TRANS_DDI_PORT_MASK | +TRANS_DDI_DP_VC_PAYLOAD_ALLOC ); + }else { + val &= ~(TRANS_DDI_FUNC_ENABLE |TRANS_DDI_PORT_MASK | +TRANS_DDI_DP_VC_PAYLOAD_ALLOC ); + }I915_WRITE (reg, val); if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME &&
@@ -2006,10 +2014,19 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder, mst_pipe_mask =0 ;for_each_pipe (dev_priv, p) {enum transcoder cpu_transcoder = (enum transcoder )p; +unsigned int port_mask, ddi_select; + +if (INTEL_GEN (dev_priv) >=12 ) { + port_mask =TGL_TRANS_DDI_PORT_MASK ; + ddi_select =TGL_TRANS_DDI_SELECT_PORT (port); + }else { + port_mask =TRANS_DDI_PORT_MASK ; + ddi_select =TRANS_DDI_SELECT_PORT (port); + } tmp =I915_READ (TRANS_DDI_FUNC_CTL (cpu_transcoder)); -if ((tmp &TRANS_DDI_PORT_MASK ) !=TRANS_DDI_SELECT_PORT (port)) +if ((tmp & port_mask) != ddi_select)continue ; if ((tmp & TRANS_DDI_MODE_SELECT_MASK) ==
@@ -2126,9 +2143,14 @@ void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state)enum port port = encoder->port;enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; -if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_PORT (port)); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_PORT (port)); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_PORT (port)); + } }void intel_ddi_disable_pipe_clock (const struct intel_crtc_state *crtc_state)
@@ -2136,9 +2158,14 @@ void intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state)struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; -if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_DISABLED ); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_DISABLED ); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_DISABLED ); + } } static void _skl_ddi_set_iboost(struct drm_i915_private *dev_priv,
drivers/gpu/drm/i915/display/intel_display.c +5 -1
@@ -10353,7 +10353,11 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc, tmp =I915_READ (TRANS_DDI_FUNC_CTL (pipe_config->cpu_transcoder)); - port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ; +if (INTEL_GEN (dev_priv) >=12 ) + port = (tmp &TGL_TRANS_DDI_PORT_MASK ) >> +TGL_TRANS_DDI_PORT_SHIFT ; +else + port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ;if (INTEL_GEN (dev_priv) >=11 )icelake_get_ddi_pll (dev_priv, port, pipe_config);
drivers/gpu/drm/i915/i915_reg.h +8 -3
@@ -9391,10 +9391,12 @@ enum skl_power_gate {#define TRANS_DDI_FUNC_ENABLE (1 << 31)/* Those bits are ignored by pipe EDP since it can only connect to DDI A */ -#define TRANS_DDI_PORT_MASK (7 << 28)#define TRANS_DDI_PORT_SHIFT 28 -#define TRANS_DDI_SELECT_PORT (x) ((x) << 28) -#define TRANS_DDI_PORT_NONE (0 << 28) +#define TGL_TRANS_DDI_PORT_SHIFT 27 +#define TRANS_DDI_PORT_MASK (7 << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_PORT_MASK (0xf << TGL_TRANS_DDI_PORT_SHIFT) +#define TRANS_DDI_SELECT_PORT (x) ((x) << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_SELECT_PORT (x) (((x) + 1) << TGL_TRANS_DDI_PORT_SHIFT)#define TRANS_DDI_MODE_SELECT_MASK (7 << 24)#define TRANS_DDI_MODE_SELECT_HDMI (0 << 24)#define TRANS_DDI_MODE_SELECT_DVI (1 << 24)
@@ -9604,6 +9606,9 @@ enum skl_power_gate {/* For each transcoder, we need to select the corresponding port clock */ #define TRANS_CLK_SEL_DISABLED (0x0 << 29)#define TRANS_CLK_SEL_PORT (x) (((x) + 1) << 29) +#define TGL_TRANS_CLK_SEL_DISABLED (0x0 << 28) +#define TGL_TRANS_CLK_SEL_PORT (x) (((x) + 1) << 28) +#define CDCLK_FREQ _MMIO(0x46200)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 02/22] drm/i915/tgl: select correct bit for port select
Quoted 15 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Lucas De Marchi
Sent: Friday, July 12, 2019 6:09 PM
To: [email protected]
Cc: Mahesh Kumar <[email protected]>
Subject: [Intel-gfx] [PATCH 02/22] drm/i915/tgl: select correct bit for port selectFrom: Mahesh Kumar <[email protected]>
Bit definitions for port-select got changed for
TRANS_CLK_SEL&TRANS_DDI_FUNC_CTLregisters in TGL.
Quoted 6 lines
v2 (Lucas):
- NukeTRANS_DDI_PORT_NONEsince it's 0: we are already clearing {TGL_,}TRANS_DDI_PORT_MASK (suggested by Ville)
- Also coverhaswell_get_ddi_port_state()inintel_display.cthat was missing
- Define macros using the_SHIFTmacros so we don't lose other users
Looks good.
Quoted 163 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>---
drivers/gpu/drm/i915/display/intel_ddi.c | 47 +++++++++++++++----- drivers/gpu/drm/i915/display/intel_display.c | 6 ++- drivers/gpu/drm/i915/i915_reg.h | 11 +++-- 3 files changed, 50 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +4
-1@@ -1773,7 +1773,10 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)/* Enable TRANS_DDI_FUNC_CTL for the pipe to work in HDMI mode */ temp =TRANS_DDI_FUNC_ENABLE ; - temp |=TRANS_DDI_SELECT_PORT (port); +if (INTEL_GEN (dev_priv) >=12 ) + temp |=TGL_TRANS_DDI_SELECT_PORT (port); +else + temp |=TRANS_DDI_SELECT_PORT (port);switch (crtc_state->pipe_bpp) {case 18:drivers/gpu/drm/i915/display/intel_ddi.c +0
-0@@ -1853,8 +1856,13 @@ void intel_ddi_disable_transcoder_func(const struct
intel_crtc_state*crtc_statei915_reg_t reg = TRANS_DDI_FUNC_CTL(cpu_transcoder); u32 val = I915_READ(reg);drivers/gpu/drm/i915/display/intel_ddi.c +0
-1- val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK |
TRANS_DDI_DP_VC_PAYLOAD_ALLOC);drivers/gpu/drm/i915/display/intel_ddi.c +2
-1- val |=TRANS_DDI_PORT_NONE ; +if (INTEL_GEN (dev_priv) >=12 ) { + val &= ~(TRANS_DDI_FUNC_ENABLE |
TGL_TRANS_DDI_PORT_MASK|drivers/gpu/drm/i915/display/intel_ddi.c +3
-0+ TRANS_DDI_DP_VC_PAYLOAD_ALLOC); + }else { + val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK|
drivers/gpu/drm/i915/display/intel_ddi.c +2
-0+ TRANS_DDI_DP_VC_PAYLOAD_ALLOC); + }I915_WRITE(reg, val); if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME && @@ - 2006,10 +2014,19 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder, mst_pipe_mask = 0; for_each_pipe(dev_priv, p) { enum transcoder cpu_transcoder = (enum transcoder)p;drivers/gpu/drm/i915/display/intel_ddi.c +9
-0+unsigned int port_mask, ddi_select; + +if (INTEL_GEN (dev_priv) >=12 ) { + port_mask =TGL_TRANS_DDI_PORT_MASK ; + ddi_select =TGL_TRANS_DDI_SELECT_PORT (port); + }else { + port_mask =TRANS_DDI_PORT_MASK ; + ddi_select =TRANS_DDI_SELECT_PORT (port); + }tmp = I915_READ(TRANS_DDI_FUNC_CTL(cpu_transcoder));drivers/gpu/drm/i915/display/intel_ddi.c +0
-1- if ((tmp & TRANS_DDI_PORT_MASK) !=
TRANS_DDI_SELECT_PORT(port))drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+if ((tmp & port_mask) != ddi_select)continue; if ((tmp & TRANS_DDI_MODE_SELECT_MASK) == @@ -2126,9 +2143,14 @@ void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state) enum port port = encoder->port; enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;drivers/gpu/drm/i915/display/intel_ddi.c +8
-3-if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_PORT (port)); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_PORT (port)); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_PORT (port)); + }}
void
intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state)@@ -2136,9 +2158,14 @@ voidintel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state)struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;drivers/gpu/drm/i915/display/intel_ddi.c +8
-3-if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_DISABLED ); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_DISABLED ); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_DISABLED ); + }}
static void _skl_ddi_set_iboost(struct
drm_i915_private*dev_priv, diff --gita/drivers/gpu/drm/i915/display/intel_display.cb/drivers/gpu/drm/i915/display/intel_display.c
indexe25b82d07d4f..51e4f6798a6b100644drivers/gpu/drm/i915/display/intel_display.c +5
-1@@ -10353,7 +10353,11 @@ static void haswell_get_ddi_port_state(structintel_crtc *crtc, tmp =I915_READ (TRANS_DDI_FUNC_CTL (pipe_config- >cpu_transcoder)); - port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ; +if (INTEL_GEN (dev_priv) >=12 ) + port = (tmp &TGL_TRANS_DDI_PORT_MASK ) >> +TGL_TRANS_DDI_PORT_SHIFT ; +else + port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ;if (INTEL_GEN(dev_priv) >= 11) icelake_get_ddi_pll(dev_priv, port, pipe_config); diff --git
a/drivers/gpu/drm/i915/i915_reg.hb/drivers/gpu/drm/i915/i915_reg.hindex0dd4506323f2..def71fd2e4d1100644drivers/gpu/drm/i915/i915_reg.h +5
-3@@ -9391,10 +9391,12 @@ enum skl_power_gate {#define TRANS_DDI_FUNC_ENABLE (1 << 31)/* Those bits are ignored by pipe EDP since it can only connect to DDI A */ -#define TRANS_DDI_PORT_MASK (7 << 28)#define TRANS_DDI_PORT_SHIFT 28 -#define TRANS_DDI_SELECT_PORT (x) ((x) << 28) -#define TRANS_DDI_PORT_NONE (0 << 28) +#define TGL_TRANS_DDI_PORT_SHIFT 27 +#define TRANS_DDI_PORT_MASK (7 << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_PORT_MASK (0xf << TGL_TRANS_DDI_PORT_SHIFT) +#define TRANS_DDI_SELECT_PORT (x) ((x) << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_SELECT_PORT (x) (((x) + 1) << TGL_TRANS_DDI_PORT_SHIFT)#define TRANS_DDI_MODE_SELECT_MASK (7 << 24)#define TRANS_DDI_MODE_SELECT_HDMI (0 << 24)#define
TRANS_DDI_MODE_SELECT_DVI(1 << 24)drivers/gpu/drm/i915/i915_reg.h +3
-1@@ -9604,6 +9606,9 @@ enum skl_power_gate {/* For each transcoder, we need to select the corresponding port clock */ #define TRANS_CLK_SEL_DISABLED (0x0 << 29)#define TRANS_CLK_SEL_PORT (x) (((x) + 1) << 29) +#define TGL_TRANS_CLK_SEL_DISABLED (0x0 << 28) +#define TGL_TRANS_CLK_SEL_PORT (x) (((x) + 1) << 28) +#define CDCLK_FREQ _MMIO(0x46200) --2.21.0
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 02/22] drm/i915/tgl: select correct bit for port select
In reply to Lucas De MarchiQuoted 5 lines · Lucas De Marchi
From: Mahesh Kumar <[email protected]>
Bit definitions for port-select got changed for
TRANS_CLK_SEL&TRANS_DDI_FUNC_CTLregisters in TGL.
Quoted 9 lines
v2 (Lucas):
- NukeTRANS_DDI_PORT_NONEsince it's 0: we are already clearing {TGL_,}TRANS_DDI_PORT_MASK (suggested by Ville)
- Also coverhaswell_get_ddi_port_state()inintel_display.cthat
was
missing
- Define macros using the_SHIFTmacros so we don't lose other
users
Quoted 162 lines
Cc Ville Syrjälä <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 47 +++++++++++++++--- -- drivers/gpu/drm/i915/display/intel_display.c | 6 ++- drivers/gpu/drm/i915/i915_reg.h | 11 +++-- 3 files changed, 50 insertions(+), 14 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +4
-1@@ -1773,7 +1773,10 @@ void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state)/* Enable TRANS_DDI_FUNC_CTL for the pipe to work in HDMI mode */ temp =TRANS_DDI_FUNC_ENABLE ; - temp |=TRANS_DDI_SELECT_PORT (port); +if (INTEL_GEN (dev_priv) >=12 ) + temp |=TGL_TRANS_DDI_SELECT_PORT (port); +else + temp |=TRANS_DDI_SELECT_PORT (port);drivers/gpu/drm/i915/display/intel_ddi.c +0
-0switch (crtc_state->pipe_bpp) {case 18 :@@ -1853,8 +1856,13 @@ void intel_ddi_disable_transcoder_func(conststruct
intel_crtc_state*crtc_statedrivers/gpu/drm/i915/display/intel_ddi.c +0
-1i915_reg_t reg =TRANS_DDI_FUNC_CTL (cpu_transcoder);u32 val =I915_READ (reg); - val &= ~(TRANS_DDI_FUNC_ENABLE | TRANS_DDI_PORT_MASK |
TRANS_DDI_DP_VC_PAYLOAD_ALLOC);drivers/gpu/drm/i915/display/intel_ddi.c +2
-1- val |=TRANS_DDI_PORT_NONE ; +if (INTEL_GEN (dev_priv) >=12 ) { + val &= ~(TRANS_DDI_FUNC_ENABLE |
TGL_TRANS_DDI_PORT_MASK|drivers/gpu/drm/i915/display/intel_ddi.c +15
-1+ TRANS_DDI_DP_VC_PAYLOAD_ALLOC); + }else { + val &= ~(TRANS_DDI_FUNC_ENABLE |TRANS_DDI_PORT_MASK | +TRANS_DDI_DP_VC_PAYLOAD_ALLOC ); + }I915_WRITE (reg, val); if (dev_priv->quirks & QUIRK_INCREASE_DDI_DISABLED_TIME &&@@ -2006,10 +2014,19 @@ static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder, mst_pipe_mask =0 ;for_each_pipe (dev_priv, p) {enum transcoder cpu_transcoder = (enum transcoder )p; +unsigned int port_mask, ddi_select; + +if (INTEL_GEN (dev_priv) >=12 ) { + port_mask =TGL_TRANS_DDI_PORT_MASK ; + ddi_select =TGL_TRANS_DDI_SELECT_PORT (port); + }else { + port_mask =TRANS_DDI_PORT_MASK ; + ddi_select =TRANS_DDI_SELECT_PORT (port); + } tmp =I915_READ (TRANS_DDI_FUNC_CTL (cpu_transcoder)); -if ((tmp &TRANS_DDI_PORT_MASK ) != TRANS_DDI_SELECT_PORT(port)) +if ((tmp & port_mask) != ddi_select)continue ;drivers/gpu/drm/i915/display/intel_ddi.c +8
-3if ((tmp & TRANS_DDI_MODE_SELECT_MASK) ==@@ -2126,9 +2143,14 @@ void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state)enum port port = encoder->port;enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; -if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_PORT (port)); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_PORT (port)); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_PORT (port)); + } }void intel_ddi_disable_pipe_clock(const struct
intel_crtc_state*crtc_state)drivers/gpu/drm/i915/display/intel_ddi.c +8
-3@@ -2136,9 +2158,14 @@ void intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state)struct drm_i915_private *dev_priv =to_i915 (crtc_state- >base.crtc->dev);enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; -if (cpu_transcoder !=TRANSCODER_EDP ) -I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), -TRANS_CLK_SEL_DISABLED ); +if (cpu_transcoder !=TRANSCODER_EDP ) { +if (INTEL_GEN (dev_priv) >=12 ) +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TGL_TRANS_CLK_SEL_DISABLED ); +else +I915_WRITE (TRANS_CLK_SEL (cpu_transcoder), +TRANS_CLK_SEL_DISABLED ); + } }static void _skl_ddi_set_iboost(struct
drm_i915_private*dev_priv,drivers/gpu/drm/i915/display/intel_display.c +5
-1@@ -10353,7 +10353,11 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc, tmp =I915_READ (TRANS_DDI_FUNC_CTL (pipe_config- >cpu_transcoder)); - port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ; +if (INTEL_GEN (dev_priv) >=12 ) + port = (tmp &TGL_TRANS_DDI_PORT_MASK ) >> +TGL_TRANS_DDI_PORT_SHIFT ; +else + port = (tmp &TRANS_DDI_PORT_MASK ) >>TRANS_DDI_PORT_SHIFT ;drivers/gpu/drm/i915/display/intel_display.c +0
-0if (INTEL_GEN (dev_priv) >=11 )icelake_get_ddi_pll (dev_priv, port, pipe_config);drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -9391,10 +9391,12 @@ enum skl_power_gate {#define TRANS_DDI_FUNC_ENABLE (1 << 31)/* Those bits are ignored by pipe EDP since it can only connect to DDI A */
drivers/gpu/drm/i915/i915_reg.h +3
-3-#define TRANS_DDI_PORT_MASK (7 << 28)#define TRANS_DDI_PORT_SHIFT 28 -#define TRANS_DDI_SELECT_PORT (x) ((x) << 28) -#define TRANS_DDI_PORT_NONE (0 << 28) +#define TGL_TRANS_DDI_PORT_SHIFT 27 +#define TRANS_DDI_PORT_MASK (7 << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_PORT_MASK (0xf <<
TGL_TRANS_DDI_PORT_SHIFT)drivers/gpu/drm/i915/i915_reg.h +2
-0+#define TRANS_DDI_SELECT_PORT (x) ((x) << TRANS_DDI_PORT_SHIFT) +#define TGL_TRANS_DDI_SELECT_PORT (x) (((x) + 1) <<
TGL_TRANS_DDI_PORT_SHIFT)#define TRANS_DDI_MODE_SELECT_MASK (7 << 24) #define TRANS_DDI_MODE_SELECT_HDMI (0 << 24) #define TRANS_DDI_MODE_SELECT_DVI (1 << 24)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -9604,6 +9606,9 @@ enum skl_power_gate {/* For each transcoder, we need to select the corresponding port clock */
#defineTRANS_CLK_SEL_DISABLED(0x0<< 29)
#defineTRANS_CLK_SEL_PORT(x)(((x) + 1) << 29)
drivers/gpu/drm/i915/i915_reg.h enum skl_power_gate { · line 9613
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0+#define TGL_TRANS_CLK_SEL_DISABLED (0x0 << 28) +#define TGL_TRANS_CLK_SEL_PORT (x) (((x) + 1) << 28) +#define CDCLK_FREQ _MMIO(0x46200)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/22 drm/i915/tgl: update ddi/tc clock_off bits
In reply to Lucas De MarchiFrom: Mahesh Kumar <[email protected]>
In GEN 12 PORT_C DDI clk_off bit is not equally distanced to A/B, it's at offset 24. Similarly TC port (5/6) clk off bits are at offset 22/23. Extend the macros to cover the additional ports.
--- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
@@ -9749,8 +9749,9 @@ enum skl_power_gate {#define ICL_DPCLKA_CFGCR0 _MMIO(0x164280)#define ICL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy) (1 << _PICK(phy, 10, 11, 24)) -#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) == PORT_TC4 ? \ - 21 : (tc_port) + 12)) +#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) < PORT_TC4 ? \ + (tc_port) + 12 : \ + (tc_port) - PORT_TC4 + 21))#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy) ((phy) * 2)#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy) (3 << ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll, phy) ((pll) << ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/22] drm/i915/tgl: update ddi/tc clock_off bits
Quoted 12 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Lucas De Marchi
Sent: Friday, July 12, 2019 6:09 PM
To: [email protected]
Cc: Mahesh Kumar <[email protected]>
Subject: [Intel-gfx] [PATCH 03/22] drm/i915/tgl: update ddi/tcclock_offbitsFrom: Mahesh Kumar <[email protected]>
Quoted 7 lines
In GEN 12
PORT_CDDIclk_offbit is not equally distanced to A/B, it's at offset 24. Similarly TC port (5/6) clk off bits are at offset 22/23. Extend the macros to cover the additional ports.Cc Matt Roper <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Checked with spec, looks good.
Quoted 28 lines
---
drivers/gpu/drm/i915/i915_reg.h| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +3
-2@@ -9749,8 +9749,9 @@ enum skl_power_gate {#define ICL_DPCLKA_CFGCR0 _MMIO(0x164280)#define ICL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy) (1 << _PICK(phy, 10, 11, 24)) -#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) == PORT_TC4 ? \ - 21 : (tc_port) + 12)) +#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) <PORT_TC4 ? \ + (tc_port) +12 : \ + (tc_port) - PORT_TC4 + 21))#define
ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy)((phy) * 2)
#defineICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(phy)(3 <<ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
#defineICL_DPCLKA_CFGCR0_DDI_CLK_SEL(pll, phy)((pll) <<ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
--
2.21.0
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/22] drm/i915/tgl: update ddi/tc clock_off bits
In reply to Lucas De MarchiQuoted 6 lines · Lucas De Marchi
From: Mahesh Kumar <[email protected]>
In GEN 12
PORT_CDDIclk_offbit is not equally distanced to A/B, it's at offset 24. Similarly TC port (5/6) clk off bits are at offset 22/23. Extend the macros to cover the additional ports.
Quoted 26 lines
Cc Matt Roper <[email protected]>Signed-off-by Mahesh Kumar <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_reg.h +1
-2@@ -9749,8 +9749,9 @@ enum skl_power_gate {#define ICL_DPCLKA_CFGCR0 _MMIO(0x164280)#define ICL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy) (1 << _PICK(phy, 10, 11, 24)) -#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) == PORT_TC4 ? \ -21 : (tc_port) + 12)) +#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 <<((
tc_port) <PORT_TC4? \drivers/gpu/drm/i915/i915_reg.h +1
-0+ (tc_port) + 12 :\
drivers/gpu/drm/i915/i915_reg.h +1
-0+ (tc_port) -
Quoted 6 lines
PORT_TC4+ 21))
#defineICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy)((phy) * 2)
#defineICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(phy)(3 <<ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
#defineICL_DPCLKA_CFGCR0_DDI_CLK_SEL(pll, phy)((pll) <<ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/22 drm/i915/tgl: Add hpd interrupt handling
In reply to Lucas De MarchiAdd hotdplug detection for all ports on TGP. icp_hpd_detection_setup() is refactored to be shared with TGP.
While we increase the number of pins, add a BUILD_BUG_ON() to avoid going over the number of bits allowed.
--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_hotplug.c +6 -0
@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;
drivers/gpu/drm/i915/i915_drv.h +4 -0
@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };
drivers/gpu/drm/i915/i915_irq.c +117 -11
189 lines not on this page · raw message
drivers/gpu/drm/i915/i915_reg.h +27 -1
@@ -7868,12 +7868,15 @@ enum { SDE_FDI_RXB_CPT | \ SDE_FDI_RXA_CPT) -/* south display engine interrupt: ICP */ +/* south display engine interrupt: ICP/TGP */ +#define SDE_TC6_HOTPLUG_TGP (1 << 29) +#define SDE_TC5_HOTPLUG_TGP (1 << 28)#define SDE_TC4_HOTPLUG_ICP (1 << 27)#define SDE_TC3_HOTPLUG_ICP (1 << 26)#define SDE_TC2_HOTPLUG_ICP (1 << 25)#define SDE_TC1_HOTPLUG_ICP (1 << 24)#define SDE_GMBUS_ICP (1 << 23) +#define SDE_DDIC_HOTPLUG_TGP (1 << 18)#define SDE_DDIB_HOTPLUG_ICP (1 << 17)#define SDE_DDIA_HOTPLUG_ICP (1 << 16)#define SDE_TC_HOTPLUG_ICP (tc_port) (1 << ((tc_port) + 24))
@@ -7884,6 +7887,11 @@ enum { SDE_TC3_HOTPLUG_ICP | \ SDE_TC2_HOTPLUG_ICP | \ SDE_TC1_HOTPLUG_ICP) +#define SDE_DDI_MASK_TGP (SDE_DDIC_HOTPLUG_TGP | \ + SDE_DDI_MASK_ICP) +#define SDE_TC_MASK_TGP (SDE_TC6_HOTPLUG_TGP | \ + SDE_TC5_HOTPLUG_TGP | \ + SDE_TC_MASK_ICP)#define SDEISR _MMIO(0xc4000)#define SDEIMR _MMIO(0xc4004)
@@ -7951,6 +7959,12 @@ enum {*/ #define SHOTPLUG_CTL_DDI _MMIO(0xc4030) +#define TGP_DDIC_HPD_ENABLE (1 << 11) +#define TGP_DDIC_HPD_STATUS_MASK (3 << 8) +#define TGP_DDIC_HPD_NO_DETECT (0 << 8) +#define TGP_DDIC_HPD_SHORT_DETECT (1 << 8) +#define TGP_DDIC_HPD_LONG_DETECT (2 << 8) +#define TGP_DDIC_HPD_SHORT_LONG_DETECT (3 << 8)#define ICP_DDIB_HPD_ENABLE (1 << 7)#define ICP_DDIB_HPD_STATUS_MASK (3 << 4)#define ICP_DDIB_HPD_NO_DETECT (0 << 4)
@@ -8074,6 +8088,18 @@ enum {#define ICP_TC_HPD_LONG_DETECT (tc_port) (2 << (tc_port) * 4)#define ICP_TC_HPD_SHORT_DETECT (tc_port) (1 << (tc_port) * 4) +#define ICP_DDI_HPD_ENABLE_MASK (ICP_DDIB_HPD_ENABLE | \ + ICP_DDIA_HPD_ENABLE) +#define ICP_TC_HPD_ENABLE_MASK (ICP_TC_HPD_ENABLE(PORT_TC4) | \ + ICP_TC_HPD_ENABLE(PORT_TC3) | \ + ICP_TC_HPD_ENABLE(PORT_TC2) | \ + ICP_TC_HPD_ENABLE(PORT_TC1)) +#define TGP_DDI_HPD_ENABLE_MASK (TGP_DDIC_HPD_ENABLE | \ + ICP_DDI_HPD_ENABLE_MASK) +#define TGP_TC_HPD_ENABLE_MASK (ICP_TC_HPD_ENABLE(PORT_TC6) | \ + ICP_TC_HPD_ENABLE(PORT_TC5) | \ + ICP_TC_HPD_ENABLE_MASK) +#define _PCH_DPLL_A 0xc6014#define _PCH_DPLL_B 0xc6018#define PCH_DPLL (pll) _MMIO((pll) == 0 ? _PCH_DPLL_A : _PCH_DPLL_B)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling
Quoted 113 lines · Lucas De Marchi
Add hotdplug detection for all ports on TGP.
icp_hpd_detection_setup()is refactored to be shared with TGP.While we increase the number of pins, add a
BUILD_BUG_ON()to avoid going over the number of bits allowed.Cc Jose Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hotplug.c +6
-0@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };drivers/gpu/drm/i915/i915_irq.c +46
-0@@ -148,6 +148,18 @@ static const u32 hpd_mcc[HPD_NUM_PINS] = { [HPD_PORT_C] = SDE_TC1_HOTPLUG_ICP }; +static const u32 hpd_tgp[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , + [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP , + [HPD_PORT_C ] =SDE_DDIC_HOTPLUG_TGP , + [HPD_PORT_D ] =SDE_TC1_HOTPLUG_ICP , + [HPD_PORT_E ] =SDE_TC2_HOTPLUG_ICP , + [HPD_PORT_F ] =SDE_TC3_HOTPLUG_ICP , + [HPD_PORT_G ] =SDE_TC4_HOTPLUG_ICP , + [HPD_PORT_H ] =SDE_TC5_HOTPLUG_TGP , + [HPD_PORT_I ] =SDE_TC6_HOTPLUG_TGP , +}; +static void gen3_irq_reset (struct intel_uncore *uncore,i915_reg_t imr,i915_reg_t iir,i915_reg_t ier) {@@ -1706,6 +1718,40 @@ static bool icp_tc_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool tgp_ddi_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_A : +return val &ICP_DDIA_HPD_LONG_DETECT ; +case HPD_PORT_B : +return val &ICP_DDIB_HPD_LONG_DETECT ; +case HPD_PORT_C : +return val &TGP_DDIC_HPD_LONG_DETECT ; +default : +return false; + } +} + +static bool tgp_tc_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool spt_port_hotplug2_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {
drivers/gpu/drm/i915/i915_irq.c static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, · line 1834
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +1
-0@@ -1785,6 +1831,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, {enum hpd_pin pin; +BUILD_BUG_ON (sizeof (int ) *8 <HPD_NUM_PINS );
BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask)); would be a clearer way to express that.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling
Quoted 117 lines · Ville Syrjälä
Quoted 116 lines · Lucas De Marchi
Add hotdplug detection for all ports on TGP.
icp_hpd_detection_setup()is refactored to be shared with TGP.While we increase the number of pins, add a
BUILD_BUG_ON()to avoid going over the number of bits allowed.Cc Jose Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hotplug.c +6
-0@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };drivers/gpu/drm/i915/i915_irq.c +46
-0@@ -148,6 +148,18 @@ static const u32 hpd_mcc[HPD_NUM_PINS] = { [HPD_PORT_C] = SDE_TC1_HOTPLUG_ICP }; +static const u32 hpd_tgp[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , + [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP , + [HPD_PORT_C ] =SDE_DDIC_HOTPLUG_TGP , + [HPD_PORT_D ] =SDE_TC1_HOTPLUG_ICP , + [HPD_PORT_E ] =SDE_TC2_HOTPLUG_ICP , + [HPD_PORT_F ] =SDE_TC3_HOTPLUG_ICP , + [HPD_PORT_G ] =SDE_TC4_HOTPLUG_ICP , + [HPD_PORT_H ] =SDE_TC5_HOTPLUG_TGP , + [HPD_PORT_I ] =SDE_TC6_HOTPLUG_TGP , +}; +static void gen3_irq_reset (struct intel_uncore *uncore,i915_reg_t imr,i915_reg_t iir,i915_reg_t ier) {@@ -1706,6 +1718,40 @@ static bool icp_tc_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool tgp_ddi_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_A : +return val &ICP_DDIA_HPD_LONG_DETECT ; +case HPD_PORT_B : +return val &ICP_DDIB_HPD_LONG_DETECT ; +case HPD_PORT_C : +return val &TGP_DDIC_HPD_LONG_DETECT ; +default : +return false; + } +} + +static bool tgp_tc_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool spt_port_hotplug2_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {@@ -1785,6 +1831,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, {enum hpd_pin pin;
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, · line 1834
Quoted 1 line
drivers/gpu/drm/i915/i915_irq.c +1
-0+BUILD_BUG_ON (sizeof (int ) *8 <HPD_NUM_PINS );
BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask)); would be a clearer way to express that.
For the BITS_PER_TYPE, ok. But for the swapped order, checkpatch doesn't agree:
8b77abf61be2 (HEAD) drm/i915/tgl: Add hpd interrupt handling
-:117: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #117: FILE: drivers/gpu/drm/i915/i915_irq.c:1852:
+ BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask));
Note: Initially I did with the same order you suggested and had to swap it while cleaning up the checkpatch warnings.
Lucas De Marchi
Quoted 4 lines
Signature · 3 lines
-- Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling
Quoted 126 lines · Lucas De Marchi
Quoted 117 lines · Ville Syrjälä
Quoted 116 lines · Lucas De Marchi
Add hotdplug detection for all ports on TGP.
icp_hpd_detection_setup()is refactored to be shared with TGP.While we increase the number of pins, add a
BUILD_BUG_ON()to avoid going over the number of bits allowed.Cc Jose Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hotplug.c +6
-0@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };drivers/gpu/drm/i915/i915_irq.c +46
-0@@ -148,6 +148,18 @@ static const u32 hpd_mcc[HPD_NUM_PINS] = { [HPD_PORT_C] = SDE_TC1_HOTPLUG_ICP }; +static const u32 hpd_tgp[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , + [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP , + [HPD_PORT_C ] =SDE_DDIC_HOTPLUG_TGP , + [HPD_PORT_D ] =SDE_TC1_HOTPLUG_ICP , + [HPD_PORT_E ] =SDE_TC2_HOTPLUG_ICP , + [HPD_PORT_F ] =SDE_TC3_HOTPLUG_ICP , + [HPD_PORT_G ] =SDE_TC4_HOTPLUG_ICP , + [HPD_PORT_H ] =SDE_TC5_HOTPLUG_TGP , + [HPD_PORT_I ] =SDE_TC6_HOTPLUG_TGP , +}; +static void gen3_irq_reset (struct intel_uncore *uncore,i915_reg_t imr,i915_reg_t iir,i915_reg_t ier) {@@ -1706,6 +1718,40 @@ static bool icp_tc_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool tgp_ddi_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_A : +return val &ICP_DDIA_HPD_LONG_DETECT ; +case HPD_PORT_B : +return val &ICP_DDIB_HPD_LONG_DETECT ; +case HPD_PORT_C : +return val &TGP_DDIC_HPD_LONG_DETECT ; +default : +return false; + } +} + +static bool tgp_tc_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool spt_port_hotplug2_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {@@ -1785,6 +1831,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, {enum hpd_pin pin;Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, · line 1834
Quoted 1 line
drivers/gpu/drm/i915/i915_irq.c +1
-0+BUILD_BUG_ON (sizeof (int ) *8 <HPD_NUM_PINS );
BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask)); would be a clearer way to express that.For the
BITS_PER_TYPE, ok. But for the swapped order, checkpatch doesn't agree:
Quoted 7 lines
8b77abf61be2(HEAD) drm/i915/tgl: Add hpd interrupt handling
-:117: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #117: FILE:drivers/gpu/drm/i915/i915_irq.c:1852:
+BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask));Note: Initially I did with the same order you suggested and had to swap it while cleaning up the checkpatch warnings.
Checkpatch is stupid. HPD_NUM_PINS is clearly the "variable" we're trying to check here, not the constant we're checking against.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling
Quoted 132 lines · Ville Syrjälä
Quoted 131 lines · Lucas De Marchi
Quoted 117 lines · Ville Syrjälä
Quoted 116 lines · Lucas De Marchi
Add hotdplug detection for all ports on TGP.
icp_hpd_detection_setup()is refactored to be shared with TGP.While we increase the number of pins, add a
BUILD_BUG_ON()to avoid going over the number of bits allowed.Cc Jose Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hotplug.c +6
-0@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };drivers/gpu/drm/i915/i915_irq.c +46
-0@@ -148,6 +148,18 @@ static const u32 hpd_mcc[HPD_NUM_PINS] = { [HPD_PORT_C] = SDE_TC1_HOTPLUG_ICP }; +static const u32 hpd_tgp[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , + [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP , + [HPD_PORT_C ] =SDE_DDIC_HOTPLUG_TGP , + [HPD_PORT_D ] =SDE_TC1_HOTPLUG_ICP , + [HPD_PORT_E ] =SDE_TC2_HOTPLUG_ICP , + [HPD_PORT_F ] =SDE_TC3_HOTPLUG_ICP , + [HPD_PORT_G ] =SDE_TC4_HOTPLUG_ICP , + [HPD_PORT_H ] =SDE_TC5_HOTPLUG_TGP , + [HPD_PORT_I ] =SDE_TC6_HOTPLUG_TGP , +}; +static void gen3_irq_reset (struct intel_uncore *uncore,i915_reg_t imr,i915_reg_t iir,i915_reg_t ier) {@@ -1706,6 +1718,40 @@ static bool icp_tc_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool tgp_ddi_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_A : +return val &ICP_DDIA_HPD_LONG_DETECT ; +case HPD_PORT_B : +return val &ICP_DDIB_HPD_LONG_DETECT ; +case HPD_PORT_C : +return val &TGP_DDIC_HPD_LONG_DETECT ; +default : +return false; + } +} + +static bool tgp_tc_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool spt_port_hotplug2_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {@@ -1785,6 +1831,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, {enum hpd_pin pin;Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, · line 1834
Quoted 1 line
drivers/gpu/drm/i915/i915_irq.c +1
-0+BUILD_BUG_ON (sizeof (int ) *8 <HPD_NUM_PINS );
BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask)); would be a clearer way to express that.For the
BITS_PER_TYPE, ok. But for the swapped order, checkpatch doesn't agree:
8b77abf61be2(HEAD) drm/i915/tgl: Add hpd interrupt handling
-:117: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #117: FILE:drivers/gpu/drm/i915/i915_irq.c:1852:
+BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask));
Quoted 5 lines
Quoted 2 lines
Note: Initially I did with the same order you suggested and had to swap it while cleaning up the checkpatch warnings.
Checkpatch is stupid.
HPD_NUM_PINSis clearly the "variable" we're trying to check here, not the constant we're checking against.
Well, I guess you can argue either way. But this is the way my brain wants to read this :)
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/22] drm/i915/tgl: Add hpd interrupt handling
Quoted 133 lines · Ville Syrjälä
Quoted 132 lines · Ville Syrjälä
Quoted 131 lines · Lucas De Marchi
Quoted 117 lines · Ville Syrjälä
Quoted 116 lines · Lucas De Marchi
Add hotdplug detection for all ports on TGP.
icp_hpd_detection_setup()is refactored to be shared with TGP.While we increase the number of pins, add a
BUILD_BUG_ON()to avoid going over the number of bits allowed.Cc Jose Souza <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_hotplug.c | 6 + drivers/gpu/drm/i915/i915_drv.h | 4 + drivers/gpu/drm/i915/i915_irq.c | 128 +++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 28 +++- 4 files changed, 154 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hotplug.c +6
-0@@ -104,6 +104,12 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,if (IS_CNL_WITH_PORT_F (dev_priv))return HPD_PORT_E ;return HPD_PORT_F ; +case PORT_G : +return HPD_PORT_G ; +case PORT_H : +return HPD_PORT_H ; +case PORT_I : +return HPD_PORT_I ;default :MISSING_CASE (port);return HPD_NONE ;drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -153,6 +153,10 @@ enum hpd_pin {HPD_PORT_D ,HPD_PORT_E ,HPD_PORT_F , +HPD_PORT_G , +HPD_PORT_H , +HPD_PORT_I , + HPD_NUM_PINS };drivers/gpu/drm/i915/i915_irq.c +46
-0@@ -148,6 +148,18 @@ static const u32 hpd_mcc[HPD_NUM_PINS] = { [HPD_PORT_C] = SDE_TC1_HOTPLUG_ICP }; +static const u32 hpd_tgp[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , + [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP , + [HPD_PORT_C ] =SDE_DDIC_HOTPLUG_TGP , + [HPD_PORT_D ] =SDE_TC1_HOTPLUG_ICP , + [HPD_PORT_E ] =SDE_TC2_HOTPLUG_ICP , + [HPD_PORT_F ] =SDE_TC3_HOTPLUG_ICP , + [HPD_PORT_G ] =SDE_TC4_HOTPLUG_ICP , + [HPD_PORT_H ] =SDE_TC5_HOTPLUG_TGP , + [HPD_PORT_I ] =SDE_TC6_HOTPLUG_TGP , +}; +static void gen3_irq_reset (struct intel_uncore *uncore,i915_reg_t imr,i915_reg_t iir,i915_reg_t ier) {@@ -1706,6 +1718,40 @@ static bool icp_tc_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool tgp_ddi_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_A : +return val &ICP_DDIA_HPD_LONG_DETECT ; +case HPD_PORT_B : +return val &ICP_DDIB_HPD_LONG_DETECT ; +case HPD_PORT_C : +return val &TGP_DDIC_HPD_LONG_DETECT ; +default : +return false; + } +} + +static bool tgp_tc_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &ICP_TC_HPD_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool spt_port_hotplug2_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {@@ -1785,6 +1831,8 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, {enum hpd_pin pin;Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c static void intel_get_hpd_pins(struct drm_i915_private *dev_priv, · line 1834
Quoted 1 line
drivers/gpu/drm/i915/i915_irq.c +1
-0+BUILD_BUG_ON (sizeof (int ) *8 <HPD_NUM_PINS );
BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask)); would be a clearer way to express that.For the
BITS_PER_TYPE, ok. But for the swapped order, checkpatch doesn't agree:
8b77abf61be2(HEAD) drm/i915/tgl: Add hpd interrupt handling
-:117: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test #117: FILE:drivers/gpu/drm/i915/i915_irq.c:1852:
+BUILD_BUG_ON(HPD_NUM_PINS > BITS_PER_TYPE(*pin_mask));
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Note: Initially I did with the same order you suggested and had to swap it while cleaning up the checkpatch warnings.
Checkpatch is stupid.
HPD_NUM_PINSis clearly the "variable" we're trying to check here, not the constant we're checking against.Well, I guess you can argue either way. But this is the way my brain wants to read this :)
my brain read it that way, too. Then after reading the warning I
thought: humnn... there's a constant written in stone and one that depends on the size of that type: maybe I'm wrong and checkpatch is right. So I changed the order.
Since we both agree prefer HPD_NUM_PINS as a variable, I will ignore checkpatch here and swap it back.
Lucas De Marchi
Quoted 4 lines
Signature · 3 lines
-- Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/22 drm/i915/tgl: Update north display hotplug detection to TGL connections
In reply to Lucas De MarchiFrom: José Roberto de Souza <[email protected]>
TGL has 3 combophys and 6 TC/TBT ports, so it has 2 more TC/TBT ports than ICL and the PORT_C on TGL is a combophy.
So here adding a new hpd north table and function to detect long pulse for TGL.
--- drivers/gpu/drm/i915/i915_irq.c | 51 +++++++++++++++++++++++++++++---- drivers/gpu/drm/i915/i915_reg.h | 12 ++++++-- 2 files changed, 56 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +46 -5
@@ -56,6 +56,8 @@* and related files, but that will be described in separate chapters. */ +typedef bool (*long_pulse_detect_func )(enum hpd_pin pin,u32 val); +static const u32 hpd_ilk[HPD_NUM_PINS ] = { [HPD_PORT_A ] =DE_DP_A_HOTPLUG , };
@@ -133,6 +135,15 @@ static const u32 hpd_gen11[HPD_NUM_PINS] = { [HPD_PORT_F ] =GEN11_TC4_HOTPLUG |GEN11_TBT4_HOTPLUG }; +static const u32 hpd_gen12[HPD_NUM_PINS ] = { + [HPD_PORT_D ] =GEN11_TC1_HOTPLUG |GEN11_TBT1_HOTPLUG , + [HPD_PORT_E ] =GEN11_TC2_HOTPLUG |GEN11_TBT2_HOTPLUG , + [HPD_PORT_F ] =GEN11_TC3_HOTPLUG |GEN11_TBT3_HOTPLUG , + [HPD_PORT_G ] =GEN11_TC4_HOTPLUG |GEN11_TBT4_HOTPLUG , + [HPD_PORT_H ] =GEN12_TC5_HOTPLUG |GEN12_TBT5_HOTPLUG , + [HPD_PORT_I ] =GEN12_TC6_HOTPLUG |GEN12_TBT6_HOTPLUG +}; +static const u32 hpd_icp[HPD_NUM_PINS ] = { [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP ,
@@ -1676,6 +1687,26 @@ static bool gen11_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool gen12_port_hotplug_long_detect (enum hpd_pin pin,u32 val) +{ +switch (pin) { +case HPD_PORT_D : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool bxt_port_hotplug_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {
@@ -2869,6 +2900,16 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)u32 pin_mask =0 , long_mask =0 ;u32 trigger_tc = iir &GEN11_DE_TC_HOTPLUG_MASK ;u32 trigger_tbt = iir &GEN11_DE_TBT_HOTPLUG_MASK ; +long_pulse_detect_func long_pulse_detect; +const u32 *hpd; + +if (INTEL_GEN (dev_priv) >=12 ) { + long_pulse_detect = gen12_port_hotplug_long_detect; + hpd = hpd_gen12; + }else { + long_pulse_detect = gen11_port_hotplug_long_detect; + hpd = hpd_gen11; + }if (trigger_tc) {u32 dig_hotplug_reg;
@@ -2877,8 +2918,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)I915_WRITE (GEN11_TC_HOTPLUG_CTL , dig_hotplug_reg);intel_get_hpd_pins (dev_priv, &pin_mask, &long_mask, trigger_tc, - dig_hotplug_reg, hpd_gen11, - gen11_port_hotplug_long_detect); + dig_hotplug_reg, hpd, long_pulse_detect); }if (trigger_tbt) {
@@ -2888,8 +2928,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)I915_WRITE (GEN11_TBT_HOTPLUG_CTL , dig_hotplug_reg);intel_get_hpd_pins (dev_priv, &pin_mask, &long_mask, trigger_tbt, - dig_hotplug_reg, hpd_gen11, - gen11_port_hotplug_long_detect); + dig_hotplug_reg, hpd, long_pulse_detect); }if (pin_mask)
@@ -3915,9 +3954,11 @@ static void gen11_hpd_detection_setup(struct drm_i915_private *dev_priv)static void gen11_hpd_irq_setup (struct drm_i915_private *dev_priv) {u32 hotplug_irqs, enabled_irqs; +const u32 *hpd;u32 val; - enabled_irqs =intel_hpd_enabled_irqs (dev_priv, hpd_gen11); + hpd =INTEL_GEN (dev_priv) >=12 ? hpd_gen12 : hpd_gen11; + enabled_irqs =intel_hpd_enabled_irqs (dev_priv, hpd); hotplug_irqs =GEN11_DE_TC_HOTPLUG_MASK |GEN11_DE_TBT_HOTPLUG_MASK ; val =I915_READ (GEN11_DE_HPD_IMR );
drivers/gpu/drm/i915/i915_reg.h +10 -2
@@ -7471,21 +7471,29 @@ enum {#define GEN11_DE_HPD_IMR _MMIO(0x44474)#define GEN11_DE_HPD_IIR _MMIO(0x44478)#define GEN11_DE_HPD_IER _MMIO(0x4447c) +#define GEN12_TC6_HOTPLUG (1 << 21) +#define GEN12_TC5_HOTPLUG (1 << 20)#define GEN11_TC4_HOTPLUG (1 << 19)#define GEN11_TC3_HOTPLUG (1 << 18)#define GEN11_TC2_HOTPLUG (1 << 17)#define GEN11_TC1_HOTPLUG (1 << 16)#define GEN11_TC_HOTPLUG (tc_port) (1 << ((tc_port) + 16)) -#define GEN11_DE_TC_HOTPLUG_MASK (GEN11_TC4_HOTPLUG | \ +#define GEN11_DE_TC_HOTPLUG_MASK (GEN12_TC6_HOTPLUG | \ + GEN12_TC5_HOTPLUG | \ + GEN11_TC4_HOTPLUG | \ GEN11_TC3_HOTPLUG | \ GEN11_TC2_HOTPLUG | \ GEN11_TC1_HOTPLUG) +#define GEN12_TBT6_HOTPLUG (1 << 5) +#define GEN12_TBT5_HOTPLUG (1 << 4)#define GEN11_TBT4_HOTPLUG (1 << 3)#define GEN11_TBT3_HOTPLUG (1 << 2)#define GEN11_TBT2_HOTPLUG (1 << 1)#define GEN11_TBT1_HOTPLUG (1 << 0)#define GEN11_TBT_HOTPLUG (tc_port) (1 << (tc_port)) -#define GEN11_DE_TBT_HOTPLUG_MASK (GEN11_TBT4_HOTPLUG | \ +#define GEN11_DE_TBT_HOTPLUG_MASK (GEN12_TBT6_HOTPLUG | \ + GEN12_TBT5_HOTPLUG | \ + GEN11_TBT4_HOTPLUG | \ GEN11_TBT3_HOTPLUG | \ GEN11_TBT2_HOTPLUG | \ GEN11_TBT1_HOTPLUG)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 05/22] drm/i915/tgl: Update north display hotplug detection to TGL connections
Quoted 10 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Lucas De Marchi
Sent: Friday, July 12, 2019 6:09 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 05/22] drm/i915/tgl: Update north display hotplug detection to TGL connections
Quoted 8 lines
From: José Roberto de Souza <[email protected]>
TGL has 3 combophys and 6 TC/TBT ports, so it has 2 more TC/TBT ports than ICL and the
PORT_Con TGL is a combophy.
So here adding a new hpd north table and function to detect long pulse for TGL.Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 154 lines
---
drivers/gpu/drm/i915/i915_irq.c| 51 +++++++++++++++++++++++++++++----drivers/gpu/drm/i915/i915_reg.h| 12 ++++++--2 files changed, 56 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +39
-0@@ -56,6 +56,8 @@* and related files, but that will be described in separate chapters. */ +typedef bool (*long_pulse_detect_func )(enum hpd_pin pin,u32 val); +static const u32 hpd_ilk[HPD_NUM_PINS ] = { [HPD_PORT_A ] =DE_DP_A_HOTPLUG , };@@ -133,6 +135,15 @@ static const u32 hpd_gen11[HPD_NUM_PINS] = { [HPD_PORT_F] = GEN11_TC4_HOTPLUG | GEN11_TBT4_HOTPLUG }; +static const u32 hpd_gen12[HPD_NUM_PINS ] = { + [HPD_PORT_D ] =GEN11_TC1_HOTPLUG |GEN11_TBT1_HOTPLUG , + [HPD_PORT_E ] =GEN11_TC2_HOTPLUG |GEN11_TBT2_HOTPLUG , + [HPD_PORT_F ] =GEN11_TC3_HOTPLUG |GEN11_TBT3_HOTPLUG , + [HPD_PORT_G ] =GEN11_TC4_HOTPLUG |GEN11_TBT4_HOTPLUG , + [HPD_PORT_H ] =GEN12_TC5_HOTPLUG |GEN12_TBT5_HOTPLUG , + [HPD_PORT_I ] =GEN12_TC6_HOTPLUG |GEN12_TBT6_HOTPLUG }; +static const u32 hpd_icp[HPD_NUM_PINS ] = { [HPD_PORT_A ] =SDE_DDIA_HOTPLUG_ICP , [HPD_PORT_B ] =SDE_DDIB_HOTPLUG_ICP ,@@ -1676,6 +1687,26 @@ static bool gen11_port_hotplug_long_detect(enum hpd_pin pin, u32 val) } } +static bool gen12_port_hotplug_long_detect (enum hpd_pin pin,u32 val) { +switch (pin) { +case HPD_PORT_D : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC1 ); +case HPD_PORT_E : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC2 ); +case HPD_PORT_F : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC3 ); +case HPD_PORT_G : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC4 ); +case HPD_PORT_H : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC5 ); +case HPD_PORT_I : +return val &GEN11_HOTPLUG_CTL_LONG_DETECT (PORT_TC6 ); +default : +return false; + } +} +static bool bxt_port_hotplug_long_detect (enum hpd_pin pin,u32 val) {switch (pin) {@@ -2869,6 +2900,16 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir) u32 pin_mask = 0, long_mask = 0;u32 trigger_tc = iir &GEN11_DE_TC_HOTPLUG_MASK ;u32 trigger_tbt = iir &GEN11_DE_TBT_HOTPLUG_MASK ; +long_pulse_detect_func long_pulse_detect; +const u32 *hpd; + +if (INTEL_GEN (dev_priv) >=12 ) { + long_pulse_detect = gen12_port_hotplug_long_detect; + hpd = hpd_gen12; + }else { + long_pulse_detect = gen11_port_hotplug_long_detect; + hpd = hpd_gen11; + }if (trigger_tc) {u32 dig_hotplug_reg;drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -2877,8 +2918,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)I915_WRITE (GEN11_TC_HOTPLUG_CTL ,dig_hotplug_reg );intel_get_hpd_pins (dev_priv, &pin_mask, &long_mask, trigger_tc, - dig_hotplug_reg, hpd_gen11, - gen11_port_hotplug_long_detect); + dig_hotplug_reg, hpd, long_pulse_detect); }if (trigger_tbt) {drivers/gpu/drm/i915/i915_irq.c +1
-2@@ -2888,8 +2928,7 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)I915_WRITE (GEN11_TBT_HOTPLUG_CTL ,dig_hotplug_reg );intel_get_hpd_pins (dev_priv, &pin_mask, &long_mask, trigger_tbt, - dig_hotplug_reg, hpd_gen11, - gen11_port_hotplug_long_detect); + dig_hotplug_reg, hpd, long_pulse_detect); }if (
pin_mask)drivers/gpu/drm/i915/i915_irq.c +0
-0@@ -3915,9 +3954,11 @@ static void gen11_hpd_detection_setup(struct
drm_i915_private*dev_priv) static void gen11_hpd_irq_setup(structdrm_i915_private *dev_priv) { u32 hotplug_irqs, enabled_irqs;drivers/gpu/drm/i915/i915_irq.c +1
-0+const u32 *hpd;u32 val;drivers/gpu/drm/i915/i915_irq.c +2
-1- enabled_irqs =intel_hpd_enabled_irqs (dev_priv, hpd_gen11); + hpd =INTEL_GEN (dev_priv) >=12 ? hpd_gen12 : hpd_gen11; + enabled_irqs =intel_hpd_enabled_irqs (dev_priv, hpd);
hotplug_irqs=GEN11_DE_TC_HOTPLUG_MASK|GEN11_DE_TBT_HOTPLUG_MASK;val = I915_READ(GEN11_DE_HPD_IMR);drivers/gpu/drm/i915/i915_reg.h +8
-2@@ -7471,21 +7471,29 @@ enum {#define GEN11_DE_HPD_IMR _MMIO(0x44474)#define GEN11_DE_HPD_IIR _MMIO(0x44478)#define GEN11_DE_HPD_IER _MMIO(0x4447c) +#define GEN12_TC6_HOTPLUG (1 << 21) +#define GEN12_TC5_HOTPLUG (1 << 20)#define GEN11_TC4_HOTPLUG (1 << 19)#define GEN11_TC3_HOTPLUG (1 << 18)#define GEN11_TC2_HOTPLUG (1 << 17)#define GEN11_TC1_HOTPLUG (1 << 16)#define GEN11_TC_HOTPLUG (tc_port) (1 << ((tc_port) + 16)) -#define GEN11_DE_TC_HOTPLUG_MASK (GEN11_TC4_HOTPLUG | \ +#define GEN11_DE_TC_HOTPLUG_MASK (GEN12_TC6_HOTPLUG | \ + GEN12_TC5_HOTPLUG | \ + GEN11_TC4_HOTPLUG | \ GEN11_TC3_HOTPLUG | \ GEN11_TC2_HOTPLUG | \ GEN11_TC1_HOTPLUG) +#define GEN12_TBT6_HOTPLUG (1 << 5) +#define GEN12_TBT5_HOTPLUG (1 << 4)#define GEN11_TBT4_HOTPLUG (1 << 3)#define GEN11_TBT3_HOTPLUG (1 << 2)#define GEN11_TBT2_HOTPLUG (1 << 1)#define GEN11_TBT1_HOTPLUG (1 << 0)#define GEN11_TBT_HOTPLUG (tc_port) (1 << (tc_port)) -#define GEN11_DE_TBT_HOTPLUG_MASK (GEN11_TBT4_HOTPLUG | \ +#define GEN11_DE_TBT_HOTPLUG_MASK (GEN12_TBT6_HOTPLUG | \drivers/gpu/drm/i915/i915_reg.h +2
-0+GEN12_TBT5_HOTPLUG | \ + GEN11_TBT4_HOTPLUG | \GEN11_TBT3_HOTPLUG | \ GEN11_TBT2_HOTPLUG | \ GEN11_TBT1_HOTPLUG)
Quoted 7 lines
--
2.21.0_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/22 drm/i915/tgl: handle DP aux interrupts
In reply to Lucas De MarchiFor Tiger Lake the DE Port Interrupt Definition bits changed, so use the new bit definitions.
--- drivers/gpu/drm/i915/i915_irq.c | 16 +++++++++++----- drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +11 -5
@@ -2939,19 +2939,25 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)static u32 gen8_de_port_aux_mask (struct drm_i915_private *dev_priv) { -u32 mask =GEN8_AUX_CHANNEL_A ; +u32 mask; + +if (INTEL_GEN (dev_priv) >=12 ) +/* TODO: Add AUX entries for USBC */ +return TGL_DE_PORT_AUX_DDIA | +TGL_DE_PORT_AUX_DDIB | +TGL_DE_PORT_AUX_DDIC ; + mask =GEN8_AUX_CHANNEL_A ;if (INTEL_GEN (dev_priv) >=9 ) mask |=GEN9_AUX_CHANNEL_B |GEN9_AUX_CHANNEL_C |GEN9_AUX_CHANNEL_D ; -if (IS_CNL_WITH_PORT_F (dev_priv)) +if (IS_CNL_WITH_PORT_F (dev_priv) ||IS_GEN (dev_priv,11 )) mask |=CNL_AUX_CHANNEL_F ; -if (INTEL_GEN (dev_priv) >=11 ) - mask |=ICL_AUX_CHANNEL_E | -CNL_AUX_CHANNEL_F ; +if (IS_GEN (dev_priv,11 )) + mask |=ICL_AUX_CHANNEL_E ;return mask; }
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -7428,6 +7428,9 @@ enum {#define GEN8_PORT_DP_A_HOTPLUG (1 << 3)#define BXT_DE_PORT_GMBUS (1 << 1)#define GEN8_AUX_CHANNEL_A (1 << 0) +#define TGL_DE_PORT_AUX_DDIC (1 << 2) +#define TGL_DE_PORT_AUX_DDIB (1 << 1) +#define TGL_DE_PORT_AUX_DDIA (1 << 0)#define GEN8_DE_MISC_ISR _MMIO(0x44460)#define GEN8_DE_MISC_IMR _MMIO(0x44464)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 06/22] drm/i915/tgl: handle DP aux interrupts
Quoted 9 lines
-----Original Message-----
From: Intel-gfx [mailto:[email protected]] On Behalf Of Lucas De Marchi
Sent: Friday, July 12, 2019 6:09 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 06/22] drm/i915/tgl: handle DP aux interrupts
Quoted 5 lines
For Tiger Lake the DE Port Interrupt Definition bits changed, so use the new bit definitions.
Cc Jose Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 57 lines
---
drivers/gpu/drm/i915/i915_irq.c| 16 +++++++++++-----drivers/gpu/drm/i915/i915_reg.h| 3 +++2 files changed, 14 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_irq.c +11
-5@@ -2939,19 +2939,25 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)static u32 gen8_de_port_aux_mask (struct drm_i915_private *dev_priv) { -u32 mask =GEN8_AUX_CHANNEL_A ; +u32 mask; + +if (INTEL_GEN (dev_priv) >=12 ) +/* TODO: Add AUX entries for USBC */ +return TGL_DE_PORT_AUX_DDIA | +TGL_DE_PORT_AUX_DDIB | +TGL_DE_PORT_AUX_DDIC ; + mask =GEN8_AUX_CHANNEL_A ;if (INTEL_GEN (dev_priv) >=9 ) mask |=GEN9_AUX_CHANNEL_B |GEN9_AUX_CHANNEL_C |GEN9_AUX_CHANNEL_D ; -if (IS_CNL_WITH_PORT_F (dev_priv)) +if (IS_CNL_WITH_PORT_F (dev_priv) ||IS_GEN (dev_priv,11 )) mask |=CNL_AUX_CHANNEL_F ; -if (INTEL_GEN (dev_priv) >=11 ) - mask |=ICL_AUX_CHANNEL_E | -CNL_AUX_CHANNEL_F ; +if (IS_GEN (dev_priv,11 )) + mask |=ICL_AUX_CHANNEL_E ;return mask; }drivers/gpu/drm/i915/i915_reg.h +3
-1@@ -7428,6 +7428,9 @@ enum {#define GEN8_PORT_DP_A_HOTPLUG (1 << 3)#define BXT_DE_PORT_GMBUS (1 << 1)#define GEN8_AUX_CHANNEL_A (1 << 0) +#define TGL_DE_PORT_AUX_DDIC (1 << 2) +#define TGL_DE_PORT_AUX_DDIB (1 << 1) +#define TGL_DE_PORT_AUX_DDIA (1 << 0)#define GEN8_DE_MISC_ISR _MMIO(0x44460) #define GEN8_DE_MISC_IMR_MMIO (0x44464 ) --2.21.0
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/22 drm/i915/dmc: Load DMC on TGL
In reply to Lucas De MarchiFrom: Anusha Srivatsa <[email protected]>
Add Support to load DMC v2.02 on TGL.
--- drivers/gpu/drm/i915/intel_csr.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/intel_csr.c +7 -0
@@ -39,6 +39,11 @@#define GEN12_CSR_MAX_FW_SIZE ICL_CSR_MAX_FW_SIZE +#define TGL_CSR_PATH "i915/tgl_dmc_ver2_02.bin" +#define TGL_CSR_VERSION_REQUIRED CSR_VERSION(2, 2) +#define TGL_CSR_MAX_FW_SIZE 0x6000 +MODULE_FIRMWARE (TGL_CSR_PATH ); +#define ICL_CSR_PATH "i915/icl_dmc_ver1_07.bin"#define ICL_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)#define ICL_CSR_MAX_FW_SIZE 0x6000
@@ -674,6 +679,8 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)intel_csr_runtime_pm_get (dev_priv);if (INTEL_GEN (dev_priv) >=12 ) { + csr->fw_path =TGL_CSR_PATH ; + csr->required_version =TGL_CSR_VERSION_REQUIRED ;/* Allow to load fw via parameter using the last known size */ csr->max_fw_size =GEN12_CSR_MAX_FW_SIZE ; }else if (IS_GEN (dev_priv,11 )) {
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/22] drm/i915/dmc: Load DMC on TGL
Quoted 27 lines · Lucas De Marchi
From: Anusha Srivatsa <[email protected]>
Add Support to load DMC v2.02 on TGL.
Signed-off-by Anusha Srivatsa <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_csr.c +5
-0@@ -39,6 +39,11 @@#define GEN12_CSR_MAX_FW_SIZE ICL_CSR_MAX_FW_SIZE +#define TGL_CSR_PATH "i915/tgl_dmc_ver2_02.bin" +#define TGL_CSR_VERSION_REQUIRED CSR_VERSION(2, 2) +#define TGL_CSR_MAX_FW_SIZE 0x6000 +MODULE_FIRMWARE (TGL_CSR_PATH ); +#define ICL_CSR_PATH "i915/icl_dmc_ver1_07.bin"#define ICL_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)#define ICL_CSR_MAX_FW_SIZE 0x6000
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 686
Quoted 8 lines
drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -674,6 +679,8 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)intel_csr_runtime_pm_get (dev_priv);if (INTEL_GEN (dev_priv) >=12 ) { + csr->fw_path =TGL_CSR_PATH ; + csr->required_version =TGL_CSR_VERSION_REQUIRED ;/* Allow to load fw via parameter using the last known size */ csr->max_fw_size =GEN12_CSR_MAX_FW_SIZE ; }else if (IS_GEN (dev_priv,11 )) {
LGTM, one concern about DMC fw minor version.
if this is decided latest upstream version,
I will provide my RB.
Quoted 7 lines
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/22] drm/i915/dmc: Load DMC on TGL
Quoted 30 lines · Anshuman Gupta
Quoted 29 lines · Lucas De Marchi
From: Anusha Srivatsa <[email protected]>
Add Support to load DMC v2.02 on TGL.
Signed-off-by Anusha Srivatsa <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_csr.c +5
-0@@ -39,6 +39,11 @@#define GEN12_CSR_MAX_FW_SIZE ICL_CSR_MAX_FW_SIZE +#define TGL_CSR_PATH "i915/tgl_dmc_ver2_02.bin" +#define TGL_CSR_VERSION_REQUIRED CSR_VERSION(2, 2) +#define TGL_CSR_MAX_FW_SIZE 0x6000 +MODULE_FIRMWARE (TGL_CSR_PATH ); +#define ICL_CSR_PATH "i915/icl_dmc_ver1_07.bin"#define ICL_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)#define ICL_CSR_MAX_FW_SIZE 0x6000@@ -674,6 +679,8 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)intel_csr_runtime_pm_get (dev_priv);
Quoted 9 lines
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 686
Quoted 6 lines
drivers/gpu/drm/i915/intel_csr.c +2
-0if (INTEL_GEN (dev_priv) >=12 ) { + csr->fw_path =TGL_CSR_PATH ; + csr->required_version =TGL_CSR_VERSION_REQUIRED ;/* Allow to load fw via parameter using the last known size */ csr->max_fw_size =GEN12_CSR_MAX_FW_SIZE ; }else if (IS_GEN (dev_priv,11 )) {LGTM, one concern about DMC fw minor version.
if this is decided latest upstream version,
I will provide my RB.
José, 2.02 or 2.03?
Lucas De Marchi
Quoted 8 lines
Quoted 8 lines
--
2.21.0_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/22] drm/i915/dmc: Load DMC on TGL
In reply to Lucas De MarchiQuoted 4 lines · Lucas De Marchi
From: Anusha Srivatsa <[email protected]>
Add Support to load DMC v2.02 on TGL.
Quoted 32 lines
Signed-off-by Anusha Srivatsa <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/i915/intel_csr.c +7
-0@@ -39,6 +39,11 @@#define GEN12_CSR_MAX_FW_SIZE ICL_CSR_MAX_FW_SIZE +#define TGL_CSR_PATH "i915/tgl_dmc_ver2_02.bin" +#define TGL_CSR_VERSION_REQUIRED CSR_VERSION(2, 2) +#define TGL_CSR_MAX_FW_SIZE 0x6000 +MODULE_FIRMWARE (TGL_CSR_PATH ); +#define ICL_CSR_PATH "i915/icl_dmc_ver1_07.bin"#define ICL_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)#define ICL_CSR_MAX_FW_SIZE 0x6000@@ -674,6 +679,8 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)intel_csr_runtime_pm_get (dev_priv);if (INTEL_GEN (dev_priv) >=12 ) { + csr->fw_path =TGL_CSR_PATH ; + csr->required_version =TGL_CSR_VERSION_REQUIRED ;/* Allow to load fw via parameter using the last known size */
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 686
Quoted 2 lines
drivers/gpu/drm/i915/intel_csr.c +0
-0csr->max_fw_size =GEN12_CSR_MAX_FW_SIZE ; }else if (IS_GEN (dev_priv,11 )) {
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/22 drm/i915/tgl: Add DKL phy pll registers
In reply to Lucas De MarchiFrom: Vandita Kulkarni <[email protected]>
These are the registers needed to program Dekel PHY. Some register definitions reuse the MG PHY definitions. Add a comment on those so we don't need to duplicate the functions for programming them.
--- drivers/gpu/drm/i915/i915_reg.h | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +94 -0
@@ -10026,6 +10026,100 @@ enum skl_power_gate { _TGL_DPLL1_CFGCR1, \ _TGL_TBTPLL_CFGCR1) +#define _DKL_PHY1_BASE 0x168000 +#define _DKL_PHY2_BASE 0x169000 +#define _DKL_PHY3_BASE 0x16A000 +#define _DKL_PHY4_BASE 0x16B000 +#define _DKL_PHY5_BASE 0x16C000 +#define _DKL_PHY6_BASE 0x16D000 + +/* DEKEL PHY MMIO Address = Phy base + (internal address & ~index_mask) */ +#define _DKL_PLL_DIV0 0x200 +#define DKL_PLL_DIV0_INTEG_COEFF (x) ((x) << 16) +#define DKL_PLL_DIV0_INTEG_COEFF_MASK (0x1F << 16) +#define DKL_PLL_DIV0_PROP_COEFF (x) ((x) << 12) +#define DKL_PLL_DIV0_PROP_COEFF_MASK (0xF << 12) +#define DKL_PLL_DIV0_FBPREDIV (x) ((x) << 8) +#define DKL_PLL_DIV0_FBPREDIV_MASK (0xF << 8) +#define DKL_PLL_DIV0_FBDIV_INT (x) ((x) << 0) +#define DKL_PLL_DIV0_FBDIV_INT_MASK (0xFF << 0) +#define DKL_PLL_DIV0 (tc_port) _MMIO(_PORT(tc_port, _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_PLL_DIV0) + +#define _DKL_PLL_DIV1 0x204 +#define DKL_PLL_DIV1_IREF_TRIM (x) ((x) << 16) +#define DKL_PLL_DIV1_IREF_TRIM_MASK (0x1F << 16) +#define DKL_PLL_DIV1_TDC_TARGET_CNT (x) ((x) << 0) +#define DKL_PLL_DIV1_TDC_TARGET_CNT_MASK (0xFF << 0) +#define DKL_PLL_DIV1 (tc_port) _MMIO(_PORT(tc_port, _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_PLL_DIV1) + +#define _DKL_PLL_SSC 0x210 +#define DKL_PLL_SSC_IREF_NDIV_RATIO (x) ((x) << 29) +#define DKL_PLL_SSC_IREF_NDIV_RATIO_MASK (0x7 << 29) +#define DKL_PLL_SSC_STEP_LEN (x) ((x) << 16) +#define DKL_PLL_SSC_STEP_LEN_MASK (0xFF << 16) +#define DKL_PLL_SSC_STEP_NUM (x) ((x) << 11) +#define DKL_PLL_SSC_STEP_NUM_MASK (0x7 << 11) +#define DKL_PLL_SSC_EN (1 << 9) +#define DKL_PLL_SSC (tc_port) _MMIO(_PORT(tc_port, _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_PLL_SSC) + +#define _DKL_PLL_BIAS 0x214 +#define DKL_PLL_BIAS_FRAC_EN_H (1 << 30) +#define DKL_PLL_BIAS_FBDIV_FRAC (x) ((x) << 8) +#define DKL_PLL_BIAS_FBDIV_FRAC_MASK (0xFF << 8) +#define DKL_PLL_BIAS (tc_port) _MMIO(_PORT(tc_port, _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_PLL_BIAS) + +#define _DKL_PLL_TDC_COLDST_BIAS 0x218 +#define DKL_PLL_TDC_SSC_STEP_SIZE (x) ((x) << 8) +#define DKL_PLL_TDC_SSC_STEP_SIZE_MASK (0xFF << 8) +#define DKL_PLL_TDC_FEED_FWD_GAIN (x) ((x) << 0) +#define DKL_PLL_TDC_FEED_FWD_GAIN_MASK (0xFF << 0) +#define DKL_PLL_TDC_COLDST_BIAS (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_PLL_TDC_COLDST_BIAS) + +#define _DKL_REFCLKIN_CTL 0x12C +/* Bits are the same as MG_REFCLKIN_CTL */ +#define DKL_REFCLKIN_CTL (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_REFCLKIN_CTL) + +#define _DKL_CLKTOP2_HSCLKCTL 0xD4 +/* Bits are the same as MG_CLKTOP2_HSCLKCTL */ +#define DKL_CLKTOP2_HSCLKCTL (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_CLKTOP2_HSCLKCTL) + +#define _DKL_CLKTOP2_CORECLKCTL1 0xD8 +/* Bits are the same as MG_CLKTOP2_CORECLKCTL1 */ +#define DKL_CLKTOP2_CORECLKCTL1 (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_CLKTOP2_CORECLKCTL1) + +/* +* Each Dekel PHY is addressed through a 4KB aperture. Each PHY has more than +* 4KB of register space, so a separate index is programmed in HIP_INDEX_REG0 +* or HIP_INDEX_REG1, based on the port number, to set the upper 2 address +* bits that point the 4KB window into the full PHY register space. +*/ +#define _HIP_INDEX_REG0 0x1010A0 +#define _HIP_INDEX_REG1 0x1010A4 +#define HIP_INDEX_REG (tc_port) _MMIO((tc_port) < 3 \ + ? _HIP_INDEX_REG0 \ + : _HIP_INDEX_REG1) +#define HIP_INDEX_VAL (index, tc_port) ((index) << (((tc_port) * 8) % 32)) +/* BXT display engine PLL */ #define BXT_DE_PLL_CTL _MMIO(0x6d000)#define BXT_DE_PLL_RATIO (x) (x)/* {60,65,100} * 19.2MHz */
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 08/22] drm/i915/tgl: Add DKL phy pll registers
Quoted 7 lines · Lucas De Marchi
From: Vandita Kulkarni <[email protected]>
These are the registers needed to program Dekel PHY. Some register definitions reuse the MG PHY definitions. Add a comment on those so we
don't need to duplicate the functions for programming them.
Quoted 122 lines
Signed-off-by Vandita Kulkarni <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+)drivers/gpu/drm/i915/i915_reg.h +8
-0@@ -10026,6 +10026,100 @@ enum skl_power_gate { _TGL_DPLL1_CFGCR1, \ _TGL_TBTPLL_CFGCR1) +#define _DKL_PHY1_BASE 0x168000 +#define _DKL_PHY2_BASE 0x169000 +#define _DKL_PHY3_BASE 0x16A000 +#define _DKL_PHY4_BASE 0x16B000 +#define _DKL_PHY5_BASE 0x16C000 +#define _DKL_PHY6_BASE 0x16D000 + +/* DEKEL PHY MMIO Address = Phy base + (internal address & ~index_mask) */
drivers/gpu/drm/i915/i915_reg.h +10
-0+#define _DKL_PLL_DIV0 0x200 +#define DKL_PLL_DIV0_INTEG_COEFF (x) ((x) << 16) +#define DKL_PLL_DIV0_INTEG_COEFF_MASK (0x1F << 16) +#define DKL_PLL_DIV0_PROP_COEFF (x) ((x) << 12) +#define DKL_PLL_DIV0_PROP_COEFF_MASK (0xF << 12) +#define DKL_PLL_DIV0_FBPREDIV (x) ((x) << 8) +#define DKL_PLL_DIV0_FBPREDIV_MASK (0xF << 8) +#define DKL_PLL_DIV0_FBDIV_INT (x) ((x) << 0) +#define DKL_PLL_DIV0_FBDIV_INT_MASK (0xFF << 0) +#define DKL_PLL_DIV0 (tc_port) _MMIO(_PORT(tc_port,
_DKL_PHY1_BASE, \drivers/gpu/drm/i915/i915_reg.h +9
-0+ _DKL_PHY2_BASE) + \ + _DKL_PLL_DIV0) + +#define _DKL_PLL_DIV1 0x204 +#define DKL_PLL_DIV1_IREF_TRIM (x) ((x) << 16) +#define DKL_PLL_DIV1_IREF_TRIM_MASK (0x1F << 16) +#define DKL_PLL_DIV1_TDC_TARGET_CNT (x) ((x) << 0) +#define DKL_PLL_DIV1_TDC_TARGET_CNT_MASK (0xFF << 0) +#define DKL_PLL_DIV1 (tc_port) _MMIO(_PORT(tc_port,
_DKL_PHY1_BASE, \drivers/gpu/drm/i915/i915_reg.h +12
-0+ _DKL_PHY2_BASE) + \ + _DKL_PLL_DIV1) + +#define _DKL_PLL_SSC 0x210 +#define DKL_PLL_SSC_IREF_NDIV_RATIO (x) ((x) << 29) +#define DKL_PLL_SSC_IREF_NDIV_RATIO_MASK (0x7 << 29) +#define DKL_PLL_SSC_STEP_LEN (x) ((x) << 16) +#define DKL_PLL_SSC_STEP_LEN_MASK (0xFF << 16) +#define DKL_PLL_SSC_STEP_NUM (x) ((x) << 11) +#define DKL_PLL_SSC_STEP_NUM_MASK (0x7 << 11) +#define DKL_PLL_SSC_EN (1 << 9) +#define DKL_PLL_SSC (tc_port) _MMIO(_PORT(tc_port,
_DKL_PHY1_BASE, \drivers/gpu/drm/i915/i915_reg.h +8
-0+ _DKL_PHY2_BASE) + \ + _DKL_PLL_SSC) + +#define _DKL_PLL_BIAS 0x214 +#define DKL_PLL_BIAS_FRAC_EN_H (1 << 30) +#define DKL_PLL_BIAS_FBDIV_FRAC (x) ((x) << 8) +#define DKL_PLL_BIAS_FBDIV_FRAC_MASK (0xFF << 8) +#define DKL_PLL_BIAS (tc_port) _MMIO(_PORT(tc_port,
_DKL_PHY1_BASE, \drivers/gpu/drm/i915/i915_reg.h +11
-0+ _DKL_PHY2_BASE) + \ + _DKL_PLL_BIAS) + +#define _DKL_PLL_TDC_COLDST_BIAS 0x218 +#define DKL_PLL_TDC_SSC_STEP_SIZE (x) ((x) << 8) +#define DKL_PLL_TDC_SSC_STEP_SIZE_MASK (0xFF << 8) +#define DKL_PLL_TDC_FEED_FWD_GAIN (x) ((x) << 0) +#define DKL_PLL_TDC_FEED_FWD_GAIN_MASK (0xFF << 0) +#define DKL_PLL_TDC_COLDST_BIAS (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) +\
drivers/gpu/drm/i915/i915_reg.h +1
-0+ _DKL_PLL_TDC_COLDS
T_BIAS)drivers/gpu/drm/i915/i915_reg.h +19
-0+ +#define _DKL_REFCLKIN_CTL 0x12C +/* Bits are the same as MG_REFCLKIN_CTL */ +#define DKL_REFCLKIN_CTL (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_REFCLKIN_CTL) + +#define _DKL_CLKTOP2_HSCLKCTL 0xD4 +/* Bits are the same as MG_CLKTOP2_HSCLKCTL */ +#define DKL_CLKTOP2_HSCLKCTL (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \ + _DKL_PHY2_BASE) + \ + _DKL_CLKTOP2_HSCLKCTL) + +#define _DKL_CLKTOP2_CORECLKCTL1 0xD8 +/* Bits are the same as MG_CLKTOP2_CORECLKCTL1 */ +#define DKL_CLKTOP2_CORECLKCTL1 (tc_port) _MMIO(_PORT(tc_port, \ + _DKL_PHY1_BASE, \
drivers/gpu/drm/i915/i915_reg.h +1
-0+ _DKL_PHY2_BASE) + \
drivers/gpu/drm/i915/i915_reg.h +1
-0+ _DKL_CLKTOP2_CORECLKCTL1)
drivers/gpu/drm/i915/i915_reg.h +3
-0+ +/* +* Each Dekel PHY is addressed through a 4KB aperture. Each PHY has more than
+ * 4KB of register space, so a separate index is programmed inHIP_INDEX_REG0
+ * orHIP_INDEX_REG1, based on the port number, to set the upper 2 address
+ * bits that point the 4KB window into the full PHY register space.
+ */drivers/gpu/drm/i915/i915_reg.h +6
-0+#define _HIP_INDEX_REG0 0x1010A0 +#define _HIP_INDEX_REG1 0x1010A4 +#define HIP_INDEX_REG (tc_port) _MMIO((tc_port) < 3 \ + ? _HIP_INDEX_REG0 \ + : _HIP_INDEX_REG1) +#define HIP_INDEX_VAL (index, tc_port) ((index) << (((tc_port)
Quoted 6 lines
* 8) % 32))
+
/* BXT display engine PLL */
#defineBXT_DE_PLL_CTL_MMIO(0x6d000)
#defineBXT_DE_PLL_RATIO(x)(x) /*
{60,65,100} * 19.2MHz */
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/22 drm/i915/tgl: re-indent code to prepare for DKL changes
In reply to Lucas De MarchiThe final save operation into pll_state of the calculations done will be different for DKL PHY. Prepare for that by reindenting code so it's easier to check for correctness. This one has no change in behavior.
--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 119 ++++++++++-------- 1 file changed, 66 insertions(+), 53 deletions(-)
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +66 -53
@@ -2804,60 +2804,73 @@ static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, } ssc_steplog =4 ; - pll_state->mg_pll_div0 = (m2div_rem >0 ?MG_PLL_DIV0_FRACNEN_H :0 ) | -MG_PLL_DIV0_FBDIV_FRAC (m2div_frac) | -MG_PLL_DIV0_FBDIV_INT (m2div_int); - - pll_state->mg_pll_div1 =MG_PLL_DIV1_IREF_NDIVRATIO (iref_ndiv) | -MG_PLL_DIV1_DITHER_DIV_2 | -MG_PLL_DIV1_NDIVRATIO (1 ) | -MG_PLL_DIV1_FBPREDIV (m1div); - - pll_state->mg_pll_lf =MG_PLL_LF_TDCTARGETCNT (tdc_targetcnt) | -MG_PLL_LF_AFCCNTSEL_512 | -MG_PLL_LF_GAINCTRL (1 ) | -MG_PLL_LF_INT_COEFF (int_coeff) | -MG_PLL_LF_PROP_COEFF (prop_coeff); - - pll_state->mg_pll_frac_lock =MG_PLL_FRAC_LOCK_TRUELOCK_CRIT_32 | -MG_PLL_FRAC_LOCK_EARLYLOCK_CRIT_32 | -MG_PLL_FRAC_LOCK_LOCKTHRESH (10 ) | -MG_PLL_FRAC_LOCK_DCODITHEREN | -MG_PLL_FRAC_LOCK_FEEDFWRDGAIN (feedfwgain); -if (use_ssc || m2div_rem >0 ) - pll_state->mg_pll_frac_lock |=MG_PLL_FRAC_LOCK_FEEDFWRDCAL_EN ; - - pll_state->mg_pll_ssc = (use_ssc ?MG_PLL_SSC_EN :0 ) | -MG_PLL_SSC_TYPE (2 ) | -MG_PLL_SSC_STEPLENGTH (ssc_steplen) | -MG_PLL_SSC_STEPNUM (ssc_steplog) | -MG_PLL_SSC_FLLEN | -MG_PLL_SSC_STEPSIZE (ssc_stepsize); - - pll_state->mg_pll_tdc_coldst_bias =MG_PLL_TDC_COLDST_COLDSTART | -MG_PLL_TDC_COLDST_IREFINT_EN | -MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W (iref_pulse_w) | -MG_PLL_TDC_TDCOVCCORR_EN | -MG_PLL_TDC_TDCSEL (3 ); - - pll_state->mg_pll_bias =MG_PLL_BIAS_BIAS_GB_SEL (3 ) | -MG_PLL_BIAS_INIT_DCOAMP (0x3F ) | -MG_PLL_BIAS_BIAS_BONUS (10 ) | -MG_PLL_BIAS_BIASCAL_EN | -MG_PLL_BIAS_CTRIM (12 ) | -MG_PLL_BIAS_VREF_RDAC (4 ) | -MG_PLL_BIAS_IREFTRIM (iref_trim); - -if (refclk_khz ==38400 ) { - pll_state->mg_pll_tdc_coldst_bias_mask =MG_PLL_TDC_COLDST_COLDSTART ; - pll_state->mg_pll_bias_mask =0 ; - }else { - pll_state->mg_pll_tdc_coldst_bias_mask =-1U ; - pll_state->mg_pll_bias_mask =-1U ; - } +/* write pll_state calculations */ + { + pll_state->mg_pll_div0 = + (m2div_rem >0 ?MG_PLL_DIV0_FRACNEN_H :0 ) | +MG_PLL_DIV0_FBDIV_FRAC (m2div_frac) | +MG_PLL_DIV0_FBDIV_INT (m2div_int); + + pll_state->mg_pll_div1 = +MG_PLL_DIV1_IREF_NDIVRATIO (iref_ndiv) | +MG_PLL_DIV1_DITHER_DIV_2 | +MG_PLL_DIV1_NDIVRATIO (1 ) | +MG_PLL_DIV1_FBPREDIV (m1div); + + pll_state->mg_pll_lf = +MG_PLL_LF_TDCTARGETCNT (tdc_targetcnt) | +MG_PLL_LF_AFCCNTSEL_512 | +MG_PLL_LF_GAINCTRL (1 ) | +MG_PLL_LF_INT_COEFF (int_coeff) | +MG_PLL_LF_PROP_COEFF (prop_coeff); + + pll_state->mg_pll_frac_lock = +MG_PLL_FRAC_LOCK_TRUELOCK_CRIT_32 | +MG_PLL_FRAC_LOCK_EARLYLOCK_CRIT_32 | +MG_PLL_FRAC_LOCK_LOCKTHRESH (10 ) | +MG_PLL_FRAC_LOCK_DCODITHEREN | +MG_PLL_FRAC_LOCK_FEEDFWRDGAIN (feedfwgain); +if (use_ssc || m2div_rem >0 ) + pll_state->mg_pll_frac_lock |= +MG_PLL_FRAC_LOCK_FEEDFWRDCAL_EN ; + + pll_state->mg_pll_ssc = + (use_ssc ?MG_PLL_SSC_EN :0 ) | +MG_PLL_SSC_TYPE (2 ) | +MG_PLL_SSC_STEPLENGTH (ssc_steplen) | +MG_PLL_SSC_STEPNUM (ssc_steplog) | +MG_PLL_SSC_FLLEN | +MG_PLL_SSC_STEPSIZE (ssc_stepsize); + + pll_state->mg_pll_tdc_coldst_bias = +MG_PLL_TDC_COLDST_COLDSTART | +MG_PLL_TDC_COLDST_IREFINT_EN | +MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W (iref_pulse_w) | +MG_PLL_TDC_TDCOVCCORR_EN | +MG_PLL_TDC_TDCSEL (3 ); + + pll_state->mg_pll_bias = +MG_PLL_BIAS_BIAS_GB_SEL (3 ) | +MG_PLL_BIAS_INIT_DCOAMP (0x3F ) | +MG_PLL_BIAS_BIAS_BONUS (10 ) | +MG_PLL_BIAS_BIASCAL_EN | +MG_PLL_BIAS_CTRIM (12 ) | +MG_PLL_BIAS_VREF_RDAC (4 ) | +MG_PLL_BIAS_IREFTRIM (iref_trim); + +if (refclk_khz ==38400 ) { + pll_state->mg_pll_tdc_coldst_bias_mask = +MG_PLL_TDC_COLDST_COLDSTART ; + pll_state->mg_pll_bias_mask =0 ; + }else { + pll_state->mg_pll_tdc_coldst_bias_mask =-1U ; + pll_state->mg_pll_bias_mask =-1U ; + } - pll_state->mg_pll_tdc_coldst_bias &= pll_state->mg_pll_tdc_coldst_bias_mask; - pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; + pll_state->mg_pll_tdc_coldst_bias &= + pll_state->mg_pll_tdc_coldst_bias_mask; + pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; + }return true; }
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 09/22] drm/i915/tgl: re-indent code to prepare for DKL changes
Quoted 5 lines · Lucas De Marchi
The final save operation into
pll_stateof the calculations done will be different for DKL PHY. Prepare for that by reindenting code so it's
easier to check for correctness. This one has no change in behavior.
Quoted 143 lines
Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 119 ++++++++++---- ---- 1 file changed, 66 insertions(+), 53 deletions(-)drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-1@@ -2804,60 +2804,73 @@ static bool icl_calc_mg_pll_state(structintel_crtc_state *crtc_state, } ssc_steplog =4 ; - pll_state->mg_pll_div0 = (m2div_rem > 0 ? MG_PLL_DIV0_FRACNEN_H: 0) |
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-4-MG_PLL_DIV0_FBDIV_FRAC (m2div_frac) | -MG_PLL_DIV0_FBDIV_INT (m2div_int); - - pll_state->mg_pll_div1 =MG_PLL_DIV1_IREF_NDIVRATIO (iref_ndiv)|
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-11-MG_PLL_DIV1_DITHER_DIV_2 | -MG_PLL_DIV1_NDIVRATIO (1 ) | -MG_PLL_DIV1_FBPREDIV (m1div); - - pll_state->mg_pll_lf =MG_PLL_LF_TDCTARGETCNT (tdc_targetcnt) | -MG_PLL_LF_AFCCNTSEL_512 | -MG_PLL_LF_GAINCTRL (1 ) | -MG_PLL_LF_INT_COEFF (int_coeff) | -MG_PLL_LF_PROP_COEFF (prop_coeff); - - pll_state->mg_pll_frac_lock =MG_PLL_FRAC_LOCK_TRUELOCK_CRIT_32 |
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-1-MG_PLL_FRAC_LOCK_EARLYLOCK_CRIT_3 2 |
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-3-MG_PLL_FRAC_LOCK_LOCKTHRESH (10 ) | -MG_PLL_FRAC_LOCK_DCODITHEREN | - MG_PLL_FRAC_LOCK_FEEDFWRDGAIN(feedfwgain);
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-2-if (use_ssc || m2div_rem >0 ) - pll_state->mg_pll_frac_lock |=
MG_PLL_FRAC_LOCK_FEEDFWRDCAL_EN;drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-9- - pll_state->mg_pll_ssc = (use_ssc ?MG_PLL_SSC_EN :0 ) | -MG_PLL_SSC_TYPE (2 ) | -MG_PLL_SSC_STEPLENGTH (ssc_steplen) | -MG_PLL_SSC_STEPNUM (ssc_steplog) | -MG_PLL_SSC_FLLEN | -MG_PLL_SSC_STEPSIZE (ssc_stepsize); - - pll_state->mg_pll_tdc_coldst_bias =MG_PLL_TDC_COLDST_COLDSTART |
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-1-MG_PLL_TDC_COLDST_IREFINT_E N |
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-1-MG_PLL_TDC_COLDST_REFBIAS_S
TART_PULSE_W(iref_pulse_w)|drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-13-MG_PLL_TDC_TDCOVCCORR_EN | -MG_PLL_TDC_TDCSEL (3 ); - - pll_state->mg_pll_bias =MG_PLL_BIAS_BIAS_GB_SEL (3 ) | -MG_PLL_BIAS_INIT_DCOAMP (0x3F ) | -MG_PLL_BIAS_BIAS_BONUS (10 ) | -MG_PLL_BIAS_BIASCAL_EN | -MG_PLL_BIAS_CTRIM (12 ) | -MG_PLL_BIAS_VREF_RDAC (4 ) | -MG_PLL_BIAS_IREFTRIM (iref_trim); - -if (refclk_khz ==38400 ) { - pll_state->mg_pll_tdc_coldst_bias_mask =
MG_PLL_TDC_COLDST_COLDSTART;drivers/gpu/drm/i915/display/intel_dpll_mgr.c +42
-5- pll_state->mg_pll_bias_mask =0 ; - }else { - pll_state->mg_pll_tdc_coldst_bias_mask =-1U ; - pll_state->mg_pll_bias_mask =-1U ; - } +/* write pll_state calculations */ + { + pll_state->mg_pll_div0 = + (m2div_rem >0 ?MG_PLL_DIV0_FRACNEN_H :0 ) | +MG_PLL_DIV0_FBDIV_FRAC (m2div_frac) | +MG_PLL_DIV0_FBDIV_INT (m2div_int); + + pll_state->mg_pll_div1 = +MG_PLL_DIV1_IREF_NDIVRATIO (iref_ndiv) | +MG_PLL_DIV1_DITHER_DIV_2 | +MG_PLL_DIV1_NDIVRATIO (1 ) | +MG_PLL_DIV1_FBPREDIV (m1div); + + pll_state->mg_pll_lf = +MG_PLL_LF_TDCTARGETCNT (tdc_targetcnt) | +MG_PLL_LF_AFCCNTSEL_512 | +MG_PLL_LF_GAINCTRL (1 ) | +MG_PLL_LF_INT_COEFF (int_coeff) | +MG_PLL_LF_PROP_COEFF (prop_coeff); + + pll_state->mg_pll_frac_lock = +MG_PLL_FRAC_LOCK_TRUELOCK_CRIT_32 | +MG_PLL_FRAC_LOCK_EARLYLOCK_CRIT_32 | +MG_PLL_FRAC_LOCK_LOCKTHRESH (10 ) | +MG_PLL_FRAC_LOCK_DCODITHEREN | +MG_PLL_FRAC_LOCK_FEEDFWRDGAIN (feedfwgain); +if (use_ssc || m2div_rem >0 ) + pll_state->mg_pll_frac_lock |= +MG_PLL_FRAC_LOCK_FEEDFWRDCAL_EN ; + + pll_state->mg_pll_ssc = + (use_ssc ?MG_PLL_SSC_EN :0 ) | +MG_PLL_SSC_TYPE (2 ) | +MG_PLL_SSC_STEPLENGTH (ssc_steplen) | +MG_PLL_SSC_STEPNUM (ssc_steplog) | +MG_PLL_SSC_FLLEN | +MG_PLL_SSC_STEPSIZE (ssc_stepsize); + + pll_state->mg_pll_tdc_coldst_bias = +MG_PLL_TDC_COLDST_COLDSTART | +MG_PLL_TDC_COLDST_IREFINT_EN | + MG_PLL_TDC_COLDST_REFBIAS_START_PULSE_W(iref_pu
lse_w) |drivers/gpu/drm/i915/display/intel_dpll_mgr.c +20
-1+MG_PLL_TDC_TDCOVCCORR_EN | +MG_PLL_TDC_TDCSEL (3 ); + + pll_state->mg_pll_bias = +MG_PLL_BIAS_BIAS_GB_SEL (3 ) | +MG_PLL_BIAS_INIT_DCOAMP (0x3F ) | +MG_PLL_BIAS_BIAS_BONUS (10 ) | +MG_PLL_BIAS_BIASCAL_EN | +MG_PLL_BIAS_CTRIM (12 ) | +MG_PLL_BIAS_VREF_RDAC (4 ) | +MG_PLL_BIAS_IREFTRIM (iref_trim); + +if (refclk_khz ==38400 ) { + pll_state->mg_pll_tdc_coldst_bias_mask = +MG_PLL_TDC_COLDST_COLDSTART ; + pll_state->mg_pll_bias_mask =0 ; + }else { + pll_state->mg_pll_tdc_coldst_bias_mask =-1U ; + pll_state->mg_pll_bias_mask =-1U ; + } - pll_state->mg_pll_tdc_coldst_bias &= pll_state-Quoted 1 line
mg_pll_tdc_coldst_bias_mask;
drivers/gpu/drm/i915/display/intel_dpll_mgr.c static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, · line 2876
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +4
-1- pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; + pll_state->mg_pll_tdc_coldst_bias &= + pll_state->mg_pll_tdc_coldst_bias_mask; + pll_state->mg_pll_bias &= pll_state->mg_pll_bias_mask; + }return true; }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/22 drm/i915/tgl: Add DKL phy pll state calculations
In reply to Lucas De MarchiFrom: Vandita Kulkarni <[email protected]>
Reuse the existing calculate icl_calc_mg_pll_state() function. Since the pll variables are calculated differently for DKL phy, add support for the same.
--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 59 ++++++++++++++++--- 1 file changed, 50 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +50 -9
@@ -2625,7 +2625,8 @@ enum intel_dpll_id icl_tc_port_to_pll_id(enum tc_port tc_port)static bool icl_mg_pll_find_divisors (int clock_khz,bool is_dp,bool use_ssc,u32 *target_dco_khz, -struct intel_dpll_hw_state *state) +struct intel_dpll_hw_state *state, +bool is_dkl) {u32 dco_min_freq, dco_max_freq;int div1_vals[] = {7 ,5 ,3 ,2 };
@@ -2647,8 +2648,13 @@ static bool icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc,continue ;if (div2 >=2 ) { - a_divratio = is_dp ?10 :5 ; - tlinedrv =2 ; +if (is_dkl) { + a_divratio =5 ; + tlinedrv =1 ; + }else { + a_divratio = is_dp ?10 :5 ; + tlinedrv =2 ; + } }else { a_divratio =5 ; tlinedrv =0 ;
@@ -2698,7 +2704,8 @@ static bool icl_mg_pll_find_divisors(int clock_khz, bool is_dp, bool use_ssc,* adapted to integer-only calculation, that's why it looks so different. */ static bool icl_calc_mg_pll_state (struct intel_crtc_state *crtc_state, -struct intel_dpll_hw_state *pll_state) +struct intel_dpll_hw_state *pll_state, +bool is_dkl) {struct drm_i915_private *dev_priv =to_i915 (crtc_state->base.crtc->dev);int refclk_khz = dev_priv->cdclk.hw.ref;
@@ -2715,7 +2722,7 @@ static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state,memset (pll_state,0 ,sizeof (*pll_state));if (!icl_mg_pll_find_divisors (clock, is_dp, use_ssc, &dco_khz, - pll_state)) { + pll_state, is_dkl)) {DRM_DEBUG_KMS ("Failed to find divisors for clock %d\n" , clock);return false; }
@@ -2723,8 +2730,11 @@ static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, m1div =2 ; m2div_int = dco_khz / (refclk_khz * m1div);if (m2div_int >255 ) { - m1div =4 ; - m2div_int = dco_khz / (refclk_khz * m1div); +if (!is_dkl) { + m1div =4 ; + m2div_int = dco_khz / (refclk_khz * m1div); + } +if (m2div_int >255 ) {DRM_DEBUG_KMS ("Failed to find mdiv for clock %d\n" , clock);
@@ -2753,6 +2763,12 @@ static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, iref_trim =28 ; iref_pulse_w =1 ;break ; + +/* +* TODO: spec adds a case for ndiv = 4 when refclk > 80MHz, +* however this doesn't seem possible from the input. +* See Issue 17526. +*/ default :MISSING_CASE (refclk_khz);return false;
@@ -2805,7 +2821,31 @@ static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state, ssc_steplog =4 ;/* write pll_state calculations */ - { +if (is_dkl) { + pll_state->mg_pll_div0 = +DKL_PLL_DIV0_INTEG_COEFF (int_coeff) | +DKL_PLL_DIV0_PROP_COEFF (prop_coeff) | +DKL_PLL_DIV0_FBPREDIV (m1div) | +DKL_PLL_DIV0_FBDIV_INT (m2div_int); + + pll_state->mg_pll_div1 = +DKL_PLL_DIV1_IREF_TRIM (iref_trim) | +DKL_PLL_DIV1_TDC_TARGET_CNT (tdc_targetcnt); + + pll_state->mg_pll_ssc = +DKL_PLL_SSC_IREF_NDIV_RATIO (iref_ndiv) | +DKL_PLL_SSC_STEP_LEN (ssc_steplen) | +DKL_PLL_SSC_STEP_NUM (ssc_steplog) | + (use_ssc ?DKL_PLL_SSC_EN :0 ); + + pll_state->mg_pll_tdc_coldst_bias = +DKL_PLL_TDC_SSC_STEP_SIZE (ssc_stepsize) | +DKL_PLL_TDC_FEED_FWD_GAIN (feedfwgain); + + pll_state->mg_pll_bias = + (m2div_frac >0 ?DKL_PLL_BIAS_FRAC_EN_H :0 ) | +DKL_PLL_BIAS_FBDIV_FRAC (m2div_frac); + }else { pll_state->mg_pll_div0 = (m2div_rem >0 ?MG_PLL_DIV0_FRACNEN_H :0 ) | MG_PLL_DIV0_FBDIV_FRAC(m2div_frac) |
@@ -2963,6 +3003,7 @@ static bool icl_get_tc_phy_dplls(struct intel_atomic_state *state,intel_atomic_get_new_crtc_state (state, crtc);struct icl_port_dpll *port_dpll;enum intel_dpll_id dpll_id; +bool is_dkl =INTEL_GEN (dev_priv) >=12 ; port_dpll = &crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT ];if (!icl_calc_dpll_state (crtc_state, encoder, &port_dpll->hw_state)) {
@@ -2983,7 +3024,7 @@ static bool icl_get_tc_phy_dplls(struct intel_atomic_state *state, port_dpll = &crtc_state->icl_port_dplls[ICL_PORT_DPLL_MG_PHY ]; -if (!icl_calc_mg_pll_state (crtc_state, &port_dpll->hw_state)) { +if (!icl_calc_mg_pll_state (crtc_state, &port_dpll->hw_state, is_dkl)) {DRM_DEBUG_KMS ("Could not calculate MG PHY PLL state.\n" ); goto err_unreference_tbt_pll; }
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/22 drm/i915/tgl: start adding the DKL PLLs to use on TC ports
In reply to Lucas De MarchiThe disable function can be the same as for MG phy since the same registers are used. The others are different as registers change - prepare for that using an empty dkl_pll_write() to be implemented later.
--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 98 ++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +97 -1
@@ -3158,6 +3158,60 @@ static bool mg_pll_get_hw_state(struct drm_i915_private *dev_priv,return ret; } +static bool dkl_pll_get_hw_state (struct drm_i915_private *dev_priv, +struct intel_shared_dpll *pll, +struct intel_dpll_hw_state *hw_state) +{ +const enum intel_dpll_id id = pll->info->id; +enum tc_port tc_port =icl_pll_id_to_tc_port (id); +intel_wakeref_t wakeref; +bool ret = false; +u32 val; + + wakeref =intel_display_power_get_if_enabled (dev_priv, +POWER_DOMAIN_DISPLAY_CORE ); +if (!wakeref) +return false; + + val =I915_READ (MG_PLL_ENABLE (tc_port)); +if (!(val &PLL_ENABLE )) + goto out; + +/* +* All registers read here have the same HIP_INDEX_REG even though +* they are on different building blocks +*/ +I915_WRITE (HIP_INDEX_REG (tc_port),0x2 ); + + hw_state->mg_refclkin_ctl =I915_READ (DKL_REFCLKIN_CTL (tc_port)); + hw_state->mg_refclkin_ctl &=MG_REFCLKIN_CTL_OD_2_MUX_MASK ; + + hw_state->mg_clktop2_hsclkctl = +I915_READ (DKL_CLKTOP2_HSCLKCTL (tc_port)); + hw_state->mg_clktop2_hsclkctl &= +MG_CLKTOP2_HSCLKCTL_TLINEDRV_CLKSEL_MASK | +MG_CLKTOP2_HSCLKCTL_CORE_INPUTSEL_MASK | +MG_CLKTOP2_HSCLKCTL_HSDIV_RATIO_MASK | +MG_CLKTOP2_HSCLKCTL_DSDIV_RATIO_MASK ; + + hw_state->mg_clktop2_coreclkctl1 = +I915_READ (DKL_CLKTOP2_CORECLKCTL1 (tc_port)); + hw_state->mg_clktop2_coreclkctl1 &= +MG_CLKTOP2_CORECLKCTL1_A_DIVRATIO_MASK ; + + hw_state->mg_pll_div0 =I915_READ (DKL_PLL_DIV0 (tc_port)); + hw_state->mg_pll_div1 =I915_READ (DKL_PLL_DIV1 (tc_port)); + hw_state->mg_pll_ssc =I915_READ (DKL_PLL_SSC (tc_port)); + hw_state->mg_pll_bias =I915_READ (DKL_PLL_BIAS (tc_port)); + hw_state->mg_pll_tdc_coldst_bias = +I915_READ (DKL_PLL_TDC_COLDST_BIAS (tc_port)); + + ret = true; +out: +intel_display_power_put (dev_priv,POWER_DOMAIN_DISPLAY_CORE , wakeref); +return ret; +} + static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv, struct intel_shared_dpll *pll, struct intel_dpll_hw_state *hw_state,
@@ -3282,6 +3336,12 @@ static void icl_mg_pll_write(struct drm_i915_private *dev_priv,POSTING_READ (MG_PLL_TDC_COLDST_BIAS (tc_port)); } +static void dkl_pll_write (struct drm_i915_private *dev_priv, +struct intel_shared_dpll *pll) +{ +/* TODO */ +} +static void icl_pll_power_enable (struct drm_i915_private *dev_priv,struct intel_shared_dpll *pll,i915_reg_t enable_reg)
@@ -3389,6 +3449,31 @@ static void mg_pll_enable(struct drm_i915_private *dev_priv,/* DVFS post sequence would be here. See the comment above. */ } +static void dkl_pll_enable (struct drm_i915_private *dev_priv, +struct intel_shared_dpll *pll) +{ +/* +* From spec: MG register instances are being used for TypeC in general. The +* same MG register instances should be programmed for Dekel PLLs as well +*/ +i915_reg_t enable_reg = +MG_PLL_ENABLE (icl_pll_id_to_tc_port (pll->info->id)); + +icl_pll_power_enable (dev_priv, pll, enable_reg); + +dkl_pll_write (dev_priv, pll); + +/* +* DVFS pre sequence would be here, but in our driver the cdclk code +* paths should already be setting the appropriate voltage, hence we do +* nothing here. +*/ + +icl_pll_enable (dev_priv, pll, enable_reg); + +/* DVFS post sequence would be here. See the comment above. */ +} +static void icl_pll_disable (struct drm_i915_private *dev_priv,struct intel_shared_dpll *pll,i915_reg_t enable_reg)
@@ -3533,11 +3618,22 @@ static const struct intel_dpll_mgr ehl_pll_mgr = { .dump_hw_state = icl_dump_hw_state, }; +static const struct intel_shared_dpll_funcs dkl_pll_funcs = { + .enable = dkl_pll_enable, + .disable = mg_pll_disable, + .get_hw_state = dkl_pll_get_hw_state, +}; +static const struct dpll_info tgl_plls[] = { {"DPLL 0" , &combo_pll_funcs,DPLL_ID_ICL_DPLL0 ,0 }, {"DPLL 1" , &combo_pll_funcs,DPLL_ID_ICL_DPLL1 ,0 }, {"TBT PLL" , &tbt_pll_funcs,DPLL_ID_ICL_TBTPLL ,0 }, -/* TODO: Add typeC plls */ + {"TC PLL 1" , &dkl_pll_funcs,DPLL_ID_ICL_MGPLL1 ,0 }, + {"TC PLL 2" , &dkl_pll_funcs,DPLL_ID_ICL_MGPLL2 ,0 }, + {"TC PLL 3" , &dkl_pll_funcs,DPLL_ID_ICL_MGPLL3 ,0 }, + {"TC PLL 4" , &dkl_pll_funcs,DPLL_ID_ICL_MGPLL4 ,0 }, + {"TC PLL 5" , &dkl_pll_funcs,DPLL_ID_TGL_MGPLL5 ,0 }, + {"TC PLL 6" , &dkl_pll_funcs,DPLL_ID_TGL_MGPLL6 ,0 }, { }, };
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 12/22 drm/i915/tgl: Add support for dkl pll write
In reply to Lucas De MarchiFrom: Vandita Kulkarni <[email protected]>
Add a new function to write to dkl phy pll registers. As per the spec all the registers are read modify write.
--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +64 -1
@@ -3339,7 +3339,70 @@ static void icl_mg_pll_write(struct drm_i915_private *dev_priv,static void dkl_pll_write (struct drm_i915_private *dev_priv,struct intel_shared_dpll *pll) { -/* TODO */ +struct intel_dpll_hw_state *hw_state = &pll->state.hw_state; +enum tc_port tc_port =icl_pll_id_to_tc_port (pll->info->id); +u32 val; + +/* +* All registers programmed here have the same HIP_INDEX_REG even +* though on different building block +*/ +I915_WRITE (HIP_INDEX_REG (tc_port),0x2 ); + +/* All the registers are RMW */ + val =I915_READ (DKL_REFCLKIN_CTL (tc_port)); + val &= ~MG_REFCLKIN_CTL_OD_2_MUX_MASK ; + val |= hw_state->mg_refclkin_ctl; +I915_WRITE (DKL_REFCLKIN_CTL (tc_port), val); + + val =I915_READ (DKL_CLKTOP2_CORECLKCTL1 (tc_port)); + val &= ~MG_CLKTOP2_CORECLKCTL1_A_DIVRATIO_MASK ; + val |= hw_state->mg_clktop2_coreclkctl1; +I915_WRITE (DKL_CLKTOP2_CORECLKCTL1 (tc_port), val); + + val =I915_READ (DKL_CLKTOP2_HSCLKCTL (tc_port)); + val &= ~(MG_CLKTOP2_HSCLKCTL_TLINEDRV_CLKSEL_MASK | +MG_CLKTOP2_HSCLKCTL_CORE_INPUTSEL_MASK | +MG_CLKTOP2_HSCLKCTL_HSDIV_RATIO_MASK | +MG_CLKTOP2_HSCLKCTL_DSDIV_RATIO_MASK ); + val |= hw_state->mg_clktop2_hsclkctl; +I915_WRITE (DKL_CLKTOP2_HSCLKCTL (tc_port), val); + + val =I915_READ (DKL_PLL_DIV0 (tc_port)); + val &= ~(DKL_PLL_DIV0_INTEG_COEFF_MASK | +DKL_PLL_DIV0_PROP_COEFF_MASK | +DKL_PLL_DIV0_FBPREDIV_MASK | +DKL_PLL_DIV0_FBDIV_INT_MASK ); + val |= hw_state->mg_pll_div0; +I915_WRITE (DKL_PLL_DIV0 (tc_port), val); + + val =I915_READ (DKL_PLL_DIV1 (tc_port)); + val = ~(DKL_PLL_DIV1_IREF_TRIM_MASK | +DKL_PLL_DIV1_TDC_TARGET_CNT_MASK ); + val |= hw_state->mg_pll_div1; +I915_WRITE (DKL_PLL_DIV1 (tc_port), val); + + val =I915_READ (DKL_PLL_SSC (tc_port)); + val &= ~(DKL_PLL_SSC_IREF_NDIV_RATIO_MASK | +DKL_PLL_SSC_STEP_LEN_MASK | +DKL_PLL_SSC_STEP_NUM_MASK | +DKL_PLL_SSC_EN ); + val |= hw_state->mg_pll_ssc; +I915_WRITE (DKL_PLL_SSC (tc_port), val); + + val =I915_READ (DKL_PLL_BIAS (tc_port)); + val &= ~(DKL_PLL_BIAS_FRAC_EN_H | +DKL_PLL_BIAS_FBDIV_FRAC_MASK ); + val |= hw_state->mg_pll_bias; +I915_WRITE (DKL_PLL_BIAS (tc_port), val); + + val =I915_READ (DKL_PLL_TDC_COLDST_BIAS (tc_port)); + val &= ~(DKL_PLL_TDC_SSC_STEP_SIZE_MASK | +DKL_PLL_TDC_FEED_FWD_GAIN_MASK ); + val |= hw_state->mg_pll_tdc_coldst_bias; +I915_WRITE (DKL_PLL_TDC_COLDST_BIAS (tc_port), val); + +POSTING_READ (DKL_PLL_TDC_COLDST_BIAS (tc_port)); } static void icl_pll_power_enable(struct drm_i915_private *dev_priv,
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 13/22 drm/i915/gen12: add support for reading the timestamp frequency
In reply to Lucas De MarchiFrom: Michel Thierry <[email protected]>
There are no changes with respect to GEN11, which Paulo wrote.
This gets rid of the "Missing switch case in read_timestamp_frequency" message at boot for Tiger Lake.
--- drivers/gpu/drm/i915/intel_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_device_info.c +1 -1
@@ -716,7 +716,7 @@ static u32 read_timestamp_frequency(struct drm_i915_private *dev_priv) }return freq; - }else if (INTEL_GEN (dev_priv) <=11 ) { + }else if (INTEL_GEN (dev_priv) <=12 ) {u32 ctc_reg =I915_READ (CTC_MODE );u32 freq =0 ;
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 14/22 drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register
In reply to Lucas De MarchiFrom: Jordan Justen <[email protected]>
This enables the Mesa driver to advertise support for ARB_timer_query, and thus an OpenGL version higher than 3.2.
Based on the ICL patch by Paulo Zanoni and CNL patch by Nanley Chery.
--- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +1 -1
@@ -1776,7 +1776,7 @@ static const struct reg_whitelist { } reg_read_whitelist[] = { { .offset_ldw = RING_TIMESTAMP(RENDER_RING_BASE), .offset_udw = RING_TIMESTAMP_UDW(RENDER_RING_BASE), - .gen_mask = INTEL_GEN_MASK(4, 11), + .gen_mask = INTEL_GEN_MASK(4, 12), .size =8 } };
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 15/22 drm/i915/tgl: Introduce initial Tigerlake Workarounds
In reply to Lucas De MarchiFrom: Michel Thierry <[email protected]>
Inherit workarounds from previous platforms that are still valid for Tigerlake.
WaPipelineFlushCoherentLines:tgl (changed register but has same name) WaSendPushConstantsFromMMIO:tgl WaAllowUMDToModifySamplerMode:tgl WaRsForcewakeAddDelayForAck:tgl
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 2 ++ drivers/gpu/drm/i915/gt/intel_workarounds.c | 40 +++++++++++++++++++-- drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_pm.c | 4 ++- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 5 files changed, 46 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +2 -0
@@ -2045,6 +2045,8 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)return 0 ;switch (INTEL_GEN (engine->i915)) { +case 12 : +return 0 ;case 11 :return 0 ;case 10 :
drivers/gpu/drm/i915/gt/intel_workarounds.c +37 -3
@@ -582,6 +582,11 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, GEN11_SAMPLER_ENABLE_HEADLESS_MSG); } +static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine, +struct i915_wa_list *wal) +{ +} + static void __intel_engine_init_ctx_wa(struct intel_engine_cs *engine, struct i915_wa_list *wal,
@@ -594,7 +599,9 @@ __intel_engine_init_ctx_wa(struct intel_engine_cs *engine,wa_init_start (wal, name, engine->name); -if (IS_GEN (i915,11 )) +if (IS_GEN (i915,12 )) +tgl_ctx_workarounds_init (engine, wal); +else if (IS_GEN (i915,11 ))icl_ctx_workarounds_init (engine, wal);else if (IS_CANNONLAKE (i915))cnl_ctx_workarounds_init (engine, wal);
@@ -895,10 +902,17 @@ icl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal) GAMT_CHKN_DISABLE_L3_COH_PIPE); } +static void +tgl_gt_workarounds_init (struct drm_i915_private *i915,struct i915_wa_list *wal) +{ +} +static void gt_init_workarounds (struct drm_i915_private *i915,struct i915_wa_list *wal) { -if (IS_GEN (i915,11 )) +if (IS_GEN (i915,12 )) +tgl_gt_workarounds_init (i915, wal); +else if (IS_GEN (i915,11 ))icl_gt_workarounds_init (i915, wal);else if (IS_CANNONLAKE (i915))cnl_gt_workarounds_init (i915, wal);
@@ -1188,6 +1202,17 @@ static void icl_whitelist_build(struct intel_engine_cs *engine) } } +static void tgl_whitelist_build (struct intel_engine_cs *engine) +{ +struct i915_wa_list *w = &engine->whitelist; + +/* WaSendPushConstantsFromMMIO:tgl */ +whitelist_reg (w,COMMON_SLICE_CHICKEN2 ); + +/* WaAllowUMDToModifySamplerMode:tgl */ +whitelist_reg (w,GEN10_SAMPLER_MODE ); +} +void intel_engine_init_whitelist (struct intel_engine_cs *engine) {struct drm_i915_private *i915 = engine->i915;
@@ -1195,7 +1220,9 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine)wa_init_start (w,"whitelist" , engine->name); -if (IS_GEN (i915,11 )) +if (IS_GEN (i915,12 )) +tgl_whitelist_build (engine); +else if (IS_GEN (i915,11 ))icl_whitelist_build (engine);else if (IS_CANNONLAKE (i915))cnl_whitelist_build (engine);
@@ -1245,6 +1272,13 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) {struct drm_i915_private *i915 = engine->i915; +if (IS_GEN (i915,12 )) { +/* WaPipelineFlushCoherentLines:tgl */ +wa_write_or (wal, +GEN12_L3SQCREG2 , +GEN12_LQSC_FLUSH_COHERENT_LINES ); + } +if (IS_GEN (i915,11 )) {/* This is not an Wa. Enable for better image quality */ wa_masked_en(wal,
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -7747,6 +7747,9 @@ enum {#define GEN8_LQSC_RO_PERF_DIS (1 << 27)#define GEN8_LQSC_FLUSH_COHERENT_LINES (1 << 21) +#define GEN12_L3SQCREG2 _MMIO(0xb104) +#define GEN12_LQSC_FLUSH_COHERENT_LINES (1 << 24) +/* GEN8 chicken */ #define HDC_CHICKEN0 _MMIO(0x7300)#define CNL_HDC_CHICKEN0 _MMIO(0xE5F0)
drivers/gpu/drm/i915/intel_pm.c +3 -1
@@ -9608,7 +9608,9 @@ static void nop_init_clock_gating(struct drm_i915_private *dev_priv)*/ void intel_init_clock_gating_hooks (struct drm_i915_private *dev_priv) { -if (IS_GEN (dev_priv,11 )) +if (IS_GEN (dev_priv,12 )) + dev_priv->display.init_clock_gating = nop_init_clock_gating; +else if (IS_GEN (dev_priv,11 )) dev_priv->display.init_clock_gating = icl_init_clock_gating;else if (IS_CANNONLAKE (dev_priv)) dev_priv->display.init_clock_gating = cnl_init_clock_gating;
drivers/gpu/drm/i915/intel_uncore.c +1 -1
@@ -144,7 +144,7 @@ fw_domain_wait_ack_with_fallback(const struct intel_uncore_forcewake_domain *d,* the fallback ack. * * This workaround is described in HSDES #1604254524 and it's known as: -* WaRsForcewakeAddDelayForAck:skl,bxt,kbl,glk,cfl,cnl,icl +* WaRsForcewakeAddDelayForAck:skl,bxt,kbl,glk,cfl,cnl,icl,tgl * although the name is a bit misleading. */
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 16/22 drm/i915/tgl: Implement Wa_1604555607
In reply to Lucas De MarchiFrom: Michel Thierry <[email protected]>
Implement Wa_1604555607 (set the DS pairing timer to 128 cycles). FF_MODE2 is part of the register state context, that's why it is implemented here.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++ drivers/gpu/drm/i915/i915_reg.h | 5 +++++ 2 files changed, 13 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +8 -0
@@ -585,6 +585,14 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +struct drm_i915_private *dev_priv = engine->i915; +u32 val; + +/* Wa_1604555607:tgl */ + val =I915_READ (FF_MODE2 ); + val &= ~FF_MODE2_TDS_TIMER_MASK ; + val |=FF_MODE2_TDS_TIMER_128 ; +wa_write_masked_or (wal,FF_MODE2 ,FF_MODE2_TDS_TIMER_MASK , val); } static void
drivers/gpu/drm/i915/i915_reg.h +5 -0
@@ -7789,6 +7789,11 @@ enum {#define PIXEL_ROUNDING_TRUNC_FB_PASSTHRU (1 << 15)#define PER_PIXEL_ALPHA_BYPASS_EN (1 << 7) +#define FF_MODE2 _MMIO(0x6604) +#define FF_MODE2_TDS_TIMER_SHIFT (16) +#define FF_MODE2_TDS_TIMER_128 (4 << FF_MODE2_TDS_TIMER_SHIFT) +#define FF_MODE2_TDS_TIMER_MASK (0xff << FF_MODE2_TDS_TIMER_SHIFT) +/* PCH */ #define PCH_DISPLAY_BASE 0xc0000u
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 16/22] drm/i915/tgl: Implement Wa_1604555607
Quoted 18 lines · Lucas De Marchi
From: Michel Thierry <[email protected]>
Implement
Wa_1604555607(set the DS pairing timer to 128 cycles).FF_MODE2is part of the register state context, that's why it is implemented here.Signed-off-by Michel Thierry <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++ drivers/gpu/drm/i915/i915_reg.h | 5 +++++ 2 files changed, 13 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-0
drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 592
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +5
-0@@ -585,6 +585,14 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +struct drm_i915_private *dev_priv = engine->i915; +u32 val; + +/* Wa_1604555607:tgl */ + val =I915_READ (FF_MODE2 );
Suggest to switch to uncore mmio and get it from the engine.
Regards,
Tvrtko
P.S. Removed Michel from CC.
Quoted 13 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +3
-0+ val &= ~FF_MODE2_TDS_TIMER_MASK ; + val |=FF_MODE2_TDS_TIMER_128 ; +wa_write_masked_or (wal,FF_MODE2 ,FF_MODE2_TDS_TIMER_MASK , val); } static voiddrivers/gpu/drm/i915/i915_reg.h +0
-0@@ -7789,6 +7789,11 @@ enum {#define PIXEL_ROUNDING_TRUNC_FB_PASSTHRU (1 << 15)
drivers/gpu/drm/i915/i915_reg.h enum { · line 7799
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +5
-0#define PER_PIXEL_ALPHA_BYPASS_EN (1 << 7) +#define FF_MODE2 _MMIO(0x6604) +#define FF_MODE2_TDS_TIMER_SHIFT (16) +#define FF_MODE2_TDS_TIMER_128 (4 << FF_MODE2_TDS_TIMER_SHIFT) +#define FF_MODE2_TDS_TIMER_MASK (0xff << FF_MODE2_TDS_TIMER_SHIFT) +/* PCH */ #define PCH_DISPLAY_BASE 0xc0000u
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 16/22] drm/i915/tgl: Implement Wa_1604555607
Quoted 15 lines · Tvrtko Ursulin
Quoted 13 lines · Lucas De Marchi
From: Michel Thierry <[email protected]>
Implement
Wa_1604555607(set the DS pairing timer to 128 cycles).FF_MODE2is part of the register state context, that's why it is implemented here.Signed-off-by Michel Thierry <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++ drivers/gpu/drm/i915/i915_reg.h | 5 +++++ 2 files changed, 13 insertions(+)
Quoted 15 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, · line 592
Quoted 13 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +5
-0@@ -585,6 +585,14 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { +struct drm_i915_private *dev_priv = engine->i915; +u32 val; + +/* Wa_1604555607:tgl */ + val =I915_READ (FF_MODE2 );Suggest to switch to uncore mmio and get it from the engine.
will do for next version
thanks
Lucas De Marchi
Quoted 19 lines
Regards,
Tvrtko
P.S. Removed Michel from CC.Quoted 12 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +3
-0+ val &= ~FF_MODE2_TDS_TIMER_MASK ; + val |=FF_MODE2_TDS_TIMER_128 ; +wa_write_masked_or (wal,FF_MODE2 ,FF_MODE2_TDS_TIMER_MASK , val); } static voiddrivers/gpu/drm/i915/i915_reg.h +0
-0@@ -7789,6 +7789,11 @@ enum {#define PIXEL_ROUNDING_TRUNC_FB_PASSTHRU (1 << 15)#define PER_PIXEL_ALPHA_BYPASS_EN (1 << 7)
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h enum {
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +5
-0+#define FF_MODE2 _MMIO(0x6604) +#define FF_MODE2_TDS_TIMER_SHIFT (16) +#define FF_MODE2_TDS_TIMER_128 (4 << FF_MODE2_TDS_TIMER_SHIFT) +#define FF_MODE2_TDS_TIMER_MASK (0xff << FF_MODE2_TDS_TIMER_SHIFT) +/* PCH */ #define PCH_DISPLAY_BASE 0xc0000u
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 17/22 drm/i915/tgl: Implement Wa_1406941453
In reply to Lucas De MarchiFrom: Michel Thierry <[email protected]>
Enable Small PL for power benefit.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +5 -0
@@ -1285,6 +1285,11 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)wa_write_or (wal,GEN12_L3SQCREG2 ,GEN12_LQSC_FLUSH_COHERENT_LINES ); + +/* Wa_1406941453:tgl */ +wa_masked_en (wal, +SAMPLER_MODE , +SAMPLER_ENABLE_SMALL_PL ); }if (IS_GEN (i915,11 )) {
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -9009,6 +9009,9 @@ enum {#define GEN9_DG_MIRROR_FIX_ENABLE (1 << 5)#define GEN9_CCS_TLB_PREFETCH_ENABLE (1 << 3) +#define SAMPLER_MODE _MMIO(0xe18c) +#define SAMPLER_ENABLE_SMALL_PL (1 << 15) +#define GEN8_ROW_CHICKEN _MMIO(0xe4f0)#define FLOW_CONTROL_ENABLE (1 << 15)#define PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE (1 << 8)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 17/22] drm/i915/tgl: Implement Wa_1406941453
Quoted 6 lines · Lucas De Marchi
From: Michel Thierry <[email protected]>
Enable Small PL for power benefit.
Signed-off-by Michel Thierry <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 8 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +5
-0@@ -1285,6 +1285,11 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)wa_write_or (wal,GEN12_L3SQCREG2 ,GEN12_LQSC_FLUSH_COHERENT_LINES ); + +/* Wa_1406941453:tgl */ +wa_masked_en (wal, +SAMPLER_MODE , +SAMPLER_ENABLE_SMALL_PL ); }drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-0if (IS_GEN (i915,11 )) {drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 9017
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -9009,6 +9009,9 @@ enum {#define GEN9_DG_MIRROR_FIX_ENABLE (1 << 5)#define GEN9_CCS_TLB_PREFETCH_ENABLE (1 << 3) +#define SAMPLER_MODE _MMIO(0xe18c) +#define SAMPLER_ENABLE_SMALL_PL (1 << 15) +#define GEN8_ROW_CHICKEN _MMIO(0xe4f0)#define FLOW_CONTROL_ENABLE (1 << 15)#define PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE (1 << 8)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 18/22 drm/i915/tgl: Define MOCS entries for Tigerlake
In reply to Lucas De MarchiFrom: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
--- drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_mocs.c +22 -3
@@ -62,6 +62,10 @@ struct drm_i915_mocs_table {#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means +* the same as LE_UC +*/ #define LE_0_PAGETABLE _LE_CACHEABILITY(0)#define LE_1_UC _LE_CACHEABILITY(1)#define LE_2_WT _LE_CACHEABILITY(2)
@@ -100,8 +104,9 @@ struct drm_i915_mocs_table {* of bspec. * * Entries not part of the following tables are undefined as far as -* userspace is concerned and shouldn't be relied upon. For the time -* being they will be initialized to PTE. +* userspace is concerned and shouldn't be relied upon. For Gen < 12 +* they will be initialized to PTE. Gen >= 12 onwards don't have a setting for +* PTE. We use the same value, but that actually means Uncached. * * The last two entries are reserved by the hardware. For ICL+ they * should be initialized according to bspec and never used, for older
@@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { };#define GEN11_MOCS_ENTRIES \ -/* Base - Uncached (Deprecated) */ \ +/* Gen11: Base - Uncached (Deprecated) */ \ +/* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \/* Base - L3 + LeCC:PAT (Deprecated) */ \ +/* Gen12+: Base - Reserved */ \MOCS_ENTRY (I915_MOCS_PTE , \LE_0_PAGETABLE |LE_TC_1_LLC , \ L3_3_WB), \
@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = {MOCS_ENTRY (23 , \LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ) |LE_RSC (1 ) |LE_SCC (7 ), \L3_3_WB ), \ +/* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \ +MOCS_ENTRY (48 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_3_WB ), \ +/* Gen12+: HW Reserved - HW Special Case (CCS) */ \ +MOCS_ENTRY (60 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_1_UC ), \ +/* Gen12+: HW Reserved - HW Special Case (Displayable) */ \ +MOCS_ENTRY (61 , \ +LE_1_UC |LE_TC_1_LLC |LE_SCF (1 ), \ +L3_3_WB ), \/* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake
Quoted 63 lines · Lucas De Marchi
From: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
Cc Joonas Lahtinen <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Tomasz Lis <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +10
-3@@ -62,6 +62,10 @@ struct drm_i915_mocs_table {#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means +* the same as LE_UC +*/ #define LE_0_PAGETABLE _LE_CACHEABILITY(0)#define LE_1_UC _LE_CACHEABILITY(1)#define LE_2_WT _LE_CACHEABILITY(2)@@ -100,8 +104,9 @@ struct drm_i915_mocs_table {* of bspec. * * Entries not part of the following tables are undefined as far as -* userspace is concerned and shouldn't be relied upon. For the time -* being they will be initialized to PTE. +* userspace is concerned and shouldn't be relied upon. For Gen < 12 +* they will be initialized to PTE. Gen >= 12 onwards don't have a setting for +* PTE. We use the same value, but that actually means Uncached. * * The last two entries are reserved by the hardware. For ICL+ they * should be initialized according to bspec and never used, for older @@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { };#define GEN11_MOCS_ENTRIES \ -/* Base - Uncached (Deprecated) */ \ +/* Gen11: Base - Uncached (Deprecated) */ \ +/* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \/* Base - L3 + LeCC:PAT (Deprecated) */ \ +/* Gen12+: Base - Reserved */ \MOCS_ENTRY (I915_MOCS_PTE , \LE_0_PAGETABLE |LE_TC_1_LLC , \ L3_3_WB), \
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 243
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +1
-0@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = {MOCS_ENTRY (23 , \LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ) |LE_RSC (1 ) |LE_SCC (7 ), \ L3_3_WB), \ +/* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \
Why is this marked as reserved? From the looks of things 48-61 should just be normal entries that userspace can select to get HDC L1$. And looks like icl already has that stuff. So someone should probably figure out if Mesa/etc. can make use of the HDC L1$, and if so we should add the relevant MOCS entries for icl as well.
Quoted 16 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +11
-0+MOCS_ENTRY (48 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_3_WB ), \ +/* Gen12+: HW Reserved - HW Special Case (CCS) */ \ +MOCS_ENTRY (60 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_1_UC ), \ +/* Gen12+: HW Reserved - HW Special Case (Displayable) */ \ +MOCS_ENTRY (61 , \ +LE_1_UC |LE_TC_1_LLC |LE_SCF (1 ), \ +L3_3_WB ), \/* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \Signature · 1 line
2.21.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake
Quoted 66 lines · Ville Syrjälä
Quoted 65 lines · Lucas De Marchi
From: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
Cc Joonas Lahtinen <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Tomasz Lis <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +10
-3@@ -62,6 +62,10 @@ struct drm_i915_mocs_table {#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means +* the same as LE_UC +*/ #define LE_0_PAGETABLE _LE_CACHEABILITY(0)#define LE_1_UC _LE_CACHEABILITY(1)#define LE_2_WT _LE_CACHEABILITY(2)@@ -100,8 +104,9 @@ struct drm_i915_mocs_table {* of bspec. * * Entries not part of the following tables are undefined as far as -* userspace is concerned and shouldn't be relied upon. For the time -* being they will be initialized to PTE. +* userspace is concerned and shouldn't be relied upon. For Gen < 12 +* they will be initialized to PTE. Gen >= 12 onwards don't have a setting for +* PTE. We use the same value, but that actually means Uncached. * * The last two entries are reserved by the hardware. For ICL+ they * should be initialized according to bspec and never used, for older @@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { };#define GEN11_MOCS_ENTRIES \ -/* Base - Uncached (Deprecated) */ \ +/* Gen11: Base - Uncached (Deprecated) */ \ +/* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \/* Base - L3 + LeCC:PAT (Deprecated) */ \ +/* Gen12+: Base - Reserved */ \MOCS_ENTRY (I915_MOCS_PTE , \LE_0_PAGETABLE |LE_TC_1_LLC , \ L3_3_WB), \@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { MOCS_ENTRY(23, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3) | LE_RSC(1) | LE_SCC(7), \
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 243
Quoted 2 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +1
-0L3_3_WB), \ +/* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \Why is this marked as reserved? From the looks of things 48-61 should just be normal entries that userspace can select to get HDC L1$. And looks like icl already has that stuff. So someone should probably figure out if Mesa/etc. can make use of the HDC L1$, and if so we should add the relevant MOCS entries for icl as well.
Here the reserved terminology is indeed misleading. The 48-59 range is a "special" range where L1 usage is implicitly enabled by the HW, as there is no explicit L1 toggle in the MOCS registers. The reserved here means that the range shouldn't be used for "normal" MOCS settings, but SW can freely use these entries as needed. Similarly, MOCS 60 and 61 are reserved for other special purposes, but are still usable by SW. The only entries SW shouldn't touch are 62 and 63.
Regarding ICL, Gen11 HW doesn't have the capability so no new entries are required there.
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 247
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +4
-0+MOCS_ENTRY (48 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ + L3_3_WB), \ +/* Gen12+: HW Reserved - HW Special Case (CCS) */ \
The specs have MOCS 49-51 defined as well.
Daniele
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +4
-0+MOCS_ENTRY (60 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ + L3_1_UC), \ +/* Gen12+: HW Reserved - HW Special Case (Displayable) */ \
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +3
-0+MOCS_ENTRY (61 , \ +LE_1_UC |LE_TC_1_LLC |LE_SCF (1 ), \ +L3_3_WB ), \/* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \Signature · 1 line
2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake
Quoted 86 lines · Daniele Ceraolo Spurio
Quoted 66 lines · Ville Syrjälä
Quoted 65 lines · Lucas De Marchi
From: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
Cc Joonas Lahtinen <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Tomasz Lis <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +10
-3@@ -62,6 +62,10 @@ struct drm_i915_mocs_table {#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means +* the same as LE_UC +*/ #define LE_0_PAGETABLE _LE_CACHEABILITY(0)#define LE_1_UC _LE_CACHEABILITY(1)#define LE_2_WT _LE_CACHEABILITY(2)@@ -100,8 +104,9 @@ struct drm_i915_mocs_table {* of bspec. * * Entries not part of the following tables are undefined as far as -* userspace is concerned and shouldn't be relied upon. For the time -* being they will be initialized to PTE. +* userspace is concerned and shouldn't be relied upon. For Gen < 12 +* they will be initialized to PTE. Gen >= 12 onwards don't have a setting for +* PTE. We use the same value, but that actually means Uncached. * * The last two entries are reserved by the hardware. For ICL+ they * should be initialized according to bspec and never used, for older @@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { };#define GEN11_MOCS_ENTRIES \ -/* Base - Uncached (Deprecated) */ \ +/* Gen11: Base - Uncached (Deprecated) */ \ +/* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \/* Base - L3 + LeCC:PAT (Deprecated) */ \ +/* Gen12+: Base - Reserved */ \MOCS_ENTRY (I915_MOCS_PTE , \LE_0_PAGETABLE |LE_TC_1_LLC , \ L3_3_WB), \@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { MOCS_ENTRY(23, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3) | LE_RSC(1) | LE_SCC(7), \Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 243
Quoted 2 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +1
-0L3_3_WB), \ +/* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \Why is this marked as reserved? From the looks of things 48-61 should just be normal entries that userspace can select to get HDC L1$. And looks like icl already has that stuff. So someone should probably figure out if Mesa/etc. can make use of the HDC L1$, and if so we should add the relevant MOCS entries for icl as well.
Here the reserved terminology is indeed misleading. The 48-59 range is a "special" range where L1 usage is implicitly enabled by the HW, as there is no explicit L1 toggle in the MOCS registers. The reserved here means that the range shouldn't be used for "normal" MOCS settings, but SW can freely use these entries as needed. Similarly, MOCS 60 and 61 are reserved for other special purposes, but are still usable by SW. The only entries SW shouldn't touch are 62 and 63.
Quoted 2 lines
Regarding ICL, Gen11 HW doesn't have the capability so no new entries are required there.
Hmm. The table doesn't list those entries, but HDC_CHICKEN2 seems to be saying the features is in there. HDC_MODE also talks about HDC L1$. Confusing.
Quoted 24 lines
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 247
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +4
-0+MOCS_ENTRY (48 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ + L3_3_WB), \ +/* Gen12+: HW Reserved - HW Special Case (CCS) */ \The specs have MOCS 49-51 defined as well.
Daniele
Quoted 13 lines
Quoted 12 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +7
-0+MOCS_ENTRY (60 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_1_UC ), \ +/* Gen12+: HW Reserved - HW Special Case (Displayable) */ \ +MOCS_ENTRY (61 , \ +LE_1_UC |LE_TC_1_LLC |LE_SCF (1 ), \ +L3_3_WB ), \/* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \Signature · 1 line
2.21.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake
In reply to Daniele Ceraolo SpurioQuoted 81 lines · Daniele Ceraolo Spurio
Quoted 64 lines · Ville Syrjälä
Quoted 63 lines · Lucas De Marchi
From: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
Cc Joonas Lahtinen <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Tomasz Lis <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +10
-3@@ -62,6 +62,10 @@ struct drm_i915_mocs_table {#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means +* the same as LE_UC +*/ #define LE_0_PAGETABLE _LE_CACHEABILITY(0)#define LE_1_UC _LE_CACHEABILITY(1)#define LE_2_WT _LE_CACHEABILITY(2)@@ -100,8 +104,9 @@ struct drm_i915_mocs_table {* of bspec. * * Entries not part of the following tables are undefined as far as -* userspace is concerned and shouldn't be relied upon. For the time -* being they will be initialized to PTE. +* userspace is concerned and shouldn't be relied upon. For Gen < 12 +* they will be initialized to PTE. Gen >= 12 onwards don't have a setting for +* PTE. We use the same value, but that actually means Uncached. * * The last two entries are reserved by the hardware. For ICL+ they * should be initialized according to bspec and never used, for older @@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { };#define GEN11_MOCS_ENTRIES \ -/* Base - Uncached (Deprecated) */ \ +/* Gen11: Base - Uncached (Deprecated) */ \ +/* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \/* Base - L3 + LeCC:PAT (Deprecated) */ \ +/* Gen12+: Base - Reserved */ \MOCS_ENTRY (I915_MOCS_PTE , \LE_0_PAGETABLE |LE_TC_1_LLC , \ L3_3_WB), \@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { MOCS_ENTRY(23, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3) | LE_RSC(1) | LE_SCC(7), \Quoted 8 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 243
Quoted 2 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +1
-0L3_3_WB), \ +/* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \Why is this marked as reserved? From the looks of things 48-61 should just be normal entries that userspace can select to get HDC L1$. And looks like icl already has that stuff. So someone should probably figure out if Mesa/etc. can make use of the HDC L1$, and if so we should add the relevant MOCS entries for icl as well.
Here the reserved terminology is indeed misleading. The 48-59 range is a "special" range where L1 usage is implicitly enabled by the HW, as there is no explicit L1 toggle in the MOCS registers. The reserved here means that the range shouldn't be used for "normal" MOCS settings, but SW can freely use these entries as needed. Similarly, MOCS 60 and 61 are reserved for other special purposes, but are still usable by SW. The only entries SW shouldn't touch are 62 and 63.
Regarding ICL, Gen11 HW doesn't have the capability so no new entries are required there.
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry broxton_mocs_table[] = { · line 247
Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +4
-0+MOCS_ENTRY (48 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ + L3_3_WB), \ +/* Gen12+: HW Reserved - HW Special Case (CCS) */ \The specs have MOCS 49-51 defined as well.
humn... it seems they got added later.
I'm not sure anymore if we should update igt so it doesn't expect those entries to be set to PTE or if we should stop reusing the same table for ICL and TGL. Spec doesn't mention the compatibility of this table with gen 11 anymore. Thoughts?
Lucas De Marchi
Quoted 16 lines
Daniele
Quoted 13 lines
Quoted 12 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +7
-0+MOCS_ENTRY (60 , \ +LE_3_WB |LE_TC_1_LLC |LE_LRUM (3 ), \ +L3_1_UC ), \ +/* Gen12+: HW Reserved - HW Special Case (Displayable) */ \ +MOCS_ENTRY (61 , \ +LE_1_UC |LE_TC_1_LLC |LE_SCF (1 ), \ +L3_3_WB ), \/* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \Signature · 1 line
2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 18/22] drm/i915/tgl: Define MOCS entries for Tigerlake
Quoted 81 lines · Lucas De Marchi
Quoted 80 lines · Daniele Ceraolo Spurio
Quoted 76 lines · Ville Syrjälä
Quoted 64 lines · Lucas De Marchi
From: Tomasz Lis <[email protected]>
The MOCS table is published as part of bspec, and versioned. Entries are supposed to never be modified, but new ones can be added. Adding entries increases table version. The patch includes version 1 entries.
Two of the 3 legacy entries used for gen9 are no longer expected to work. Although we are changing the gen11 table, those changes are supposed to be backward compatible since we are only touching previously undefined entries.
Cc Joonas Lahtinen <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Daniele Ceraolo Spurio <[email protected]>Signed-off-by Tomasz Lis <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>---
drivers/gpu/drm/i915/gt/intel_mocs.c | 25 ++++++++++++++++++++++---1 file changed, 22 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +2
-0@@ -62,6 +62,10 @@ struct drm_i915_mocs_table { #define GEN11_NUM_MOCS_ENTRIES 64 /* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ +/* +* Note: LE_0_PAGETABLE works only up to Gen11; for newer gens it means
+ * the same asLE_UC
+ */
#define LE_0_PAGETABLE_LE_CACHEABILITY(0)#define LE_1_UC_LE_CACHEABILITY(1)#define LE_2_WT_LE_CACHEABILITY(2)drivers/gpu/drm/i915/gt/intel_mocs.c +2
-2@@ -100,8 +104,9 @@ struct drm_i915_mocs_table { * of bspec. * * Entries not part of the following tables are undefined as far as - * userspace is concerned and shouldn't be relied upon. For the time - * being they will be initialized to PTE. + * userspace is concerned and shouldn't be relied upon. For Gen < 12 + * they will be initialized to PTE. Gen >= 12 onwards don't have asetting for
+ * PTE. We use the same value, but that actually means Uncached. *
* The last two entries are reserved by the hardware. For ICL+ they
* should be initialized according to bspec and never used, for olderdrivers/gpu/drm/i915/gt/intel_mocs.c +3
-1@@ -137,11 +142,13 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { }; #define GEN11_MOCS_ENTRIES \ - /* Base - Uncached (Deprecated) */ \ + /* Gen11: Base - Uncached (Deprecated) */ \ + /* Gen12+: Base - Error (Reserved for Non-Use) */ \ MOCS_ENTRY(I915_MOCS_UNCACHED, \ LE_1_UC | LE_TC_1_LLC, \ L3_1_UC), \ /* Base - L3 + LeCC:PAT (Deprecated) */ \ + /* Gen12+: Base - Reserved */ \ MOCS_ENTRY(I915_MOCS_PTE, \ LE_0_PAGETABLE | LE_TC_1_LLC, \ L3_3_WB), \drivers/gpu/drm/i915/gt/intel_mocs.c static const struct drm_i915_mocs_entry · line 244
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +1
-0@@ -233,6 +240,18 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = { MOCS_ENTRY(23, \ LE_3_WB | LE_TC_1_LLC | LE_LRUM(3) | LE_RSC(1) | LE_SCC(7), \ L3_3_WB), \ + /* Gen12+: HW Reserved - HDC:L1 + L3 + LLC */ \Why is this marked as reserved? From the looks of things 48-61 should just be normal entries that userspace can select to get HDC L1$. And looks like icl already has that stuff. So someone should probably figure out if Mesa/etc. can make use of the HDC L1$, and if so we should add the relevant MOCS entries for icl as well.
Quoted 3 lines
Quoted 3 lines
Here the reserved terminology is indeed misleading. The 48-59 range is a "special" range where L1 usage is implicitly enabled by the HW, as there is no explicit L1 toggle in the MOCS registers. The reserved here means that the range shouldn't be used for "normal" MOCS settings, but SW can freely use these entries as needed. Similarly, MOCS 60 and 61 are reserved for other special purposes, but are still usable by SW. The only entries SW shouldn't touch are 62 and 63.
Regarding ICL, Gen11 HW doesn't have the capability so no new entries are required there.
It might be a good idea to find a better word for it than "reserved". Not only for this patch, but to be used everywhere, especially the spec. But that exceeds the scope of this review.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +4
-0+ MOCS_ENTRY(48, \ + LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \ + L3_3_WB), \ + /* Gen12+: HW Reserved - HW Special Case (CCS) */ \
Quoted 10 lines
Quoted 1 line
The specs have MOCS 49-51 defined as well.
humn... it seems they got added later.
I'm not sure anymore if we should update igt so it doesn't expect those entries to be set to PTE or if we should stop reusing the same table for ICL and TGL. Spec doesn't mention the compatibility of this table with gen 11 anymore. Thoughts?
It doesn't sound right to change the implementation decision to keep them together, only because this allows to keep tests intact.
I don't believe there's a reason to verify undefined entries in IGT. Sometimes we do want to verify our specific implementation instead of pure specs compliance; but I don't see a reason for this should be the case here.
The existing MOCS entries are supposed to be unchangeable (in the boundary of specific platform). So the chances of having to split the tables in the future are low (both tables would have to define V2 entries at same indexes, and define them differently).
-Tomasz
Quoted 18 lines
Lucas De Marchi
Quoted 16 lines
Daniele
Quoted 13 lines
Quoted 12 lines
drivers/gpu/drm/i915/gt/intel_mocs.c +7
-0+ MOCS_ENTRY(60, \ + LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \ + L3_1_UC), \ + /* Gen12+: HW Reserved - HW Special Case (Displayable) */ \ + MOCS_ENTRY(61, \ + LE_1_UC | LE_TC_1_LLC | LE_SCF(1), \ + L3_3_WB), \ /* HW Reserved - SW program but never use */ \ MOCS_ENTRY(62, \
LE_3_WB|LE_TC_1_LLC|LE_LRUM(3), \Signature · 1 line
2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 19/22 drm/i915/tgl: Tigerlake only has global MOCS registers
In reply to Lucas De MarchiFrom: Michel Thierry <[email protected]>
Until Icelake, each engine had its own set of 64 MOCS registers. In order to simplify, Tigerlake moves to only 64 Global MOCS registers, which are no longer part of the engine context. Since these registers are now global, they also only need to be initialized once.
These new global MOCS registers are located in the same offset of the render MOCS register from previous platforms.
From Gen12 onwards, MOCS must specify the target cache (3:2) and LRU management (5:4) fields and cannot be programmed to 'use the value from Private PAT', because these fields are no longer part of the PPAT. Also cacheability control (1:0) field has changed, 00 no longer means 'use controls from page table', but uncacheable (UC).
--- drivers/gpu/drm/i915/gt/intel_gt.c | 12 ++++-- drivers/gpu/drm/i915/gt/intel_mocs.c | 47 ++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_mocs.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++-- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 9 files changed, 74 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt.c +9 -3
@@ -80,8 +80,11 @@ intel_gt_clear_error_registers(struct intel_gt *gt, }if (INTEL_GEN (i915) >=8 ) { -rmw_clear (uncore,GEN8_RING_FAULT_REG ,RING_FAULT_VALID ); -intel_uncore_posting_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = (INTEL_GEN (i915) >=12 ) ? +GEN12_RING_FAULT_REG : +GEN8_RING_FAULT_REG ; +rmw_clear (uncore, fault_reg,RING_FAULT_VALID ); +intel_uncore_posting_read (uncore, fault_reg); }else if (INTEL_GEN (i915) >=6 ) {struct intel_engine_cs *engine;enum intel_engine_id id;
@@ -117,7 +120,10 @@ static void gen6_check_faults(struct intel_gt *gt)static void gen8_check_faults (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore; -u32 fault =intel_uncore_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = + (INTEL_GEN (gt->i915) >=12 ) ? +GEN12_RING_FAULT_REG :GEN8_RING_FAULT_REG ; +u32 fault =intel_uncore_read (uncore, fault_reg);if (fault &RING_FAULT_VALID ) {u32 fault_data0, fault_data1;
drivers/gpu/drm/i915/gt/intel_mocs.c +47 -0
65 lines not on this page · raw message
drivers/gpu/drm/i915/gt/intel_mocs.h +1 -0
@@ -56,6 +56,7 @@ struct intel_gt;int intel_rcs_context_init_mocs (struct i915_request *rq);void intel_mocs_init_l3cc_table (struct intel_gt *gt); +void intel_mocs_init_global (struct intel_gt *gt);void intel_mocs_init_engine (struct intel_engine_cs *engine);#endif
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -2308,6 +2308,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu) +#define HAS_GLOBAL_MOCS_REGISTERS (dev_priv) (INTEL_INFO(dev_priv)->has_global_mocs) +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00
drivers/gpu/drm/i915/i915_gem.c +1 -0
@@ -1254,6 +1254,7 @@ int i915_gem_init_hw(struct drm_i915_private *i915) goto out; } +intel_mocs_init_global (gt);intel_mocs_init_l3cc_table (gt);intel_engines_set_scheduler_caps (i915);
drivers/gpu/drm/i915/i915_gpu_error.c +8 -3
@@ -1153,7 +1153,10 @@ static void error_record_engine_registers(struct i915_gpu_state *error,if (INTEL_GEN (dev_priv) >=6 ) { ee->rc_psmi =ENGINE_READ (engine,RING_PSMI_CTL ); -if (INTEL_GEN (dev_priv) >=8 ) + +if (INTEL_GEN (dev_priv) >=12 ) + ee->fault_reg =I915_READ (GEN12_RING_FAULT_REG ); +else if (INTEL_GEN (dev_priv) >=8 ) ee->fault_reg =I915_READ (GEN8_RING_FAULT_REG );else ee->fault_reg =GEN6_RING_FAULT_REG_READ (engine);
@@ -1613,8 +1616,10 @@ static void capture_reg_state(struct i915_gpu_state *error)if (INTEL_GEN (i915) >=6 ) { error->derrmr =intel_uncore_read (uncore,DERRMR ); - error->error =intel_uncore_read (uncore,ERROR_GEN6 ); - error->done_reg =intel_uncore_read (uncore,DONE_REG ); +if (INTEL_GEN (i915) <12 ) { + error->error =intel_uncore_read (uncore,ERROR_GEN6 ); + error->done_reg =intel_uncore_read (uncore,DONE_REG ); + } }if (INTEL_GEN (i915) >=5 )
drivers/gpu/drm/i915/i915_pci.c +2 -1
@@ -783,7 +783,8 @@ static const struct intel_device_info intel_elkhartlake_info = { [TRANSCODER_D] = TRANSCODER_D_OFFSET, \ [TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \ [TRANSCODER_DSI_1 ] =TRANSCODER_DSI1_OFFSET , \ - } + }, \ + .has_global_mocs = 1static const struct intel_device_info intel_tigerlake_12_info = {GEN12_FEATURES ,
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -2490,6 +2490,7 @@ enum i915_power_well_id {#define RENDER_HWS_PGA_GEN7 _MMIO(0x04080)#define RING_FAULT_REG (engine) _MMIO(0x4094 + 0x100 * (engine)->hw_id)#define GEN8_RING_FAULT_REG _MMIO(0x4094) +#define GEN12_RING_FAULT_REG _MMIO(0xcec4)#define GEN8_RING_FAULT_ENGINE_ID (x) (((x) >> 12) & 0x7)#define RING_FAULT_GTTSEL_MASK (1 << 11)#define RING_FAULT_SRCID (x) (((x) >> 3) & 0xff)
@@ -11362,6 +11363,8 @@ enum skl_power_gate {#define PMFLUSH_GAPL3UNBLOCK (1 << 21)#define PMFLUSHDONE_LNEBLK (1 << 22) +#define GEN12_GLOBAL_MOCS (i) _MMIO(0x4000 + (i) * 4)/* Global MOCS regs */ +/* gamt regs */ #define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)#define GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW 0x67F1427F/* max/min for LRA1/2 */
drivers/gpu/drm/i915/intel_device_info.h +1 -0
@@ -112,6 +112,7 @@ enum intel_ppgtt_type {func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_fpga_dbg); \ +func (has_global_mocs); \func (has_guc); \func (has_l3_dpf); \func (has_llc); \
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 19/22] drm/i915/tgl: Tigerlake only has global MOCS registers
Quoted 9 lines · Lucas De Marchi
From: Michel Thierry <[email protected]>
Until Icelake, each engine had its own set of 64 MOCS registers. In order to simplify, Tigerlake moves to only 64 Global MOCS registers, which are no longer part of the engine context. Since these registers are now global, they also only need to be initialized once.
These new global MOCS registers are located in the same offset of the render MOCS register from previous platforms.
No, they're not :). They're located in a new range, which overlaps with the location where the fault register was previously located and that's why the offset of that one has been changed as well. The code does the right thing, so only this sentence needs fixing.
the FAULT_TLB_DATA* registers have been moved as well as part of the re-org, so maybe we can have a patch that just moves all the offsets and then add the global mocs on top?
Quoted 6 lines
From Gen12 onwards, MOCS must specify the target cache (3:2) and LRU
management (5:4) fields and cannot be programmed to 'use the value from Private PAT', because these fields are no longer part of the PPAT. Also cacheability control (1:0) field has changed, 00 no longer means 'use controls from page table', but uncacheable (UC).
Should we put this as a comment in the code somewhere? Although I'm not sure we have any use for this info since we copy the table straight from the specs and we should probably trust it is correct.
Daniele
Quoted 227 lines
Cc Daniele Ceraolo Spurio <[email protected]>Cc Tomasz Lis <[email protected]>Signed-off-by Michel Thierry <[email protected]>Signed-off-by Tvrtko Ursulin <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_gt.c | 12 ++++-- drivers/gpu/drm/i915/gt/intel_mocs.c | 47 ++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_mocs.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++-- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 9 files changed, 74 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/gt/intel_gt.c +9
-3@@ -80,8 +80,11 @@ intel_gt_clear_error_registers(struct intel_gt *gt, }if (INTEL_GEN (i915) >=8 ) { -rmw_clear (uncore,GEN8_RING_FAULT_REG ,RING_FAULT_VALID ); -intel_uncore_posting_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = (INTEL_GEN (i915) >=12 ) ? +GEN12_RING_FAULT_REG : +GEN8_RING_FAULT_REG ; +rmw_clear (uncore, fault_reg,RING_FAULT_VALID ); +intel_uncore_posting_read (uncore, fault_reg); }else if (INTEL_GEN (i915) >=6 ) {struct intel_engine_cs *engine;enum intel_engine_id id;@@ -117,7 +120,10 @@ static void gen6_check_faults(struct intel_gt *gt)static void gen8_check_faults (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore; -u32 fault =intel_uncore_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = + (INTEL_GEN (gt->i915) >=12 ) ? +GEN12_RING_FAULT_REG :GEN8_RING_FAULT_REG ; +u32 fault =intel_uncore_read (uncore, fault_reg);if (fault &RING_FAULT_VALID ) {u32 fault_data0, fault_data1;drivers/gpu/drm/i915/gt/intel_mocs.c +47
-0@@ -365,6 +365,10 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine)unsigned int index;u32 unused_value; +/* Platforms with global MOCS do not need per-engine initialization. */ +if (HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +return ; +/* Called under a blanket forcewake */ assert_forcewakes_active (uncore,FORCEWAKE_ALL );@@ -389,6 +393,46 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine) unused_value); } +/** +* intel_mocs_init_global() - program the global mocs registers +* gt: pointer to struct intel_gt +* +* This function initializes the MOCS global registers. +*/ +void intel_mocs_init_global (struct intel_gt *gt) +{ +struct intel_uncore *uncore = gt->uncore; +struct drm_i915_mocs_table table; +unsigned int index; + +if (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +return ; + +if (!get_mocs_settings (gt, &table)) +return ; + +if (GEM_DEBUG_WARN_ON (table.size > table.n_entries)) +return ; + +for (index =0 ; index < table.size; index++) +intel_uncore_write (uncore, +GEN12_GLOBAL_MOCS (index), + table.table[index].control_value); + +/* +* Ok, now set the unused entries to uncached. These entries +* are officially undefined and no contract for the contents +* and settings is given for these entries. +* +* Entry 0 in the table is uncached - so we are just writing +* that value to all the used entries. +*/ +for (; index < table.n_entries; index++) +intel_uncore_write (uncore, +GEN12_GLOBAL_MOCS (index), + table.table[0 ].control_value); +} +/** * emit_mocs_control_table() - emit the mocs control table * @rq: Request to set up the MOCS table for. @@ -592,6 +636,9 @@ int intel_rcs_context_init_mocs(struct i915_request *rq)struct drm_i915_mocs_table t;int ret; +if (HAS_GLOBAL_MOCS_REGISTERS (rq->i915)) +return 0 ; +if (get_mocs_settings (rq->engine->gt, &t)) {/* Program the RCS control registers */ ret =emit_mocs_control_table (rq, &t);drivers/gpu/drm/i915/gt/intel_mocs.h +1
-0@@ -56,6 +56,7 @@ struct intel_gt;int intel_rcs_context_init_mocs (struct i915_request *rq);void intel_mocs_init_l3cc_table (struct intel_gt *gt); +void intel_mocs_init_global (struct intel_gt *gt);void intel_mocs_init_engine (struct intel_engine_cs *engine);#endif drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -2308,6 +2308,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu) +#define HAS_GLOBAL_MOCS_REGISTERS (dev_priv) (INTEL_INFO(dev_priv)->has_global_mocs) +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00drivers/gpu/drm/i915/i915_gem.c +1
-0@@ -1254,6 +1254,7 @@ int i915_gem_init_hw(struct drm_i915_private *i915) goto out; } +intel_mocs_init_global (gt);intel_mocs_init_l3cc_table (gt);intel_engines_set_scheduler_caps (i915);drivers/gpu/drm/i915/i915_gpu_error.c +8
-3@@ -1153,7 +1153,10 @@ static void error_record_engine_registers(struct i915_gpu_state *error,if (INTEL_GEN (dev_priv) >=6 ) { ee->rc_psmi =ENGINE_READ (engine,RING_PSMI_CTL ); -if (INTEL_GEN (dev_priv) >=8 ) + +if (INTEL_GEN (dev_priv) >=12 ) + ee->fault_reg =I915_READ (GEN12_RING_FAULT_REG ); +else if (INTEL_GEN (dev_priv) >=8 ) ee->fault_reg =I915_READ (GEN8_RING_FAULT_REG );else ee->fault_reg =GEN6_RING_FAULT_REG_READ (engine);@@ -1613,8 +1616,10 @@ static void capture_reg_state(struct i915_gpu_state *error)if (INTEL_GEN (i915) >=6 ) { error->derrmr =intel_uncore_read (uncore,DERRMR ); - error->error =intel_uncore_read (uncore,ERROR_GEN6 ); - error->done_reg =intel_uncore_read (uncore,DONE_REG ); +if (INTEL_GEN (i915) <12 ) { + error->error =intel_uncore_read (uncore,ERROR_GEN6 ); + error->done_reg =intel_uncore_read (uncore,DONE_REG ); + } }if (INTEL_GEN (i915) >=5 )drivers/gpu/drm/i915/i915_pci.c +2
-1@@ -783,7 +783,8 @@ static const struct intel_device_info intel_elkhartlake_info = { [TRANSCODER_D] = TRANSCODER_D_OFFSET, \ [TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \ [TRANSCODER_DSI_1 ] =TRANSCODER_DSI1_OFFSET , \ - } + }, \ + .has_global_mocs = 1static const struct intel_device_info intel_tigerlake_12_info = {GEN12_FEATURES ,drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -2490,6 +2490,7 @@ enum i915_power_well_id {#define RENDER_HWS_PGA_GEN7 _MMIO(0x04080)#define RING_FAULT_REG (engine) _MMIO(0x4094 + 0x100 * (engine)->hw_id)#define GEN8_RING_FAULT_REG _MMIO(0x4094) +#define GEN12_RING_FAULT_REG _MMIO(0xcec4)#define GEN8_RING_FAULT_ENGINE_ID (x) (((x) >> 12) & 0x7)#define RING_FAULT_GTTSEL_MASK (1 << 11)#define RING_FAULT_SRCID (x) (((x) >> 3) & 0xff)@@ -11362,6 +11363,8 @@ enum skl_power_gate {#define PMFLUSH_GAPL3UNBLOCK (1 << 21)#define PMFLUSHDONE_LNEBLK (1 << 22) +#define GEN12_GLOBAL_MOCS (i) _MMIO(0x4000 + (i) * 4)/* Global MOCS regs */ +/* gamt regs */ #define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)#define GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW 0x67F1427F/* max/min for LRA1/2 */ drivers/gpu/drm/i915/intel_device_info.h +0
-0
drivers/gpu/drm/i915/intel_device_info.h enum intel_ppgtt_type { · line 118
Quoted 7 lines
drivers/gpu/drm/i915/intel_device_info.h +1
-0@@ -112,6 +112,7 @@ enum intel_ppgtt_type {func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_fpga_dbg); \ +func (has_global_mocs); \func (has_guc); \func (has_l3_dpf); \func (has_llc); \
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 19/22] drm/i915/tgl: Tigerlake only has global MOCS registers
Quoted 10 lines · Daniele Ceraolo Spurio
Quoted 7 lines · Lucas De Marchi
From: Michel Thierry <[email protected]>
Until Icelake, each engine had its own set of 64 MOCS registers. In order to simplify, Tigerlake moves to only 64 Global MOCS registers, which are no longer part of the engine context. Since these registers are now global, they also only need to be initialized once.
Quoted 6 lines
Quoted 2 lines
These new global MOCS registers are located in the same offset of the render MOCS register from previous platforms.
No, they're not :). They're located in a new range, which overlaps with the location where the fault register was previously located and that's why the offset of that one has been changed as well. The code does the right thing, so only this sentence needs fixing.
the FAULT_TLB_DATA* registers have been moved as well as part of the re-org, so maybe we can have a patch that just moves all the offsets and then add the global mocs on top?
yep, makes sense. I will change that in the next version.
Quoted 9 lines
Quoted 7 lines
From Gen12 onwards, MOCS must specify the target cache (3:2) and LRU management (5:4) fields and cannot be programmed to 'use the value from Private PAT', because these fields are no longer part of the PPAT. Also cacheability control (1:0) field has changed, 00 no longer means 'use controls from page table', but uncacheable (UC).
Should we put this as a comment in the code somewhere? Although I'm not sure we have any use for this info since we copy the table straight from the specs and we should probably trust it is correct.
I don't see a value in the comment exactly because of this reason. I think the one in the commit message is enough.
thanks
Lucas De Marchi
Quoted 212 lines
Daniele
Quoted 209 lines
Cc Daniele Ceraolo Spurio <[email protected]>Cc Tomasz Lis <[email protected]>Signed-off-by Michel Thierry <[email protected]>Signed-off-by Tvrtko Ursulin <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gt/intel_gt.c | 12 ++++-- drivers/gpu/drm/i915/gt/intel_mocs.c | 47 ++++++++++++++++++++++++ drivers/gpu/drm/i915/gt/intel_mocs.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_gpu_error.c | 11 ++++-- drivers/gpu/drm/i915/i915_pci.c | 3 +- drivers/gpu/drm/i915/i915_reg.h | 3 ++ drivers/gpu/drm/i915/intel_device_info.h | 1 + 9 files changed, 74 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/gt/intel_gt.c +9
-3@@ -80,8 +80,11 @@ intel_gt_clear_error_registers(struct intel_gt *gt, }if (INTEL_GEN (i915) >=8 ) { -rmw_clear (uncore,GEN8_RING_FAULT_REG ,RING_FAULT_VALID ); -intel_uncore_posting_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = (INTEL_GEN (i915) >=12 ) ? +GEN12_RING_FAULT_REG : +GEN8_RING_FAULT_REG ; +rmw_clear (uncore, fault_reg,RING_FAULT_VALID ); +intel_uncore_posting_read (uncore, fault_reg); }else if (INTEL_GEN (i915) >=6 ) {struct intel_engine_cs *engine;enum intel_engine_id id;@@ -117,7 +120,10 @@ static void gen6_check_faults(struct intel_gt *gt)static void gen8_check_faults (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore; -u32 fault =intel_uncore_read (uncore,GEN8_RING_FAULT_REG ); +i915_reg_t fault_reg = + (INTEL_GEN (gt->i915) >=12 ) ? +GEN12_RING_FAULT_REG :GEN8_RING_FAULT_REG ; +u32 fault =intel_uncore_read (uncore, fault_reg);if (fault &RING_FAULT_VALID ) {u32 fault_data0, fault_data1;drivers/gpu/drm/i915/gt/intel_mocs.c +47
-0@@ -365,6 +365,10 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine)unsigned int index;u32 unused_value; +/* Platforms with global MOCS do not need per-engine initialization. */ +if (HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +return ; +/* Called under a blanket forcewake */ assert_forcewakes_active (uncore,FORCEWAKE_ALL );@@ -389,6 +393,46 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine) unused_value); } +/** +* intel_mocs_init_global() - program the global mocs registers +* gt: pointer to struct intel_gt +* +* This function initializes the MOCS global registers. +*/ +void intel_mocs_init_global (struct intel_gt *gt) +{ +struct intel_uncore *uncore = gt->uncore; +struct drm_i915_mocs_table table; +unsigned int index; + +if (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +return ; + +if (!get_mocs_settings (gt, &table)) +return ; + +if (GEM_DEBUG_WARN_ON (table.size > table.n_entries)) +return ; + +for (index =0 ; index < table.size; index++) +intel_uncore_write (uncore, +GEN12_GLOBAL_MOCS (index), + table.table[index].control_value); + +/* +* Ok, now set the unused entries to uncached. These entries +* are officially undefined and no contract for the contents +* and settings is given for these entries. +* +* Entry 0 in the table is uncached - so we are just writing +* that value to all the used entries. +*/ +for (; index < table.n_entries; index++) +intel_uncore_write (uncore, +GEN12_GLOBAL_MOCS (index), + table.table[0 ].control_value); +} +/** * emit_mocs_control_table() - emit the mocs control table * @rq: Request to set up the MOCS table for. @@ -592,6 +636,9 @@ int intel_rcs_context_init_mocs(struct i915_request *rq)struct drm_i915_mocs_table t;int ret; +if (HAS_GLOBAL_MOCS_REGISTERS (rq->i915)) +return 0 ; +if (get_mocs_settings (rq->engine->gt, &t)) {/* Program the RCS control registers */ ret =emit_mocs_control_table (rq, &t);drivers/gpu/drm/i915/gt/intel_mocs.h +1
-0@@ -56,6 +56,7 @@ struct intel_gt;int intel_rcs_context_init_mocs (struct i915_request *rq);void intel_mocs_init_l3cc_table (struct intel_gt *gt); +void intel_mocs_init_global (struct intel_gt *gt);void intel_mocs_init_engine (struct intel_engine_cs *engine);#endif drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -2308,6 +2308,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define HAS_POOLED_EU (dev_priv) (INTEL_INFO(dev_priv)->has_pooled_eu) +#define HAS_GLOBAL_MOCS_REGISTERS (dev_priv) (INTEL_INFO(dev_priv)->has_global_mocs) +#define INTEL_PCH_DEVICE_ID_MASK 0xff80#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00drivers/gpu/drm/i915/i915_gem.c +1
-0@@ -1254,6 +1254,7 @@ int i915_gem_init_hw(struct drm_i915_private *i915) goto out; } +intel_mocs_init_global (gt);intel_mocs_init_l3cc_table (gt);intel_engines_set_scheduler_caps (i915);drivers/gpu/drm/i915/i915_gpu_error.c +8
-3@@ -1153,7 +1153,10 @@ static void error_record_engine_registers(struct i915_gpu_state *error,if (INTEL_GEN (dev_priv) >=6 ) { ee->rc_psmi =ENGINE_READ (engine,RING_PSMI_CTL ); -if (INTEL_GEN (dev_priv) >=8 ) + +if (INTEL_GEN (dev_priv) >=12 ) + ee->fault_reg =I915_READ (GEN12_RING_FAULT_REG ); +else if (INTEL_GEN (dev_priv) >=8 ) ee->fault_reg =I915_READ (GEN8_RING_FAULT_REG );else ee->fault_reg =GEN6_RING_FAULT_REG_READ (engine);@@ -1613,8 +1616,10 @@ static void capture_reg_state(struct i915_gpu_state *error)if (INTEL_GEN (i915) >=6 ) { error->derrmr =intel_uncore_read (uncore,DERRMR ); - error->error =intel_uncore_read (uncore,ERROR_GEN6 ); - error->done_reg =intel_uncore_read (uncore,DONE_REG ); +if (INTEL_GEN (i915) <12 ) { + error->error =intel_uncore_read (uncore,ERROR_GEN6 ); + error->done_reg =intel_uncore_read (uncore,DONE_REG ); + } }if (INTEL_GEN (i915) >=5 )drivers/gpu/drm/i915/i915_pci.c +2
-1@@ -783,7 +783,8 @@ static const struct intel_device_info intel_elkhartlake_info = { [TRANSCODER_D] = TRANSCODER_D_OFFSET, \ [TRANSCODER_DSI_0] = TRANSCODER_DSI0_OFFSET, \ [TRANSCODER_DSI_1 ] =TRANSCODER_DSI1_OFFSET , \ - } + }, \ + .has_global_mocs = 1static const struct intel_device_info intel_tigerlake_12_info = {GEN12_FEATURES ,drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -2490,6 +2490,7 @@ enum i915_power_well_id {#define RENDER_HWS_PGA_GEN7 _MMIO(0x04080)#define RING_FAULT_REG (engine) _MMIO(0x4094 + 0x100 * (engine)->hw_id)#define GEN8_RING_FAULT_REG _MMIO(0x4094) +#define GEN12_RING_FAULT_REG _MMIO(0xcec4)#define GEN8_RING_FAULT_ENGINE_ID (x) (((x) >> 12) & 0x7)#define RING_FAULT_GTTSEL_MASK (1 << 11)#define RING_FAULT_SRCID (x) (((x) >> 3) & 0xff)@@ -11362,6 +11363,8 @@ enum skl_power_gate {#define PMFLUSH_GAPL3UNBLOCK (1 << 21)#define PMFLUSHDONE_LNEBLK (1 << 22) +#define GEN12_GLOBAL_MOCS (i) _MMIO(0x4000 + (i) * 4)/* Global MOCS regs */ +/* gamt regs */ #define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)#define GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW 0x67F1427F/* max/min for LRA1/2 */ drivers/gpu/drm/i915/intel_device_info.h +0
-0@@ -112,6 +112,7 @@ enum intel_ppgtt_type {
Quoted 8 lines
drivers/gpu/drm/i915/intel_device_info.h enum intel_ppgtt_type { · line 118
Quoted 8 lines
drivers/gpu/drm/i915/intel_device_info.h +1
-0func (gpu_reset_clobbers_display); \func (has_reset_engine); \func (has_fpga_dbg); \ +func (has_global_mocs); \func (has_guc); \func (has_l3_dpf); \func (has_llc); \
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 20/22 drm/i915: Move MOCS setup to intel_mocs.c
In reply to Lucas De MarchiFrom: Tvrtko Ursulin <[email protected]>
Hide the details of MOCS setup from i915_gem by moving both current calls into one in intel_mocs_init.
--- drivers/gpu/drm/i915/gt/intel_mocs.c | 15 +++++++++++---- drivers/gpu/drm/i915/gt/intel_mocs.h | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 3 +-- 3 files changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/gt/intel_mocs.c +11 -4
@@ -399,14 +399,13 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine)* * This function initializes the MOCS global registers. */ -void intel_mocs_init_global (struct intel_gt *gt) +static void intel_mocs_init_global (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore;struct drm_i915_mocs_table table;unsigned int index; -if (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) -return ; +GEM_BUG_ON (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915));if (!get_mocs_settings (gt, &table))return ;
@@ -575,7 +574,7 @@ static int emit_mocs_l3cc_table(struct i915_request *rq,* * Return: Nothing. */ -void intel_mocs_init_l3cc_table (struct intel_gt *gt) +static void intel_mocs_init_l3cc_table (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore;struct drm_i915_mocs_table table;
@@ -653,3 +652,11 @@ int intel_rcs_context_init_mocs(struct i915_request *rq)return 0 ; } + +void intel_mocs_init (struct intel_gt *gt) +{ +intel_mocs_init_l3cc_table (gt); + +if (HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +intel_mocs_init_global (gt); +}
drivers/gpu/drm/i915/gt/intel_mocs.h +1 -2
@@ -55,8 +55,7 @@ struct intel_engine_cs;struct intel_gt ;int intel_rcs_context_init_mocs (struct i915_request *rq); -void intel_mocs_init_l3cc_table (struct intel_gt *gt); -void intel_mocs_init_global (struct intel_gt *gt); +void intel_mocs_init (struct intel_gt *gt);void intel_mocs_init_engine (struct intel_engine_cs *engine);#endif
drivers/gpu/drm/i915/i915_gem.c +1 -2
@@ -1254,8 +1254,7 @@ int i915_gem_init_hw(struct drm_i915_private *i915) goto out; } -intel_mocs_init_global (gt); -intel_mocs_init_l3cc_table (gt); +intel_mocs_init (gt);intel_engines_set_scheduler_caps (i915);
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 20/22] drm/i915: Move MOCS setup to intel_mocs.c
Quoted 9 lines · Lucas De Marchi
From: Tvrtko Ursulin <[email protected]>
Hide the details of MOCS setup from
i915_gemby moving both current calls
into one inintel_mocs_init.Cc Stuart Summers <[email protected]>Signed-off-by Tvrtko Ursulin <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>
Quoted 74 lines
--- drivers/gpu/drm/i915/gt/intel_mocs.c | 15 +++++++++++---- drivers/gpu/drm/i915/gt/intel_mocs.h | 3 +-- drivers/gpu/drm/i915/i915_gem.c | 3 +-- 3 files changed, 13 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/gt/intel_mocs.c +2
-3@@ -399,14 +399,13 @@ void intel_mocs_init_engine(structintel_engine_cs *engine) * * This function initializes the MOCS global registers. */ -void intel_mocs_init_global (struct intel_gt *gt) +static void intel_mocs_init_global (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore;struct drm_i915_mocs_table table;unsigned int index; -if (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) -return ; +GEM_BUG_ON (!HAS_GLOBAL_MOCS_REGISTERS (gt->i915));if (!get_mocs_settings (gt, &table))drivers/gpu/drm/i915/gt/intel_mocs.c +1
-1return ;@@ -575,7 +574,7 @@ static int emit_mocs_l3cc_table(structi915_request *rq, * * Return: Nothing. */ -void intel_mocs_init_l3cc_table (struct intel_gt *gt) +static void intel_mocs_init_l3cc_table (struct intel_gt *gt) {struct intel_uncore *uncore = gt->uncore;drivers/gpu/drm/i915/gt/intel_mocs.c +8
-0struct drm_i915_mocs_table table;@@ -653,3 +652,11 @@ int intel_rcs_context_init_mocs(struct i915_request *rq)return 0 ; } + +void intel_mocs_init (struct intel_gt *gt) +{ +intel_mocs_init_l3cc_table (gt); + +if (HAS_GLOBAL_MOCS_REGISTERS (gt->i915)) +intel_mocs_init_global (gt); +}drivers/gpu/drm/i915/gt/intel_mocs.h +1
-2@@ -55,8 +55,7 @@ struct intel_engine_cs;struct intel_gt ;int intel_rcs_context_init_mocs (struct i915_request *rq); -void intel_mocs_init_l3cc_table (struct intel_gt *gt); -void intel_mocs_init_global (struct intel_gt *gt); +void intel_mocs_init (struct intel_gt *gt);void intel_mocs_init_engine (struct intel_engine_cs *engine);#endif drivers/gpu/drm/i915/i915_gem.c +0
-0
drivers/gpu/drm/i915/i915_gem.c int i915_gem_init_hw(struct drm_i915_private · line 1260
Quoted 9 lines
drivers/gpu/drm/i915/i915_gem.c +1
-2@@ -1254,8 +1254,7 @@ int i915_gem_init_hw(struct drm_i915_private *i915) goto out; } -intel_mocs_init_global (gt); -intel_mocs_init_l3cc_table (gt); +intel_mocs_init (gt);intel_engines_set_scheduler_caps (i915);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 21/22 drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
In reply to Lucas De MarchiFrom: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
--- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +13 -8
@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))return -ENODEV ;
@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); -if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) { + dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg =IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : +SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } -seq_printf (m,"DC3 -> DC5 count: %d\n" , -I915_READ (IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : -SKL_CSR_DC3_DC5_COUNT )); -if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) +seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (dc6_reg)); out:seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 )));
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
Quoted 56 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +13
-8@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))return -ENODEV ;@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); -if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) { + dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg =IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : +SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } -seq_printf (m,"DC3 -> DC5 count: %d\n" , -I915_READ (IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : -SKL_CSR_DC3_DC5_COUNT )); -if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) +seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (dc6_reg)); out:seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 )));drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 7273
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)
CSR memory ranges from 0x80000 till 0x8ffff These DMC_DEBUG regisers are not are not CSR register. It would make sense to rename the macro.
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
Quoted 5 lines · Anshuman Gupta
Quoted 4 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
nit: Tiger Lake
Quoted 83 lines
Quoted 63 lines
Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))drivers/gpu/drm/i915/i915_debugfs.c +5
-2return -ENODEV ;@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr- >version),CSR_VERSION_MINOR (csr->version)); -if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) { + dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg = IS_BROXTON(dev_priv) ? BXT_CSR_DC3_DC5_COUNT:
drivers/gpu/drm/i915/i915_debugfs.c +4
-2+SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } - seq_printf(m, "DC3 -> DC5 count: %d\n", - I915_READ(IS_BROXTON(dev_priv) ?
BXT_CSR_DC3_DC5_COUNT:drivers/gpu/drm/i915/i915_debugfs.c +0
-1-SKL_CSR_DC3_DC5_COU NT));
drivers/gpu/drm/i915/i915_debugfs.c +3
-3-if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) + seq_printf(m, "DC5 -> DC6 count: %d\n",
I915_READ(dc6_reg));out:
seq_printf(m, "program base: 0x%08x\n",
I915_READ(CSR_PROGRAM(0)));drivers/gpu/drm/i915/i915_reg.h +0
-0drivers/gpu/drm/i915/i915_reg.h enum { · line 7273
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)CSR memory ranges from
0x80000till0x8ffffTheseDMC_DEBUGregisers are not are not CSR register. It would make sense to rename the macro.Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31)Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
In reply to Anshuman GuptaQuoted 50 lines · Anshuman Gupta
Quoted 49 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++-------- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +13
-8@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))return -ENODEV ;@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version)); -if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) { + dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg =IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : +SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } -seq_printf (m,"DC3 -> DC5 count: %d\n" , -I915_READ (IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : -SKL_CSR_DC3_DC5_COUNT )); -if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) +seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (dc6_reg));
Quoted 15 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 7273
Quoted 12 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-0out:seq_printf (m,"program base: 0x%08x\n" ,I915_READ (CSR_PROGRAM (0 )));drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)CSR memory ranges from
0x80000till0x8ffffTheseDMC_DEBUGregisers are not are not CSR register. It would make sense to rename the macro.
True.
TGL_DMC_DEBUG_DC5_COUNT and TGL_DMC_DEBUG_DC6_COUNT sounds good?
Lucas De Marchi
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +0
-1/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31) --2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
Quoted 29 lines · Lucas De Marchi
Quoted 28 lines · Anshuman Gupta
Quoted 27 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c| 21 +++++++++++++--------drivers/gpu/drm/i915/i915_reg.h| 2 ++2 files changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))return -ENODEV ;@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version));
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_dmc_info(struct seq_file *m, void *unused) · line 2486
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-2-if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) {
Below DMC debug registers offsets are specific to TGL, So it would make sense to add IS_TIGERLAKE condition?
Quoted 35 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/i915/i915_debugfs.c +11
-6+ dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg =IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : +SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } -seq_printf (m,"DC3 -> DC5 count: %d\n" , -I915_READ (IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : -SKL_CSR_DC3_DC5_COUNT )); -if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) +seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (dc6_reg));Quoted 15 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 7273
Quoted 12 lines
out:
seq_printf(m, "program base: 0x%08x\n", I915_READ(CSR_PROGRAM(0)));drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)CSR memory ranges from
0x80000till0x8ffffTheseDMC_DEBUGregisers are not are not CSR register. It would make sense to rename the macro.
Quoted 3 lines
True.
TGL_DMC_DEBUG_DC5_COUNTandTGL_DMC_DEBUG_DC6_COUNTsounds good?
yes!
Quoted 13 lines
Lucas De Marchi
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +0
-1/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31) --2.21.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 21/22] drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers
Quoted 30 lines · Anshuman Gupta
Quoted 29 lines · Lucas De Marchi
Quoted 28 lines · Anshuman Gupta
Quoted 27 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lask has a new register offset for DC5 and DC6 residency counters.
Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c| 21 +++++++++++++--------drivers/gpu/drm/i915/i915_reg.h| 2 ++2 files changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +1
-0@@ -2465,6 +2465,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)struct drm_i915_private *dev_priv =node_to_i915 (m->private);intel_wakeref_t wakeref;struct intel_csr *csr; +i915_reg_t dc5_reg, dc6_reg = {};if (!HAS_CSR (dev_priv))return -ENODEV ;@@ -2482,15 +2483,19 @@ static int i915_dmc_info(struct seq_file *m, void *unused)seq_printf (m,"version: %d.%d\n" ,CSR_VERSION_MAJOR (csr->version),CSR_VERSION_MINOR (csr->version));
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_dmc_info(struct seq_file *m, void *unused) · line 2486
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-2-if (WARN_ON (INTEL_GEN (dev_priv) >11 )) - goto out; +if (INTEL_GEN (dev_priv) >=12 ) {Below DMC debug registers offsets are specific to TGL, So it would make sense to add
IS_TIGERLAKEcondition?
I think we can leave it with gen >= 12 and change it when/if the next platform change that.
Quoted 35 lines
Quoted 35 lines
Quoted 34 lines
Quoted 26 lines
drivers/gpu/drm/i915/i915_debugfs.c +11
-6+ dc5_reg =TGL_CSR_DC5_RES_COUNT ; + dc6_reg =TGL_CSR_DC6_RES_COUNT ; + }else { + dc5_reg =IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : +SKL_CSR_DC3_DC5_COUNT ; +if (!IS_GEN9_LP (dev_priv)) + dc6_reg =SKL_CSR_DC5_DC6_COUNT ; + } -seq_printf (m,"DC3 -> DC5 count: %d\n" , -I915_READ (IS_BROXTON (dev_priv) ?BXT_CSR_DC3_DC5_COUNT : -SKL_CSR_DC3_DC5_COUNT )); -if (!IS_GEN9_LP (dev_priv)) -seq_printf (m,"DC5 -> DC6 count: %d\n" , -I915_READ (SKL_CSR_DC5_DC6_COUNT )); +seq_printf (m,"DC3 -> DC5 count: %d\n" ,I915_READ (dc5_reg)); +if (dc6_reg.reg) +seq_printf (m,"DC5 -> DC6 count: %d\n" ,I915_READ (dc6_reg));out:
seq_printf(m, "program base: 0x%08x\n", I915_READ(CSR_PROGRAM(0)));drivers/gpu/drm/i915/i915_reg.h +0
-0drivers/gpu/drm/i915/i915_reg.h enum { · line 7273
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7269,6 +7269,8 @@ enum {#define SKL_CSR_DC3_DC5_COUNT _MMIO(0x80030)#define SKL_CSR_DC5_DC6_COUNT _MMIO(0x8002C)#define BXT_CSR_DC3_DC5_COUNT _MMIO(0x80038) +#define TGL_CSR_DC5_RES_COUNT _MMIO(0x101084) +#define TGL_CSR_DC6_RES_COUNT _MMIO(0x101088)CSR memory ranges from
0x80000till0x8ffffTheseDMC_DEBUGregisers are not are not CSR register. It would make sense to rename the macro.
Quoted 4 lines
Quoted 3 lines
True.
TGL_DMC_DEBUG_DC5_COUNTandTGL_DMC_DEBUG_DC6_COUNTsounds good?yes!
thanks, I'll send an updated version.
Lucas De Marchi
Quoted 9 lines
Quoted 9 lines
Lucas De Marchi
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +0
-1/* interrupts */ #define DE_MASTER_IRQ_CONTROL (1 << 31) --2.21.0
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 22/22 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
In reply to Lucas De MarchiFrom: José Roberto de Souza <[email protected]>
Tiger Lake has up to 4 pipes so the mask would need to be 0xf instead of 0x7. Do not hardcode the mask so it allows the fake MST encoders to connect to all pipes no matter how many the platform has.
Iterating over all pipes to keep consistent with intel_ddi_init().
--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +4 -1
@@ -586,6 +586,8 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enumstruct intel_dp_mst_encoder *intel_mst;struct intel_encoder *intel_encoder;struct drm_device *dev = intel_dig_port->base.base.dev; +struct drm_i915_private *dev_priv =to_i915 (dev); +enum pipe pipe_iter; intel_mst =kzalloc (sizeof (*intel_mst),GFP_KERNEL );
@@ -602,8 +604,9 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum intel_encoder->type =INTEL_OUTPUT_DP_MST ; intel_encoder->power_domain = intel_dig_port->base.power_domain; intel_encoder->port = intel_dig_port->base.port; - intel_encoder->crtc_mask =0x7 ; intel_encoder->cloneable =0 ; +for_each_pipe (dev_priv, pipe_iter) + intel_encoder->crtc_mask |=BIT (pipe_iter); intel_encoder->compute_config = intel_dp_mst_compute_config; intel_encoder->disable = intel_mst_disable_dp;
Signature · 6 lines
2.21.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 22/22] drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
Quoted 30 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lake has up to 4 pipes so the mask would need to be
0xfinstead of0x7. Do not hardcode the mask so it allows the fake MST encoders to connect to all pipes no matter how many the platform has.Iterating over all pipes to keep consistent with
intel_ddi_init().Cc Lucas De Marchi <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-0@@ -586,6 +586,8 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enumstruct intel_dp_mst_encoder *intel_mst;struct intel_encoder *intel_encoder;struct drm_device *dev = intel_dig_port->base.base.dev; +struct drm_i915_private *dev_priv =to_i915 (dev); +enum pipe pipe_iter; intel_mst =kzalloc (sizeof (*intel_mst),GFP_KERNEL );
drivers/gpu/drm/i915/display/intel_dp_mst.c intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum · line 609
Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-1@@ -602,8 +604,9 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum intel_encoder->type =INTEL_OUTPUT_DP_MST ; intel_encoder->power_domain = intel_dig_port->base.power_domain; intel_encoder->port = intel_dig_port->base.port; - intel_encoder->crtc_mask =0x7 ; intel_encoder->cloneable =0 ; +for_each_pipe (dev_priv, pipe_iter) + intel_encoder->crtc_mask |=BIT (pipe_iter);
https://patchwork.freedesktop.org/patch/316555/?series=63399&rev=1
Quoted 5 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0intel_encoder->compute_config = intel_dp_mst_compute_config; intel_encoder->disable = intel_mst_disable_dp;Signature · 1 line
2.21.0
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 22/22] drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
Quoted 30 lines · Ville Syrjälä
Quoted 29 lines · Lucas De Marchi
From: José Roberto de Souza <[email protected]>
Tiger Lake has up to 4 pipes so the mask would need to be
0xfinstead of0x7. Do not hardcode the mask so it allows the fake MST encoders to connect to all pipes no matter how many the platform has.Iterating over all pipes to keep consistent with
intel_ddi_init().Cc Lucas De Marchi <[email protected]>Cc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-0@@ -586,6 +586,8 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enumstruct intel_dp_mst_encoder *intel_mst;struct intel_encoder *intel_encoder;struct drm_device *dev = intel_dig_port->base.base.dev; +struct drm_i915_private *dev_priv =to_i915 (dev); +enum pipe pipe_iter; intel_mst =kzalloc (sizeof (*intel_mst),GFP_KERNEL );
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum · line 609
Quoted 8 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +2
-1@@ -602,8 +604,9 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum intel_encoder->type =INTEL_OUTPUT_DP_MST ; intel_encoder->power_domain = intel_dig_port->base.power_domain; intel_encoder->port = intel_dig_port->base.port; - intel_encoder->crtc_mask =0x7 ; intel_encoder->cloneable =0 ; +for_each_pipe (dev_priv, pipe_iter) + intel_encoder->crtc_mask |=BIT (pipe_iter);https://patchwork.freedesktop.org/patch/316555/?series=63399&rev=1
Would it make sense to bring this patch in for now for TGL MST, until that larger series can land?
-James
Quoted 14 lines
Quoted 6 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +0
-0intel_encoder->compute_config = intel_dp_mst_compute_config; intel_encoder->disable = intel_mst_disable_dp;Signature · 1 line
2.21.0Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Tiger Lake part 2
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2
URL : https://patchwork.freedesktop.org/series/63670/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 4f24138130a1 drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization 05104c3c0561 drm/i915/tgl: select correct bit for port select e617f60b4405 drm/i915/tgl: update ddi/tc clock_off bits -:24: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'tc_port' - possible side-effects? #24: FILE: drivers/gpu/drm/i915/i915_reg.h:9752: +#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF(tc_port) (1 << ((tc_port) < PORT_TC4 ? \ + (tc_port) + 12 : \ + (tc_port) - PORT_TC4 + 21))
total: 0 errors, 0 warnings, 1 checks, 11 lines checked57a1c831349d drm/i915/tgl: Add hpd interrupt handlingf2dae71692e9 drm/i915/tgl: Update north display hotplug detection to TGL connections 53ccf63d0767 drm/i915/tgl: handle DP aux interrupts09bbb93143b0 drm/i915/dmc: Load DMC on TGL68948c4cd8c6 drm/i915/tgl: Add DKL phy pll registerseb6e1fade3e4 drm/i915/tgl: re-indent code to prepare for DKL changes 2ab94df17776 drm/i915/tgl: Add DKL phy pll state calculations 3b65df033d2d drm/i915/tgl: start adding the DKL PLLs to use on TC ports afc14ee9b29d drm/i915/tgl: Add support for dkl pll write75c99ba6ce4d drm/i915/gen12: add support for reading the timestamp frequency 208c82065cfd drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register 86ca705881e4 drm/i915/tgl: Introduce initial Tigerlake Workarounds 4a3b203f6670 drm/i915/tgl: Implement Wa_1604555607b7e6d7545812 drm/i915/tgl: Implement Wa_1406941453155c1076b200 drm/i915/tgl: Define MOCS entries for Tigerlake f0efc64bb91a drm/i915/tgl: Tigerlake only has global MOCS registers 5bc6743823d3 drm/i915: Move MOCS setup to intel_mocs.c224b62268855 drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers a093f7155e48 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Tiger Lake part 2
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2
URL : https://patchwork.freedesktop.org/series/63670/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6480 -> Patchwork_13653
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/
Known issues
------------
Here are the changes found in Patchwork_13653 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: [PASS][1] -> [DMESG-WARN][2] ([fdo#106387]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/fi-ilk-650/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/fi-ilk-650/igt@[email protected]
#### Possible fixes ####
* {igt@gem_ctx_switch@legacy-render}:
- fi-icl-u3: [INCOMPLETE][3] ([fdo#107713]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/fi-icl-u3/igt@[email protected]
* igt@i915_module_load@reload:
- fi-blb-e6850: [INCOMPLETE][5] ([fdo#107718]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live_contexts:
- fi-skl-iommu: [INCOMPLETE][7] ([fdo#111050]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/fi-skl-iommu/igt@i915_selftest@live_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/fi-skl-iommu/igt@i915_selftest@live_contexts.html
* igt@kms_chamelium@hdmi-edid-read:
- {fi-icl-u4}: [FAIL][9] ([fdo#111045] / [fdo#111046 ]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/fi-icl-u4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/fi-icl-u4/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111046 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111046
[fdo#111050]: https://bugs.freedesktop.org/show_bug.cgi?id=111050
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
Participating hosts (53 -> 45)
------------------------------
Additional (2): fi-apl-guc fi-cml-u
Missing (10): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-y fi-icl-dsi fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6480 -> Patchwork_13653
CI_DRM_6480: a4856ee98f5d0058656d4fd8efb4ffa433bdfaa4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5096: bb4d55a02dd3e1971f2c091a13b6bd7f0b496e40 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13653: a093f7155e489ec00adfe2f0a8fcf4e5776c2586 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a093f7155e48 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect 224b62268855 drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers 5bc6743823d3 drm/i915: Move MOCS setup to intel_mocs.cf0efc64bb91a drm/i915/tgl: Tigerlake only has global MOCS registers 155c1076b200 drm/i915/tgl: Define MOCS entries for Tigerlake b7e6d7545812 drm/i915/tgl: Implement Wa_14069414534a3b203f6670 drm/i915/tgl: Implement Wa_160455560786ca705881e4 drm/i915/tgl: Introduce initial Tigerlake Workarounds 208c82065cfd drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register 75c99ba6ce4d drm/i915/gen12: add support for reading the timestamp frequency afc14ee9b29d drm/i915/tgl: Add support for dkl pll write3b65df033d2d drm/i915/tgl: start adding the DKL PLLs to use on TC ports 2ab94df17776 drm/i915/tgl: Add DKL phy pll state calculations eb6e1fade3e4 drm/i915/tgl: re-indent code to prepare for DKL changes 68948c4cd8c6 drm/i915/tgl: Add DKL phy pll registers09bbb93143b0 drm/i915/dmc: Load DMC on TGL53ccf63d0767 drm/i915/tgl: handle DP aux interruptsf2dae71692e9 drm/i915/tgl: Update north display hotplug detection to TGL connections 57a1c831349d drm/i915/tgl: Add hpd interrupt handlinge617f60b4405 drm/i915/tgl: update ddi/tc clock_off bits05104c3c0561 drm/i915/tgl: select correct bit for port select 4f24138130a1 drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for Tiger Lake part 2
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2
URL : https://patchwork.freedesktop.org/series/63670/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6480_full -> Patchwork_13653_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13653_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_13653_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13653_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_mocs_settings@mocs-isolation-blt:
- shard-iclb: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb1/igt@[email protected]
* igt@gem_mocs_settings@mocs-reset-ctx-render:
- shard-iclb: [PASS][2] -> [FAIL][3] +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb8/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb3/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_13653_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@system-suspend-modeset:
- shard-iclb: [PASS][4] -> [INCOMPLETE][5] ([fdo#107713] / [fdo#108840])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb4/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb4/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: [PASS][6] -> [FAIL][7] ([fdo#105767])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-hsw5/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-hsw1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-skl: [PASS][8] -> [INCOMPLETE][9] ([fdo#109507])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl7/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-kbl: [PASS][10] -> [DMESG-WARN][11] ([fdo#108566]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl2/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl1/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: [PASS][12] -> [FAIL][13] ([fdo#100368])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl4/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt:
- shard-iclb: [PASS][14] -> [FAIL][15] ([fdo#103167]) +3 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-msflip-blt.html
* igt@kms_frontbuffer_tracking@psr-suspend:
- shard-skl: [PASS][16] -> [INCOMPLETE][17] ([fdo#104108] / [fdo#106978])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl10/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][18] -> [FAIL][19] ([fdo#108145] / [fdo#110403])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl1/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl4/igt@[email protected]
* igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
- shard-glk: [PASS][20] -> [DMESG-WARN][21] ([fdo#105763] / [fdo#106538])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-glk2/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-glk5/igt@[email protected]
* igt@kms_psr@psr2_suspend:
- shard-iclb: [PASS][22] -> [SKIP][23] ([fdo#109441]) +1 similar issue
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb2/igt@kms_psr@psr2_suspend.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb7/igt@kms_psr@psr2_suspend.html
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-apl: [PASS][24] -> [DMESG-WARN][25] ([fdo#108566]) +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-apl8/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-apl3/igt@[email protected]
* igt@tools_test@tools_test:
- shard-apl: [PASS][26] -> [SKIP][27] ([fdo#109271])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-apl7/igt@tools_test@tools_test.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-apl3/igt@tools_test@tools_test.html
#### Possible fixes ####
* igt@i915_pm_backlight@fade_with_suspend:
- shard-iclb: [INCOMPLETE][28] ([fdo#107713] / [fdo#107820]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb5/igt@i915_pm_backlight@fade_with_suspend.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb5/igt@i915_pm_backlight@fade_with_suspend.html
* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][30] ([fdo#108566]) -> [PASS][31] +2 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-apl7/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-apl4/igt@[email protected]
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-kbl: [DMESG-WARN][32] ([fdo#103313] / [fdo#103558] / [fdo#105602] / [fdo#110222]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl1/igt@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-alpha-transparent:
- shard-snb: [SKIP][34] ([fdo#109271]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-snb6/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-snb1/igt@[email protected]
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-gtt-ytiled:
- shard-skl: [FAIL][36] ([fdo#103184] / [fdo#103232] / [fdo#108145]) -> [PASS][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl8/igt@[email protected]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl10/igt@[email protected]
* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][38] ([fdo#105363]) -> [PASS][39]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-glk2/igt@[email protected]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-glk5/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [FAIL][40] ([fdo#105363]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl10/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl10/igt@[email protected]
* igt@kms_flip@flip-vs-suspend:
- shard-kbl: [DMESG-WARN][42] ([fdo#103558] / [fdo#105602] / [fdo#108566]) -> [PASS][43]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl1/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][44] ([fdo#103167]) -> [PASS][45] +3 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
* igt@kms_pipe_crc_basic@bad-source:
- shard-kbl: [DMESG-WARN][46] ([fdo#103558] / [fdo#105602]) -> [PASS][47] +11 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl1/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][48] ([fdo#108145]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl5/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl9/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][50] ([fdo#109642] / [fdo#111068]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb7/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb2/igt@[email protected]
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][52] ([fdo#109441]) -> [PASS][53] +1 similar issue
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-iclb7/igt@kms_psr@psr2_no_drrs.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
* igt@perf_pmu@rc6:
- shard-kbl: [SKIP][54] ([fdo#109271]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl7/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@[email protected]
#### Warnings ####
* igt@kms_atomic_transition@4x-modeset-transitions:
- shard-kbl: [SKIP][56] ([fdo#105602] / [fdo#109271] / [fdo#109278]) -> [SKIP][57] ([fdo#109271] / [fdo#109278]) +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl1/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-skl: [FAIL][58] ([fdo#108040]) -> [FAIL][59] ([fdo#103167])
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl10/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render:
- shard-kbl: [SKIP][60] ([fdo#105602] / [fdo#109271]) -> [SKIP][61] ([fdo#109271]) +10 similar issues
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-kbl1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-kbl4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt:
- shard-skl: [FAIL][62] ([fdo#103167]) -> [FAIL][63] ([fdo#108040])
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6480/shard-skl8/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/shard-skl10/igt@[email protected]
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103313]: https://bugs.freedesktop.org/show_bug.cgi?id=103313
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#106538]: https://bugs.freedesktop.org/show_bug.cgi?id=106538
[fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107820]: https://bugs.freedesktop.org/show_bug.cgi?id=107820
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_6480 -> Patchwork_13653
CI_DRM_6480: a4856ee98f5d0058656d4fd8efb4ffa433bdfaa4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5096: bb4d55a02dd3e1971f2c091a13b6bd7f0b496e40 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13653: a093f7155e489ec00adfe2f0a8fcf4e5776c2586 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13653/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Tiger Lake part 2 (rev2)
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2 (rev2)
URL : https://patchwork.freedesktop.org/series/63670/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 1399f5e0e588 drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization 7aeb531f6973 drm/i915/tgl: select correct bit for port select 61df67c27f47 drm/i915/tgl: update ddi/tc clock_off bits -:24: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'tc_port' - possible side-effects? #24: FILE: drivers/gpu/drm/i915/i915_reg.h:9742: +#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF(tc_port) (1 << ((tc_port) < PORT_TC4 ? \ + (tc_port) + 12 : \ + (tc_port) - PORT_TC4 + 21))
total: 0 errors, 0 warnings, 1 checks, 11 lines checked545774fac0b1 drm/i915/tgl: Add hpd interrupt handling89b636156020 drm/i915/tgl: Update north display hotplug detection to TGL connections b77732b3475a drm/i915/tgl: handle DP aux interruptsd79bc42ba14e drm/i915/dmc: Load DMC on TGLeba607ec684f drm/i915/tgl: Add DKL phy pll registersbed7e1bf70ee drm/i915/tgl: re-indent code to prepare for DKL changes fde555890199 drm/i915/tgl: Add DKL phy pll state calculations 21a4942ecadc drm/i915/tgl: start adding the DKL PLLs to use on TC ports cf9e40f919cc drm/i915/tgl: Add support for dkl pll write8839cfd99330 drm/i915/gen12: add support for reading the timestamp frequency 94f4cd6f0993 drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register c961a0a0ef25 drm/i915/tgl: Introduce initial Tigerlake Workarounds e141194e47b0 drm/i915/tgl: Implement Wa_160455560721e1d03a7fc9 drm/i915/tgl: Implement Wa_1406941453622babc7ad99 drm/i915/tgl: Define MOCS entries for Tigerlake bbe66a71b6b7 drm/i915/tgl: Tigerlake only has global MOCS registers 2d16249077a4 drm/i915: Move MOCS setup to intel_mocs.cf844f9561a03 drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers 261c7e151c10 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Tiger Lake part 2 (rev2)
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2 (rev2)
URL : https://patchwork.freedesktop.org/series/63670/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6488 -> Patchwork_13661
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13661:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_selftest@live_hangcheck:
- {fi-icl-u4}: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-icl-u4/igt@i915_selftest@live_hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-icl-u4/igt@i915_selftest@live_hangcheck.html
Known issues
------------
Here are the changes found in Patchwork_13661 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fence@basic-wait-default:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-icl-u3/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][5] -> [INCOMPLETE][6] ([fdo#107718])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live_contexts:
- fi-skl-iommu: [PASS][7] -> [INCOMPLETE][8] ([fdo#111050])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-skl-iommu/igt@i915_selftest@live_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-skl-iommu/igt@i915_selftest@live_contexts.html
#### Possible fixes ####
* igt@gem_ctx_exec@basic:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-icl-u3/igt@[email protected]
* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][11] ([fdo#111108]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-u2: [FAIL][13] ([fdo#109635 ]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-icl-u2/igt@[email protected]
- fi-cml-u2: [FAIL][15] ([fdo#110627]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-cml-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-cml-u2/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: [DMESG-WARN][17] ([fdo#106387]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/fi-ilk-650/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/fi-ilk-650/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#106387]: https://bugs.freedesktop.org/show_bug.cgi?id=106387
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#110627]: https://bugs.freedesktop.org/show_bug.cgi?id=110627
[fdo#111050]: https://bugs.freedesktop.org/show_bug.cgi?id=111050
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
[fdo#111115]: https://bugs.freedesktop.org/show_bug.cgi?id=111115
Participating hosts (54 -> 47)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6488 -> Patchwork_13661
CI_DRM_6488: bbf4d95db6732b16547dc9d849701ccf4189aa0d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5098: 41ff022b62b45a5b84504daa3537fa1b295b97c9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13661: 261c7e151c1048692404d5a3e3e5fc0fdb7a038c @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
261c7e151c10 drm/i915/mst: Do not hardcoded the crtcs that encoder can connect f844f9561a03 drm/i915/tgl: Add and use new DC5 and DC6 residency counter registers 2d16249077a4 drm/i915: Move MOCS setup to intel_mocs.cbbe66a71b6b7 drm/i915/tgl: Tigerlake only has global MOCS registers 622babc7ad99 drm/i915/tgl: Define MOCS entries for Tigerlake 21e1d03a7fc9 drm/i915/tgl: Implement Wa_1406941453e141194e47b0 drm/i915/tgl: Implement Wa_1604555607c961a0a0ef25 drm/i915/tgl: Introduce initial Tigerlake Workarounds 94f4cd6f0993 drm/i915/tgl: allow the reg_read ioctl to read the RCS TIMESTAMP register 8839cfd99330 drm/i915/gen12: add support for reading the timestamp frequency cf9e40f919cc drm/i915/tgl: Add support for dkl pll write21a4942ecadc drm/i915/tgl: start adding the DKL PLLs to use on TC ports fde555890199 drm/i915/tgl: Add DKL phy pll state calculations bed7e1bf70ee drm/i915/tgl: re-indent code to prepare for DKL changes eba607ec684f drm/i915/tgl: Add DKL phy pll registersd79bc42ba14e drm/i915/dmc: Load DMC on TGLb77732b3475a drm/i915/tgl: handle DP aux interrupts89b636156020 drm/i915/tgl: Update north display hotplug detection to TGL connections 545774fac0b1 drm/i915/tgl: Add hpd interrupt handling61df67c27f47 drm/i915/tgl: update ddi/tc clock_off bits7aeb531f6973 drm/i915/tgl: select correct bit for port select 1399f5e0e588 drm/i915/tgl: skip setting PORT_CL_DW12_* on initialization
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for Tiger Lake part 2 (rev2)
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: Tiger Lake part 2 (rev2)
URL : https://patchwork.freedesktop.org/series/63670/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6488_full -> Patchwork_13661_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13661_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_13661_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13661_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_mocs_settings@mocs-reset-ctx-render:
- shard-iclb: [PASS][1] -> [FAIL][2] +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb3/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_13661_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_tiled_swapping@non-threaded:
- shard-iclb: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#108686])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb4/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-apl8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-apl7/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-glk: [PASS][7] -> [FAIL][8] ([fdo#100368])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-glk1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-glk8/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc:
- shard-skl: [PASS][9] -> [FAIL][10] ([fdo#108040])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl5/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-wc.html
* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb4/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [PASS][13] -> [FAIL][14] ([fdo#108145])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl8/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103166])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb1/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb4/igt@[email protected]
* igt@kms_psr@no_drrs:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#108341])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb4/igt@kms_psr@no_drrs.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb1/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb8/igt@kms_psr@psr2_sprite_plane_move.html
#### Possible fixes ####
* igt@gem_eio@in-flight-suspend:
- shard-snb: [DMESG-WARN][21] ([fdo#102365]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-snb5/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-snb6/igt@[email protected]
* igt@i915_pm_backlight@fade_with_suspend:
- shard-skl: [INCOMPLETE][23] ([fdo#104108]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl9/igt@i915_pm_backlight@fade_with_suspend.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl2/igt@i915_pm_backlight@fade_with_suspend.html
* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: [SKIP][25] ([fdo#109271]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-kbl2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-kbl7/igt@[email protected]
* igt@i915_pm_rpm@debugfs-read:
- shard-skl: [INCOMPLETE][27] ([fdo#107807]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl3/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-64x64-offscreen:
- shard-glk: [INCOMPLETE][29] ([fdo#103359] / [k.org#198133]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-glk2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-glk9/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-mmap-wc-untiled:
- shard-skl: [FAIL][31] ([fdo#103184] / [fdo#103232]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl5/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl4/igt@[email protected]
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
- shard-skl: [FAIL][33] ([fdo#103184] / [fdo#103232] / [fdo#108472]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl8/igt@[email protected]
* igt@kms_draw_crc@fill-fb:
- shard-skl: [FAIL][35] ([fdo#103184]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl5/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl4/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [FAIL][37] ([fdo#105363]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl10/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl10/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl: [INCOMPLETE][39] ([fdo#109507]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl5/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: [FAIL][41] ([fdo#100368]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl5/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
- shard-iclb: [FAIL][43] ([fdo#103167]) -> [PASS][44] +4 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb7/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt:
- shard-skl: [FAIL][45] ([fdo#108040]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl8/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render:
- shard-skl: [FAIL][47] ([fdo#103167]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [DMESG-WARN][49] ([fdo#108566]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-apl5/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-apl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][51] ([fdo#108145]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl7/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][53] ([fdo#108145] / [fdo#110403]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-skl6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-skl3/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_gtt:
- shard-iclb: [SKIP][55] ([fdo#109441]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-iclb5/igt@kms_psr@psr2_cursor_mmap_gtt.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_gtt.html
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][57] ([fdo#99912]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6488/shard-kbl7/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/shard-kbl6/igt@[email protected]
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108472]: https://bugs.freedesktop.org/show_bug.cgi?id=108472
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_6488 -> Patchwork_13661
CI_DRM_6488: bbf4d95db6732b16547dc9d849701ccf4189aa0d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5098: 41ff022b62b45a5b84504daa3537fa1b295b97c9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13661: 261c7e151c1048692404d5a3e3e5fc0fdb7a038c @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13661/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx