Skip to content

Commit 9d10cd5

Browse files
committed
Merge tag 'drm-intel-next-2026-01-15' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
Beyond Display: - Make 'guc_hw_reg_state' static as it isn't exported (Ben) - Fix doc build on mei related interface header (Jani) Display related: - Fix ggtt fb alignment on Xe display (Tvrtko) - More display clean-up towards deduplication and full separation (Jani) - Use the consolidated HDMI tables (Suraj) - Account for DSC slice overhead (Ankit) - Prepare GVT for display modularization (Ankit, Jani) - Enable/Disable DC balance along with VRR DSB (Mitul, Ville) - Protection against unsupported modes in LT PHY (Suraj) - Display W/a addition and fixes (Gustavo) - Fix many SPDX identifier comments (Ankit) - Incorporate Xe3_LPD changes for CD2X divider (Gustavo) - Clean up link BW/DSC slice config computation (Imre) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/aWkNThVRSkGAfUVv@intel.com
2 parents 37b812b + d30f75d commit 9d10cd5

95 files changed

Lines changed: 2008 additions & 1434 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/drm/i915/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ i915-$(CONFIG_PERF_EVENTS) += \
7878
i915-y += \
7979
i915_display_pc8.o \
8080
i915_hdcp_gsc.o \
81+
i915_initial_plane.o \
8182
i915_panic.o
8283

8384
# "Graphics Technology" (aka we talk to the gpu)
@@ -288,6 +289,7 @@ i915-y += \
288289
display/intel_hotplug.o \
289290
display/intel_hotplug_irq.o \
290291
display/intel_hti.o \
292+
display/intel_initial_plane.o \
291293
display/intel_link_bw.o \
292294
display/intel_load_detect.o \
293295
display/intel_lpe_audio.o \
@@ -300,7 +302,6 @@ i915-y += \
300302
display/intel_pch_display.o \
301303
display/intel_pch_refclk.o \
302304
display/intel_plane.o \
303-
display/intel_plane_initial.o \
304305
display/intel_pmdemand.o \
305306
display/intel_psr.o \
306307
display/intel_quirks.o \
@@ -381,6 +382,9 @@ i915-y += \
381382
i915-$(CONFIG_DRM_I915_DP_TUNNEL) += \
382383
display/intel_dp_tunnel.o
383384

385+
i915-$(CONFIG_DRM_I915_GVT) += \
386+
display/intel_gvt_api.o
387+
384388
i915-y += \
385389
i915_perf.o
386390

drivers/gpu/drm/i915/display/i9xx_wm.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include <drm/drm_print.h>
99

