Skip to content

Commit bf99ceb

Browse files
committed
Merge tag 'drm-intel-next-2024-11-04' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
drm/i915 feature pull #2 for v6.13: Features and functionality: - Pantherlake (PTL) Xe3 LPD display enabling for xe driver (Clint, Suraj, Dnyaneshwar, Matt, Gustavo, Radhakrishna, Chaitanya, Haridhar, Juha-Pekka, Ravi) - Enable dbuf overlap detection on Lunarlake and later (Stanislav, Vinod) - Allow fastset for HDR infoframe changes (Chaitanya) - Write DP source OUI also for non-eDP sinks (Imre) Refactoring and cleanups: - Independent platform identification for display (Jani) - Display tracepoint fixes and cleanups (Gustavo) - Share PCI ID headers between i915 and xe drivers (Jani) - Use x100 version for full version and release checks (Jani) - Conversions to struct intel_display (Jani, Ville) - Reuse DP DPCD and AUX macros in gvt instead of duplication (Jani) - Use string choice helpers (R Sundar, Sai Teja) - Remove unused underrun detection irq code (Sai Teja) - Color management debug improvements and other cleanups (Ville) - Refactor panel fitter code to a separate file (Ville) - Use try_cmpxchg() instead of open-coding (Uros Bizjak) Fixes: - PSR and Panel Replay fixes and workarounds (Jouni) - Fix panel power during connector detection (Imre) - Fix connector detection and modeset races (Imre) - Fix C20 PHY TX MISC configuration (Gustavo) - Improve panel fitter validity checks (Ville) - Fix eDP short HPD interrupt handling while runtime suspended (Imre) - Propagate DP MST DSC BW overhead/slice calculation errors (Imre) - Stop hotplug polling for eDP connectors (Imre) - Workaround panels reporting bad link status after PSR enable (Jouni) - Panel Replay VRR VSC SDP related workaround and refactor (Animesh, Mitul) - Fix memory leak on eDP init error path (Shuicheng) - Fix GVT KVMGT Kconfig dependencies (Arnd Bergmann) - Fix irq function documentation build warning (Rodrigo) - Add platform check to power management fuse bit read (Clint) - Revert kstrdup_const() and kfree_const() usage for clarity (Christophe JAILLET) - Workaround horizontal odd panning issues in display versions 20 and 30 (Nemesa) - Fix xe drive HDCP GSC firmware check (Suraj) Merges: - Backmerge drm-next to get some KVM changes (Rodrigo) - Fix a build failure originating from previous backmerge (Jani) Signed-off-by: Dave Airlie <airlied@redhat.com> # Conflicts: # drivers/gpu/drm/i915/display/intel_dp_mst.c From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87h68ni0wd.fsf@intel.com
2 parents 9bed494 + 82ab75c commit bf99ceb

File tree

118 files changed

+3691
-2976
lines changed

Some content is hidden

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

118 files changed

+3691
-2976
lines changed

Documentation/gpu/i915.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ Interrupt Handling
3535
:functions: intel_irq_init intel_irq_init_hw intel_hpd_init
3636

3737
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
38-
:functions: intel_runtime_pm_disable_interrupts
38+
:functions: intel_irq_suspend
3939

4040
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
41-
:functions: intel_runtime_pm_enable_interrupts
41+
:functions: intel_irq_resume
4242

4343
Intel GVT-g Guest Support(vGPU)
4444
-------------------------------

arch/x86/kernel/early-quirks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <linux/bcma/bcma_regs.h>
1919
#include <linux/platform_data/x86/apple.h>
2020
#include <drm/intel/i915_drm.h>
21-
#include <drm/intel/i915_pciids.h>
21+
#include <drm/intel/pciids.h>
2222
#include <asm/pci-direct.h>
2323
#include <asm/dma.h>
2424
#include <asm/io_apic.h>

