Skip to content

Commit 389af78

Browse files
committed
Merge tag 'drm-intel-next-2023-09-29' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
drm/i915 feature pull for v6.7: Features and functionality: - Early Xe2 LPD / Lunarlake (LNL) display enabling (Lucas, Matt, Gustavo, Stanislav, Luca, Clint, Juha-Pekka, Balasubramani, Ravi) - Plenty of various DSC improvements and fixes (Ankit) - Add DSC PPS state readout and verification (Suraj) - Improve fastsets for VRR, LRR and M/N updates (Ville) - Use connector->ddc to create (non-DP MST) connector sysfs ddc symlinks (Ville) - Various DSB improvements, load LUTs using DSB (Ville) - Improve shared link bandwidth management, starting with FDI (Imre) - Optimize get param ioctl for PXP status (Alan) - Remove DG2 pre-production hardware workarounds (Matt) - Add more RPL P/U PCI IDs (Dnyaneshwar) - Add new DG2-G12 stepping (Swati) - Add PSR sink error status to debugfs (Jouni) - Add DP enhanced framing to crtc state checker (Ville) Refactoring and cleanups: - Simplify TileY/Tile4 tiling selftest enumeration (Matt) - Remove some unused power domain code (Gustavo) - Check stepping of display IP version rather than MTL platform (Matt) - DP audio compute config cleanups (Vinod) - SDVO cleanups and refactoring, more robust failure handling (Ville) - Color register definition and readout cleanups (Jani) - Reduce header interdependencies for frontbuffer tracking (Jani) - Continue replacing struct edid with struct drm_edid (Jani) - Use source physical address instead of EDID for CEC (Jani) - Clean up Type-C port lane count functions (Luca) - Clean up DSC PPS register definitions and readout (Jani) - Stop using GEM_BUG_ON()/GEM_WARN_ON() in display code (Jani) - Move more of the display probe to display code (Jani) - Remove redundant runtime suspended state flag (Jouni) - Move display info printing to display code (Balasubramani) - Frontbuffer tracking improvements (Jouni) - Add trailing newlines to debug logging (Jim Cromie) - Separate display workarounds from clock gating init (Matt) - Reduce dmesg log spamming for combo PHY, PLL state, FEC, DP MST (Ville, Imre) Fixes: - Fix hotplug poll detect loops via suspend/resume (Imre) - Fix hotplug detect for forced connectors (Imre) - Fix DSC first_line_bpg_offset calculation (Suraj) - Fix debug prints for SDP CRC16 (Arun) - Fix PXP runtime resume (Alan) - Fix cx0 PHY lane handling (Gustavo) - Fix frontbuffer tracking locking in debugfs (Juha-Pekka) - Fix SDVO detect on some models (Ville) - Fix SDP split configuration for DP MST (Vinod) - Fix AUX usage and reads for HDCP on DP MST (Suraj) - Fix PSR workaround (Jouni) - Fix redundant AUX power get/put in DP force (Imre) - Fix ICL DSI TCLK POST by letting hardware handle it (William) - Fix IRQ reset for XE LP+ (Gustavo) - Fix h/vsync_end instead of h/vtotal in VBT (Ville) - Fix C20 PHY msgbus timeout issues (Gustavo) - Fix pre-TGL FEC pipe A vs. DDI A mixup (Ville) - Fix FEC state readout for DP MST (Ville) DRM subsystem core changes: - Assume sink supports 8 bpc when DSC is supported (Ankit) - Add drm_edid_is_digital() helper (Jani) - Parse source physical address from EDID (Jani) - Add function to attach CEC without EDID (Jani) - Reorder connector sysfs/debugfs remove (Ville) - Register connector sysfs ddc symlink later (Ville) Media subsystem changes: - Add comments about CEC source physical address usage (Jani) Merges: - Backmerge drm-next to get v6.6-rc1 (Jani) Signed-off-by: Dave Airlie <[email protected]> # Conflicts: # drivers/gpu/drm/i915/i915_drv.h From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents caacbdc + 3570bd9 commit 389af78

File tree

142 files changed

+4550
-2464
lines changed

Some content is hidden

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

142 files changed

+4550
-2464
lines changed

drivers/gpu/drm/display/drm_dp_cec.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <drm/display/drm_dp_helper.h>
1515
#include <drm/drm_connector.h>
1616
#include <drm/drm_device.h>
17+
#include <drm/drm_edid.h>
1718