10-
#include "i915_drv.h"
1110
#include "i915_reg.h"
1211
#include "i9xx_wm.h"
1312
#include "i9xx_wm_regs.h"
@@ -17,6 +16,7 @@
1716
#include "intel_display.h"
1817
#include "intel_display_regs.h"
1918
#include "intel_display_trace.h"
19+
#include "intel_display_utils.h"
2020
#include "intel_dram.h"
2121
#include "intel_fb.h"
2222
#include "intel_mchbar_regs.h"
@@ -1863,8 +1863,7 @@ static void vlv_atomic_update_fifo(struct intel_atomic_state *state,
18631863
struct intel_crtc *crtc)
18641864
{
18651865
struct intel_display *display = to_intel_display(crtc);
1866-
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
1867-
struct intel_uncore *uncore = &dev_priv->uncore;
1866+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
18681867
const struct intel_crtc_state *crtc_state =
18691868
intel_atomic_get_new_crtc_state(state, crtc);
18701869
const struct vlv_fifo_state *fifo_state =
@@ -2743,12 +2742,12 @@ static void ilk_compute_wm_level(struct intel_display *display,
27432742

27442743
static void hsw_read_wm_latency(struct intel_display *display, u16 wm[])
27452744
{
2746-
struct drm_i915_private *i915 = to_i915(display->drm);
2745+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
27472746
u64 sskpd;
27482747

27492748
display->wm.num_levels = 5;
27502749

2751-
sskpd = intel_uncore_read64(&i915->uncore, MCH_SSKPD);
2750+
sskpd = intel_uncore_read64(uncore, MCH_SSKPD);
27522751

27532752
wm[0] = REG_FIELD_GET64(SSKPD_NEW_WM0_MASK_HSW, sskpd);
27542753
if (wm[0] == 0)
@@ -2761,12 +2760,12 @@ static void hsw_read_wm_latency(struct intel_display *display, u16 wm[])
27612760

27622761
static void snb_read_wm_latency(struct intel_display *display, u16 wm[])
27632762
{
2764-
struct drm_i915_private *i915 = to_i915(display->drm);
2763+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
27652764
u32 sskpd;
27662765

27672766
display->wm.num_levels = 4;
27682767

2769-
sskpd = intel_uncore_read(&i915->uncore, MCH_SSKPD);
2768+
sskpd = intel_uncore_read(uncore, MCH_SSKPD);
27702769

27712770
wm[0] = REG_FIELD_GET(SSKPD_WM0_MASK_SNB, sskpd);
27722771
wm[1] = REG_FIELD_GET(SSKPD_WM1_MASK_SNB, sskpd);
@@ -2776,12 +2775,12 @@ static void snb_read_wm_latency(struct intel_display *display, u16 wm[])
27762775

27772776
static void ilk_read_wm_latency(struct intel_display *display, u16 wm[])
27782777
{
2779-
struct drm_i915_private *i915 = to_i915(display->drm);
2778+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
27802779
u32 mltr;
27812780

27822781
display->wm.num_levels = 3;
27832782

2784-
mltr = intel_uncore_read(&i915->uncore, MLTR_ILK);
2783+
mltr = intel_uncore_read(uncore, MLTR_ILK);
27852784

27862785
/* ILK primary LP0 latency is 700 ns */
27872786
wm[0] = 7;

drivers/gpu/drm/i915/display/intel_alpm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* SPDX-License-Identifier: MIT
2-
*
1+
/* SPDX-License-Identifier: MIT */
2+
/*
33
* Copyright © 2024 Intel Corporation
44
*/
55

drivers/gpu/drm/i915/display/intel_bw.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <drm/drm_atomic_state_helper.h>
77
#include <drm/drm_print.h>
88

9-
#include "i915_drv.h"
109
#include "i915_reg.h"
1110
#include "intel_bw.h"
1211
#include "intel_crtc.h"
@@ -75,30 +74,30 @@ static int dg1_mchbar_read_qgv_point_info(struct intel_display *display,
7574
struct intel_qgv_point *sp,
7675
int point)
7776
{
78-
struct drm_i915_private *i915 = to_i915(display->drm);
77+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
7978
u32 dclk_ratio, dclk_reference;
8079
u32 val;
8180

82-
val = intel_uncore_read(&i915->uncore, SA_PERF_STATUS_0_0_0_MCHBAR_PC);
81+
val = intel_uncore_read(uncore, SA_PERF_STATUS_0_0_0_MCHBAR_PC);
8382
dclk_ratio = REG_FIELD_GET(DG1_QCLK_RATIO_MASK, val);
8483
if (val & DG1_QCLK_REFERENCE)
8584
dclk_reference = 6; /* 6 * 16.666 MHz = 100 MHz */
8685
else
8786
dclk_reference = 8; /* 8 * 16.666 MHz = 133 MHz */
8887
sp->dclk = DIV_ROUND_UP((16667 * dclk_ratio * dclk_reference) + 500, 1000);
8988

90-
val = intel_uncore_read(&i915->uncore, SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU);
89+
val = intel_uncore_read(uncore, SKL_MC_BIOS_DATA_0_0_0_MCHBAR_PCU);
9190
if (val & DG1_GEAR_TYPE)
9291
sp->dclk *= 2;
9392

9493
if (sp->dclk == 0)
9594
return -EINVAL;
9695

97-
val = intel_uncore_read(&i915->uncore, MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR);
96+
val = intel_uncore_read(uncore, MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR);
9897
sp->t_rp = REG_FIELD_GET(DG1_DRAM_T_RP_MASK, val);
9998
sp->t_rdpre = REG_FIELD_GET(DG1_DRAM_T_RDPRE_MASK, val);
10099

101-
val = intel_uncore_read(&i915->uncore, MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR_HIGH);
100+
val = intel_uncore_read(uncore, MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR_HIGH);
102101
sp->t_rcd = REG_FIELD_GET(DG1_DRAM_T_RCD_MASK, val);
103102
sp->t_ras = REG_FIELD_GET(DG1_DRAM_T_RAS_MASK, val);
104103

@@ -212,14 +211,12 @@ static int icl_pcode_restrict_qgv_points(struct intel_display *display,
212211
static int mtl_read_qgv_point_info(struct intel_display *display,
213212
struct intel_qgv_point *sp, int point)
214213
{
215-
struct drm_i915_private *i915 = to_i915(display->drm);
214+
struct intel_uncore *uncore = to_intel_uncore(display->drm);
216215
u32 val, val2;
217216
u16 dclk;
218217

219-
val = intel_uncore_read(&i915->uncore,
220-
MTL_MEM_SS_INFO_QGV_POINT_LOW(point));
221-
val2 = intel_uncore_read(&i915->uncore,
222-
MTL_MEM_SS_INFO_QGV_POINT_HIGH(point));
218+
val = intel_uncore_read(uncore, MTL_MEM_SS_INFO_QGV_POINT_LOW(point));
219+
val2 = intel_uncore_read(uncore, MTL_MEM_SS_INFO_QGV_POINT_HIGH(point));
223220
dclk = REG_FIELD_GET(MTL_DCLK_MASK, val);
224221
sp->dclk = DIV_ROUND_CLOSEST(16667 * dclk, 1000);
225222
sp->t_rp = REG_FIELD_GET(MTL_TRP_MASK, val);

drivers/gpu/drm/i915/display/intel_cdclk.c

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include "intel_display_regs.h"
4040
#include "intel_display_types.h"
4141
#include "intel_display_utils.h"
42+
#include "intel_display_wa.h"
4243
#include "intel_dram.h"
4344
#include "intel_mchbar_regs.h"
4445
#include "intel_pci_config.h"
@@ -1858,6 +1859,20 @@ static void bxt_de_pll_enable(struct intel_display *display, int vco)
18581859

18591860
static void icl_cdclk_pll_disable(struct intel_display *display)
18601861
{
1862+
/*
1863+
* Wa_13012396614:
1864+
* Fixes: A sporadic race condition between MDCLK selection and PLL
1865+
* enabling.
1866+
* Workaround:
1867+
* Change programming of MDCLK source selection in CDCLK_CTL:
1868+
* - When disabling the CDCLK PLL, first set MDCLK source to be CD2XCLK.
1869+
* - When enabling the CDCLK PLL, update MDCLK source selection only
1870+
* after the PLL is enabled (which is already done as part of the
1871+
* normal flow of _bxt_set_cdclk()).
1872+
*/
1873+
if (intel_display_wa(display, 13012396614))
1874+
intel_de_rmw(display, CDCLK_CTL, MDCLK_SOURCE_SEL_MASK, MDCLK_SOURCE_SEL_CD2XCLK);
1875+
18611876
intel_de_rmw(display, BXT_DE_PLL_ENABLE,
18621877
BXT_DE_PLL_PLL_ENABLE, 0);
18631878

@@ -1933,6 +1948,8 @@ static u32 bxt_cdclk_cd2x_pipe(struct intel_display *display, enum pipe pipe)
19331948
static u32 bxt_cdclk_cd2x_div_sel(struct intel_display *display,
19341949
int cdclk, int vco, u16 waveform)
19351950
{
1951+
u32 ret;
1952+
19361953
/* cdclk = vco / 2 / div{1,1.5,2,4} */
19371954
switch (cdclk_divider(cdclk, vco, waveform)) {
19381955
default:
@@ -1941,14 +1958,27 @@ static u32 bxt_cdclk_cd2x_div_sel(struct intel_display *display,
19411958
drm_WARN_ON(display->drm, vco != 0);
19421959
fallthrough;
19431960
case 2:
1944-
return BXT_CDCLK_CD2X_DIV_SEL_1;
1961+
ret = BXT_CDCLK_CD2X_DIV_SEL_1;
1962+
break;
19451963
case 3:
1946-
return BXT_CDCLK_CD2X_DIV_SEL_1_5;
1964+
ret = BXT_CDCLK_CD2X_DIV_SEL_1_5;
1965+
break;
19471966
case 4:
1948-
return BXT_CDCLK_CD2X_DIV_SEL_2;
1967+
ret = BXT_CDCLK_CD2X_DIV_SEL_2;
1968+
break;
19491969
case 8:
1950-
return BXT_CDCLK_CD2X_DIV_SEL_4;
1970+
ret = BXT_CDCLK_CD2X_DIV_SEL_4;
1971+
break;
19511972
}
1973+
1974+
/*
1975+
* On Xe3_LPD onward, the expectation is to always have
1976+
* BXT_CDCLK_CD2X_DIV_SEL_1 as the default.
1977+
*/
1978+
if (DISPLAY_VER(display) >= 30)
1979+
drm_WARN_ON(display->drm, ret != BXT_CDCLK_CD2X_DIV_SEL_1);
1980+
1981+
return ret;
19521982
}
19531983

19541984
static u16 cdclk_squash_waveform(struct intel_display *display,
@@ -2136,8 +2166,10 @@ static u32 bxt_cdclk_ctl(struct intel_display *display,
21362166

21372167
waveform = cdclk_squash_waveform(display, cdclk);
21382168

2139-
val = bxt_cdclk_cd2x_div_sel(display, cdclk, vco, waveform) |
2140-
bxt_cdclk_cd2x_pipe(display, pipe);
2169+
val = bxt_cdclk_cd2x_div_sel(display, cdclk, vco, waveform);
2170+
2171+
if (DISPLAY_VER(display) < 30)
2172+
val |= bxt_cdclk_cd2x_pipe(display, pipe);
21412173

21422174
/*
21432175
* Disable SSA Precharge when CD clock frequency < 500 MHz,
@@ -2147,10 +2179,20 @@ static u32 bxt_cdclk_ctl(struct intel_display *display,
21472179
cdclk >= 500000)
21482180
val |= BXT_CDCLK_SSA_PRECHARGE_ENABLE;
21492181

2150-
if (DISPLAY_VER(display) >= 20)
2151-
val |= xe2lpd_mdclk_source_sel(display);
2152-
else
2182+
if (DISPLAY_VER(display) >= 20) {
2183+
/*
2184+
* Wa_13012396614 requires selecting CD2XCLK as MDCLK source
2185+
* prior to disabling the PLL, which is already handled by
2186+
* icl_cdclk_pll_disable(). Here we are just making sure
2187+
* we keep the expected value.
2188+
*/
2189+
if (intel_display_wa(display, 13012396614) && vco == 0)
2190+
val |= MDCLK_SOURCE_SEL_CD2XCLK;
2191+
else
2192+
val |= xe2lpd_mdclk_source_sel(display);
2193+
} else {
21532194
val |= skl_cdclk_decimal(cdclk);
2195+
}
21542196

21552197
return val;
21562198
}

drivers/gpu/drm/i915/display/intel_connector.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include <drm/drm_print.h>
3232
#include <drm/drm_probe_helper.h>
3333

34-
#include "i915_drv.h"
35-
#include "i915_utils.h" /* for i915_inject_probe_failure() */
3634
#include "intel_connector.h"
3735
#include "intel_display_core.h"
3836
#include "intel_display_debugfs.h"

drivers/gpu/drm/i915/display/intel_crtc_state_dump.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config,
303303
drm_printf(&p, "vrr: vmin vblank: %d, vmax vblank: %d, vmin vtotal: %d, vmax vtotal: %d\n",
304304
intel_vrr_vmin_vblank_start(pipe_config), intel_vrr_vmax_vblank_start(pipe_config),
305305
intel_vrr_vmin_vtotal(pipe_config), intel_vrr_vmax_vtotal(pipe_config));
306+
drm_printf(&p, "vrr: dc balance: %s, vmin: %d vmax: %d guardband: %d, slope: %d max increase: %d max decrease: %d vblank target: %d\n",
307+
str_yes_no(pipe_config->vrr.dc_balance.enable),
308+
pipe_config->vrr.dc_balance.vmin, pipe_config->vrr.dc_balance.vmax,
309+
pipe_config->vrr.dc_balance.guardband,
310+
pipe_config->vrr.dc_balance.slope,
311+
pipe_config->vrr.dc_balance.max_increase,
312+
pipe_config->vrr.dc_balance.max_decrease,
313+
pipe_config->vrr.dc_balance.vblank_target);
306314

307315
drm_printf(&p, "requested mode: " DRM_MODE_FMT "\n",
308316
DRM_MODE_ARG(&pipe_config->hw.mode));

drivers/gpu/drm/i915/display/intel_cx0_phy.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,15 +2671,18 @@ static int intel_c20pll_calc_state(const struct intel_crtc_state *crtc_state,
26712671
hw_state->cx0pll.use_c10 = false;
26722672
hw_state->cx0pll.lane_count = crtc_state->lane_count;
26732673

2674-
/* try computed C20 HDMI tables before using consolidated tables */
2675-
if (!is_dp)
2676-
/* TODO: Update SSC state for HDMI as well */
2677-
err = intel_c20_compute_hdmi_tmds_pll(crtc_state, &hw_state->cx0pll.c20);
2678-
2674+
/*
2675+
* Try the ideal C20 HDMI tables before computing them, since the calculated
2676+
* values, although correct, may not be optimal.
2677+
*/
26792678
if (err)
26802679
err = intel_c20pll_calc_state_from_table(crtc_state, encoder,
26812680
&hw_state->cx0pll);
26822681

2682+
/* TODO: Update SSC state for HDMI as well */
2683+
if (!is_dp && err)
2684+
err = intel_c20_compute_hdmi_tmds_pll(crtc_state, &hw_state->cx0pll.c20);
2685+
26832686
if (err)
26842687
return err;
26852688

drivers/gpu/drm/i915/display/intel_cx0_phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: MIT
1+
/* SPDX-License-Identifier: MIT */
22
/*
33
* Copyright © 2023 Intel Corporation
44
*/

drivers/gpu/drm/i915/display/intel_cx0_phy_regs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* SPDX-License-Identifier: MIT
2-
*
1+
/* SPDX-License-Identifier: MIT */
2+
/*
33
* Copyright © 2023 Intel Corporation
44
*/
55

0 commit comments

Comments
 (0)