drivers/gpu/drm/i915/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ i915-y += \
339339
display/intel_lspcon.o \
340340
display/intel_lvds.o \
341341
display/intel_panel.o \
342+
display/intel_pfit.o \
342343
display/intel_pps.o \
343344
display/intel_qp_tables.o \
344345
display/intel_sdvo.o \

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,12 @@ static void assert_dp_port(struct intel_dp *intel_dp, bool state)
170170
{
171171
struct intel_display *display = to_intel_display(intel_dp);
172172
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
173-
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
174173
bool cur_state = intel_de_read(display, intel_dp->output_reg) & DP_PORT_EN;
175174

176-
I915_STATE_WARN(dev_priv, cur_state != state,
177-
"[ENCODER:%d:%s] state assertion failure (expected %s, current %s)\n",
178-
dig_port->base.base.base.id, dig_port->base.base.name,
179-
str_on_off(state), str_on_off(cur_state));
175+
INTEL_DISPLAY_STATE_WARN(display, cur_state != state,
176+
"[ENCODER:%d:%s] state assertion failure (expected %s, current %s)\n",
177+
dig_port->base.base.base.id, dig_port->base.base.name,
178+
str_on_off(state), str_on_off(cur_state));
180179
}
181180
#define assert_dp_port_disabled(d) assert_dp_port((d), false)
182181

@@ -185,9 +184,9 @@ static void assert_edp_pll(struct drm_i915_private *dev_priv, bool state)
185184
struct intel_display *display = &dev_priv->display;
186185
bool cur_state = intel_de_read(display, DP_A) & DP_PLL_ENABLE;
187186

188-
I915_STATE_WARN(dev_priv, cur_state != state,
189-
"eDP PLL state assertion failure (expected %s, current %s)\n",
190-
str_on_off(state), str_on_off(cur_state));
187+
INTEL_DISPLAY_STATE_WARN(display, cur_state != state,
188+
"eDP PLL state assertion failure (expected %s, current %s)\n",
189+
str_on_off(state), str_on_off(cur_state));
191190
}
192191
#define assert_edp_pll_enabled(d) assert_edp_pll((d), true)
193192
#define assert_edp_pll_disabled(d) assert_edp_pll((d), false)
@@ -706,8 +705,7 @@ static void intel_enable_dp(struct intel_atomic_state *state,
706705
if (IS_CHERRYVIEW(dev_priv))
707706
lane_mask = intel_dp_unused_lane_mask(pipe_config->lane_count);
708707

709-
vlv_wait_port_ready(dev_priv, dp_to_dig_port(intel_dp),
710-
lane_mask);
708+
vlv_wait_port_ready(display, dp_to_dig_port(intel_dp), lane_mask);
711709
}
712710

713711
intel_dp_set_power(intel_dp, DP_SET_POWER_D0);
@@ -1251,6 +1249,7 @@ static void intel_dp_encoder_reset(struct drm_encoder *encoder)
12511249
intel_dp->DP = intel_de_read(display, intel_dp->output_reg);
12521250

12531251
intel_dp->reset_link_params = true;
1252+
intel_dp_invalidate_source_oui(intel_dp);
12541253