1819
/*
1920
* Unfortunately it turns out that we have a chicken-and-egg situation
@@ -297,7 +298,7 @@ static void drm_dp_cec_unregister_work(struct work_struct *work)
297298
* were unchanged and just update the CEC physical address. Otherwise
298299
* unregister the old CEC adapter and create a new one.
299300
*/
300-
void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
301+
void drm_dp_cec_attach(struct drm_dp_aux *aux, u16 source_physical_address)
301302
{
302303
struct drm_connector *connector = aux->cec.connector;
303304
u32 cec_caps = CEC_CAP_DEFAULTS | CEC_CAP_NEEDS_HPD |
@@ -339,7 +340,7 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
339340
if (aux->cec.adap->capabilities == cec_caps &&
340341
aux->cec.adap->available_log_addrs == num_las) {
341342
/* Unchanged, so just set the phys addr */
342-
cec_s_phys_addr_from_edid(aux->cec.adap, edid);
343+
cec_s_phys_addr(aux->cec.adap, source_physical_address, false);
343344
goto unlock;
344345
}
345346
/*
@@ -370,11 +371,27 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
370371
* from drm_dp_cec_register_connector() edid == NULL, so in
371372
* that case the phys addr is just invalidated.
372373
*/
373-
cec_s_phys_addr_from_edid(aux->cec.adap, edid);
374+
cec_s_phys_addr(aux->cec.adap, source_physical_address, false);
374375
}
375376
unlock:
376377
mutex_unlock(&aux->cec.lock);
377378
}
379+
EXPORT_SYMBOL(drm_dp_cec_attach);
380+
381+
/*
382+
* Note: Prefer calling drm_dp_cec_attach() with
383+
* connector->display_info.source_physical_address if possible.
384+
*/
385+
void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
386+
{
387+
u16 pa = CEC_PHYS_ADDR_INVALID;
388+
389+
if (edid && edid->extensions)
390+
pa = cec_get_edid_phys_addr((const u8 *)edid,
391+
EDID_LENGTH * (edid->extensions + 1), NULL);
392+
393+
drm_dp_cec_attach(aux, pa);
394+
}
378395
EXPORT_SYMBOL(drm_dp_cec_set_edid);
379396

380397
/*

drivers/gpu/drm/display/drm_dp_helper.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,12 +2449,16 @@ int drm_dp_dsc_sink_supported_input_bpcs(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_S
24492449
int num_bpc = 0;
24502450
u8 color_depth = dsc_dpcd[DP_DSC_DEC_COLOR_DEPTH_CAP - DP_DSC_SUPPORT];
24512451

2452+
if (!drm_dp_sink_supports_dsc(dsc_dpcd))
2453+
return 0;
2454+
24522455
if (color_depth & DP_DSC_12_BPC)
24532456
dsc_bpc[num_bpc++] = 12;
24542457
if (color_depth & DP_DSC_10_BPC)
24552458
dsc_bpc[num_bpc++] = 10;
2456-
if (color_depth & DP_DSC_8_BPC)
2457-
dsc_bpc[num_bpc++] = 8;
2459+
2460+
/* A DP DSC Sink device shall support 8 bpc. */
2461+
dsc_bpc[num_bpc++] = 8;
24582462

24592463
return num_bpc;
24602464
}

drivers/gpu/drm/drm_connector.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,10 @@ int drm_connector_register(struct drm_connector *connector)
631631
goto err_debugfs;
632632
}
633633

634+
ret = drm_sysfs_connector_add_late(connector);
635+
if (ret)
636+
goto err_late_register;
637+
634638
drm_mode_object_register(connector->dev, &connector->base);
635639

636640
connector->registration_state = DRM_CONNECTOR_REGISTERED;
@@ -647,6 +651,9 @@ int drm_connector_register(struct drm_connector *connector)
647651
mutex_unlock(&connector_list_lock);
648652
goto unlock;
649653

654+
err_late_register:
655+
if (connector->funcs->early_unregister)
656+
connector->funcs->early_unregister(connector);
650657
err_debugfs:
651658
drm_debugfs_connector_remove(connector);
652659
drm_sysfs_connector_remove(connector);
@@ -681,11 +688,13 @@ void drm_connector_unregister(struct drm_connector *connector)
681688
connector->privacy_screen,
682689
&connector->privacy_screen_notifier);
683690

691+
drm_sysfs_connector_remove_early(connector);
692+
684693
if (connector->funcs->early_unregister)
685694
connector->funcs->early_unregister(connector);
686695

687-
drm_sysfs_connector_remove(connector);
688696
drm_debugfs_connector_remove(connector);
697+
drm_sysfs_connector_remove(connector);
689698

690699
connector->registration_state = DRM_CONNECTOR_UNREGISTERED;
691700
mutex_unlock(&connector->mutex);

drivers/gpu/drm/drm_edid.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030

3131
#include <linux/bitfield.h>
32+
#include <linux/cec.h>
3233
#include <linux/hdmi.h>
3334
#include <linux/i2c.h>
3435
#include <linux/kernel.h>
@@ -3110,7 +3111,7 @@ drm_monitor_supports_rb(const struct drm_edid *drm_edid)
31103111
return ret;
31113112
}
31123113

3113-
return ((drm_edid->edid->input & DRM_EDID_INPUT_DIGITAL) != 0);
3114+
return drm_edid_is_digital(drm_edid);
31143115
}
31153116

31163117
static void
@@ -6200,6 +6201,8 @@ drm_parse_hdmi_vsdb_video(struct drm_connector *connector, const u8 *db)
62006201

62016202
info->is_hdmi = true;
62026203

6204+
info->source_physical_address = (db[4] << 8) | db[5];
6205+
62036206
if (len >= 6)
62046207
info->dvi_dual = db[6] & 1;
62056208
if (len >= 7)
@@ -6478,6 +6481,8 @@ static void drm_reset_display_info(struct drm_connector *connector)
64786481
info->vics_len = 0;
64796482

64806483
info->quirks = 0;
6484+
6485+
info->source_physical_address = CEC_PHYS_ADDR_INVALID;
64816486
}
64826487

64836488
static void update_displayid_info(struct drm_connector *connector,
@@ -6527,7 +6532,7 @@ static void update_display_info(struct drm_connector *connector,
65276532
if (edid->revision < 3)
65286533
goto out;
65296534

6530-
if (!(edid->input & DRM_EDID_INPUT_DIGITAL))
6535+
if (!drm_edid_is_digital(drm_edid))
65316536
goto out;
65326537

65336538
info->color_formats |= DRM_COLOR_FORMAT_RGB444;
@@ -7343,3 +7348,16 @@ static void _drm_update_tile_info(struct drm_connector *connector,
73437348
connector->tile_group = NULL;
73447349
}
73457350
}
7351+
7352+
/**
7353+
* drm_edid_is_digital - is digital?
7354+
* @drm_edid: The EDID
7355+
*
7356+
* Return true if input is digital.
7357+
*/
7358+
bool drm_edid_is_digital(const struct drm_edid *drm_edid)
7359+
{
7360+
return drm_edid && drm_edid->edid &&
7361+
drm_edid->edid->input & DRM_EDID_INPUT_DIGITAL;
7362+
}
7363+
EXPORT_SYMBOL(drm_edid_is_digital);

drivers/gpu/drm/drm_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ int drm_sysfs_init(void);
153153
void drm_sysfs_destroy(void);
154154
struct device *drm_sysfs_minor_alloc(struct drm_minor *minor);
155155
int drm_sysfs_connector_add(struct drm_connector *connector);
156+
int drm_sysfs_connector_add_late(struct drm_connector *connector);
157+
void drm_sysfs_connector_remove_early(struct drm_connector *connector);
156158
void drm_sysfs_connector_remove(struct drm_connector *connector);
157159

158160
void drm_sysfs_lease_event(struct drm_device *dev);

drivers/gpu/drm/drm_sysfs.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,24 +400,32 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
400400
drm_err(dev, "failed to add component to create link to typec connector\n");
401401
}
402402

403-
if (connector->ddc)
404-
return sysfs_create_link(&connector->kdev->kobj,
405-
&connector->ddc->dev.kobj, "ddc");
406-
407403
return 0;
408404

409405
err_free:
410406
put_device(kdev);
411407
return r;
412408
}
413409

414-
void drm_sysfs_connector_remove(struct drm_connector *connector)
410+
int drm_sysfs_connector_add_late(struct drm_connector *connector)
415411
{
416-
if (!connector->kdev)
417-
return;
412+
if (connector->ddc)
413+
return sysfs_create_link(&connector->kdev->kobj,
414+
&connector->ddc->dev.kobj, "ddc");
415+
416+
return 0;
417+
}
418418