12551254
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
12561255
vlv_pps_pipe_reset(intel_dp);

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ static void vlv_hdmi_pre_enable(struct intel_atomic_state *state,
480480
const struct intel_crtc_state *pipe_config,
481481
const struct drm_connector_state *conn_state)
482482
{
483+
struct intel_display *display = to_intel_display(encoder);
483484
struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
484-
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
485485

486486
vlv_phy_pre_encoder_enable(encoder, pipe_config);
487487

@@ -496,7 +496,7 @@ static void vlv_hdmi_pre_enable(struct intel_atomic_state *state,
496496

497497
g4x_hdmi_enable_port(encoder, pipe_config);
498498

499-
vlv_wait_port_ready(dev_priv, dig_port, 0x0);
499+
vlv_wait_port_ready(display, dig_port, 0x0);
500500
}
501501

502502
static void vlv_hdmi_pre_pll_enable(struct intel_atomic_state *state,
@@ -557,9 +557,8 @@ static void chv_hdmi_pre_enable(struct intel_atomic_state *state,
557557
const struct intel_crtc_state *pipe_config,
558558
const struct drm_connector_state *conn_state)
559559
{
560+
struct intel_display *display = to_intel_display(encoder);
560561
struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
561-
struct drm_device *dev = encoder->base.dev;
562-
struct drm_i915_private *dev_priv = to_i915(dev);
563562

564563
chv_phy_pre_encoder_enable(encoder, pipe_config);
565564

@@ -573,7 +572,7 @@ static void chv_hdmi_pre_enable(struct intel_atomic_state *state,
573572

574573
g4x_hdmi_enable_port(encoder, pipe_config);
575574

576-
vlv_wait_port_ready(dev_priv, dig_port, 0x0);
575+
vlv_wait_port_ready(display, dig_port, 0x0);
577576

578577
/* Second common lane will stay alive on its own now */
579578
chv_phy_release_cl2_override(encoder);

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

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
1717
{
18+
struct intel_display *display = to_intel_display(crtc_state);
1819
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1920
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
2021
u32 val;
@@ -27,16 +28,16 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
2728
* This function is called from post_plane_update, which is run after
2829
* a vblank wait.
2930
*/
30-
drm_WARN_ON(&i915->drm,
31+
drm_WARN_ON(display->drm,
3132
!(crtc_state->active_planes & ~BIT(PLANE_CURSOR)));
3233

3334
val = IPS_ENABLE;
3435

35-
if (i915->display.ips.false_color)
36+
if (display->ips.false_color)
3637
val |= IPS_FALSE_COLOR;
3738

3839
if (IS_BROADWELL(i915)) {
39-
drm_WARN_ON(&i915->drm,
40+
drm_WARN_ON(display->drm,
4041
snb_pcode_write(&i915->uncore, DISPLAY_IPS_CONTROL,
4142
val | IPS_PCODE_CONTROL));
4243
/*
@@ -46,22 +47,23 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
4647
* so we need to just enable it and continue on.
4748
*/
4849
} else {
49-
intel_de_write(i915, IPS_CTL, val);
50+
intel_de_write(display, IPS_CTL, val);
5051
/*
5152
* The bit only becomes 1 in the next vblank, so this wait here
5253
* is essentially intel_wait_for_vblank. If we don't have this
5354
* and don't wait for vblanks until the end of crtc_enable, then
5455
* the HW state readout code will complain that the expected
5556
* IPS_CTL value is not the one we read.
5657
*/
57-
if (intel_de_wait_for_set(i915, IPS_CTL, IPS_ENABLE, 50))
58-
drm_err(&i915->drm,
58+
if (intel_de_wait_for_set(display, IPS_CTL, IPS_ENABLE, 50))
59+
drm_err(display->drm,
5960
"Timed out waiting for IPS enable\n");
6061
}
6162
}
6263

6364
bool hsw_ips_disable(const struct intel_crtc_state *crtc_state)
6465
{
66+
struct intel_display *display = to_intel_display(crtc_state);
6567
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
6668
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
6769
bool need_vblank_wait = false;
@@ -70,19 +72,19 @@ bool hsw_ips_disable(const struct intel_crtc_state *crtc_state)
7072
return need_vblank_wait;
7173

7274
if (IS_BROADWELL(i915)) {
73-
drm_WARN_ON(&i915->drm,
75+
drm_WARN_ON(display->drm,
7476
snb_pcode_write(&i915->uncore, DISPLAY_IPS_CONTROL, 0));
7577
/*
7678
* Wait for PCODE to finish disabling IPS. The BSpec specified
7779
* 42ms timeout value leads to occasional timeouts so use 100ms
7880
* instead.
7981
*/
80-
if (intel_de_wait_for_clear(i915, IPS_CTL, IPS_ENABLE, 100))
81-
drm_err(&i915->drm,
82+
if (intel_de_wait_for_clear(display, IPS_CTL, IPS_ENABLE, 100))
83+
drm_err(display->drm,
8284
"Timed out waiting for IPS disable\n");
8385
} else {
84-
intel_de_write(i915, IPS_CTL, 0);
85-
intel_de_posting_read(i915, IPS_CTL);
86+
intel_de_write(display, IPS_CTL, 0);
87+
intel_de_posting_read(display, IPS_CTL);
8688
}
8789

8890
/* We need to wait for a vblank before we can disable the plane. */
@@ -188,14 +190,15 @@ bool hsw_crtc_supports_ips(struct intel_crtc *crtc)
188190

189191
bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state)
190192
{
193+
struct intel_display *display = to_intel_display(crtc_state);
191194
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
192195
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
193196

194197
/* IPS only exists on ULT machines and is tied to pipe A. */
195198
if (!hsw_crtc_supports_ips(crtc))
196199
return false;
197200

198-
if (!i915->display.params.enable_ips)
201+
if (!display->params.enable_ips)
199202
return false;
200203

201204
if (crtc_state->pipe_bpp > 24)
@@ -209,7 +212,7 @@ bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state)
209212
* Should measure whether using a lower cdclk w/o IPS
210213
*/
211214
if (IS_BROADWELL(i915) &&
212-
crtc_state->pixel_rate > i915->display.cdclk.max_cdclk_freq * 95 / 100)
215+
crtc_state->pixel_rate > display->cdclk.max_cdclk_freq * 95 / 100)
213216
return false;
214217

215218
return true;
@@ -259,14 +262,15 @@ int hsw_ips_compute_config(struct intel_atomic_state *state,
259262

260263
void hsw_ips_get_config(struct intel_crtc_state *crtc_state)
261264
{
265+
struct intel_display *display = to_intel_display(crtc_state);
262266
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
263267
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
264268

265269
if (!hsw_crtc_supports_ips(crtc))
266270
return;
267271

268272
if (IS_HASWELL(i915)) {
269-
crtc_state->ips_enabled = intel_de_read(i915, IPS_CTL) & IPS_ENABLE;
273+
crtc_state->ips_enabled = intel_de_read(display, IPS_CTL) & IPS_ENABLE;
270274
} else {
271275
/*
272276
* We cannot readout IPS state on broadwell, set to
@@ -280,25 +284,25 @@ void hsw_ips_get_config(struct intel_crtc_state *crtc_state)
280284
static int hsw_ips_debugfs_false_color_get(void *data, u64 *val)
281285
{
282286
struct intel_crtc *crtc = data;
283-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
287+
struct intel_display *display = to_intel_display(crtc);
284288

285-
*val = i915->display.ips.false_color;
289+
*val = display->ips.false_color;
286290

287291
return 0;
288292
}
289293

290294
static int hsw_ips_debugfs_false_color_set(void *data, u64 val)
291295
{
292296
struct intel_crtc *crtc = data;
293-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
297+
struct intel_display *display = to_intel_display(crtc);
294298
struct intel_crtc_state *crtc_state;
295299
int ret;
296300

297301
ret = drm_modeset_lock(&crtc->base.mutex, NULL);
298302
if (ret)
299303
return ret;
300304

301-
i915->display.ips.false_color = val;
305+
display->ips.false_color = val;
302306

303307
crtc_state = to_intel_crtc_state(crtc->base.state);
304308

@@ -325,18 +329,19 @@ DEFINE_DEBUGFS_ATTRIBUTE(hsw_ips_debugfs_false_color_fops,
325329
static int hsw_ips_debugfs_status_show(struct seq_file *m, void *unused)
326330
{
327331
struct intel_crtc *crtc = m->private;
332+
struct intel_display *display = to_intel_display(crtc);
328333
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
329334
intel_wakeref_t wakeref;
330335

331336
wakeref = intel_runtime_pm_get(&i915->runtime_pm);
332337

333338
seq_printf(m, "Enabled by kernel parameter: %s\n",
334-
str_yes_no(i915->display.params.enable_ips));
339+
str_yes_no(display->params.enable_ips));
335340

336-
if (DISPLAY_VER(i915) >= 8) {
341+
if (DISPLAY_VER(display) >= 8) {
337342
seq_puts(m, "Currently: unknown\n");
338343
} else {
339-
if (intel_de_read(i915, IPS_CTL) & IPS_ENABLE)
344+
if (intel_de_read(display, IPS_CTL) & IPS_ENABLE)
340345
seq_puts(m, "Currently: enabled\n");
341346
else
342347
seq_puts(m, "Currently: disabled\n");

0 commit comments

Comments
 (0)