419+
void drm_sysfs_connector_remove_early(struct drm_connector *connector)
420+
{
419421
if (connector->ddc)
420422
sysfs_remove_link(&connector->kdev->kobj, "ddc");
423+
}
424+
425+
void drm_sysfs_connector_remove(struct drm_connector *connector)
426+
{
427+
if (!connector->kdev)
428+
return;
421429

422430
if (dev_fwnode(connector->kdev))
423431
component_del(connector->kdev, &typec_connector_ops);

drivers/gpu/drm/i915/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ i915-y += \
248248
display/intel_display_power_well.o \
249249
display/intel_display_reset.o \
250250
display/intel_display_rps.o \
251+
display/intel_display_wa.o \
251252
display/intel_dmc.o \
252253
display/intel_dpio_phy.o \
253254
display/intel_dpll.o \
@@ -267,6 +268,7 @@ i915-y += \
267268
display/intel_hotplug.o \
268269
display/intel_hotplug_irq.o \
269270
display/intel_hti.o \
271+
display/intel_link_bw.o \
270272
display/intel_load_detect.o \
271273
display/intel_lpe_audio.o \
272274
display/intel_modeset_lock.o \

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
141141

142142
intel_de_rmw(dev_priv, TRANS_DP_CTL(crtc->pipe),
143143
TRANS_DP_ENH_FRAMING,
144-
drm_dp_enhanced_frame_cap(intel_dp->dpcd) ?
144+
pipe_config->enhanced_framing ?
145145
TRANS_DP_ENH_FRAMING : 0);
146146
} else {
147147
if (IS_G4X(dev_priv) && pipe_config->limited_color_range)
@@ -153,7 +153,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
153153
intel_dp->DP |= DP_SYNC_VS_HIGH;
154154
intel_dp->DP |= DP_LINK_TRAIN_OFF;
155155

156-
if (drm_dp_enhanced_frame_cap(intel_dp->dpcd))
156+
if (pipe_config->enhanced_framing)
157157
intel_dp->DP |= DP_ENHANCED_FRAMING;
158158

159159
if (IS_CHERRYVIEW(dev_priv))
@@ -351,6 +351,9 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
351351
u32 trans_dp = intel_de_read(dev_priv,
352352
TRANS_DP_CTL(crtc->pipe));
353353

354+
if (trans_dp & TRANS_DP_ENH_FRAMING)
355+
pipe_config->enhanced_framing = true;
356+
354357
if (trans_dp & TRANS_DP_HSYNC_ACTIVE_HIGH)
355358
flags |= DRM_MODE_FLAG_PHSYNC;
356359
else
@@ -361,6 +364,9 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
361364
else
362365
flags |= DRM_MODE_FLAG_NVSYNC;
363366
} else {
367+
if (tmp & DP_ENHANCED_FRAMING)
368+
pipe_config->enhanced_framing = true;
369+
364370
if (tmp & DP_SYNC_HS_HIGH)
365371
flags |= DRM_MODE_FLAG_PHSYNC;
366372
else

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "intel_display_types.h"
1717
#include "intel_dp_aux.h"
1818
#include "intel_dpio_phy.h"
19+
#include "intel_fdi.h"
1920
#include "intel_fifo_underrun.h"
2021
#include "intel_hdmi.h"
2122
#include "intel_hotplug.h"
@@ -133,8 +134,11 @@ static int g4x_hdmi_compute_config(struct intel_encoder *encoder,
133134
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
134135
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
135136

136-
if (HAS_PCH_SPLIT(i915))
137+
if (HAS_PCH_SPLIT(i915)) {
137138
crtc_state->has_pch_encoder = true;
139+
if (!intel_fdi_compute_pipe_bpp(crtc_state))
140+
return -EINVAL;
141+
}
138142

139143
if (IS_G4X(i915))
140144
crtc_state->has_hdmi_sink = g4x_compute_has_hdmi_sink(state, crtc);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "hsw_ips.h"
77
#include "i915_drv.h"
88
#include "i915_reg.h"
9+
#include "intel_color_regs.h"
910
#include "intel_de.h"
1011
#include "intel_display_types.h"
1112
#include "intel_pcode.h"

0 commit comments

Comments
 (0)