Skip to content

Commit a809b92

Browse files
committed
Merge tag 'drm-intel-next-2024-08-13' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
- Type-C programming fix for MTL+ (Gustavo) - Fix display clock workaround (Mitul) - Fix DP LTTPR detection (Imre) - Calculate vblank delay more accurately (Ville) - Make vrr_{enabling,disabling}() usable outside intel_display.c (Ville) - FBC clean-up (Ville) - DP link-training fixes and clean-up (Imre) - Make I2C terminology more inclusive (Easwar) - Make read-only array bw_gbps static const (Colin) - HDCP fixes and improvements (Suraj) - DP VSC SDP fixes and clean-ups (Suraj, Mitul) - Fix opregion leak in Xe code (Lucas) - Fix possible int overflow in skl_ddi_calculate_wrpll (Nikita)] - General display clean-ups and conversion towards intel_display (Jani) - On DP MST, Enable LT fallback for UHBR<->non-UHBR rates (Imre) - Add VRR condition for DPKGC Enablement (Suraj) - Use backlight power constants (Zimmermann) - Correct dual pps handling for MTL_PCH+ (Dnyaneshwar) - Dump DSC HW state (Imre) - Replace double blank with single blank after comma (Andi) - Read display register timeout on BMG (Mitul) Signed-off-by: Dave Airlie <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 4e99669 + db63927 commit a809b92

Some content is hidden

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

78 files changed

+1817
-1406
lines changed

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb,
23392339
{
23402340
struct drm_dp_mst_topology_mgr *mgr = mstb->mgr;
23412341
struct drm_dp_mst_port *port;
2342-
int old_ddps = 0, ret;
2342+
int ret;
23432343
u8 new_pdt = DP_PEER_DEVICE_NONE;
23442344
bool new_mcs = 0;
23452345
bool created = false, send_link_addr = false, changed = false;
@@ -2372,7 +2372,6 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb,
23722372
*/
23732373
drm_modeset_lock(&mgr->base.lock, NULL);
23742374

2375-
old_ddps = port->ddps;
23762375
changed = port->ddps != port_msg->ddps ||
23772376
(port->ddps &&
23782377
(port->ldps != port_msg->legacy_device_plug_status ||
@@ -2407,15 +2406,13 @@ drm_dp_mst_handle_link_address_port(struct drm_dp_mst_branch *mstb,
24072406
* Reprobe PBN caps on both hotplug, and when re-probing the link
24082407
* for our parent mstb
24092408
*/
2410-
if (old_ddps != port->ddps || !created) {
2411-
if (port->ddps && !port->input) {
2412-
ret = drm_dp_send_enum_path_resources(mgr, mstb,
2413-
port);
2414-
if (ret == 1)
2415-
changed = true;
2416-
} else {
2417-
port->full_pbn = 0;
2418-
}
2409+
if (port->ddps && !port->input) {
2410+
ret = drm_dp_send_enum_path_resources(mgr, mstb,
2411+
port);
2412+
if (ret == 1)
2413+
changed = true;
2414+
} else {
2415+
port->full_pbn = 0;
24192416
}
24202417

24212418
ret = drm_dp_port_set_pdt(port, new_pdt, new_mcs);
@@ -2692,6 +2689,11 @@ static void drm_dp_mst_link_probe_work(struct work_struct *work)
26922689
drm_kms_helper_hotplug_event(dev);
26932690
}
26942691

2692+
static void drm_dp_mst_queue_probe_work(struct drm_dp_mst_topology_mgr *mgr)
2693+
{
2694+
queue_work(system_long_wq, &mgr->work);
2695+
}
2696+
26952697
static bool drm_dp_validate_guid(struct drm_dp_mst_topology_mgr *mgr,
26962698
u8 *guid)
26972699
{
@@ -3685,7 +3687,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
36853687
/* Write reset payload */
36863688
drm_dp_dpcd_write_payload(mgr, 0, 0, 0x3f);
36873689

3688-
queue_work(system_long_wq, &mgr->work);
3690+
drm_dp_mst_queue_probe_work(mgr);
36893691

36903692
ret = 0;
36913693
} else {
@@ -3723,6 +3725,33 @@ drm_dp_mst_topology_mgr_invalidate_mstb(struct drm_dp_mst_branch *mstb)
37233725
drm_dp_mst_topology_mgr_invalidate_mstb(port->mstb);
37243726
}
37253727

3728+
/**
3729+
* drm_dp_mst_topology_queue_probe - Queue a topology probe
3730+
* @mgr: manager to probe
3731+
*
3732+
* Queue a work to probe the MST topology. Driver's should call this only to
3733+
* sync the topology's HW->SW state after the MST link's parameters have
3734+
* changed in a way the state could've become out-of-sync. This is the case
3735+
* for instance when the link rate between the source and first downstream
3736+
* branch device has switched between UHBR and non-UHBR rates. Except of those
3737+
* cases - for instance when a sink gets plugged/unplugged to a port - the SW
3738+
* state will get updated automatically via MST UP message notifications.
3739+
*/
3740+
void drm_dp_mst_topology_queue_probe(struct drm_dp_mst_topology_mgr *mgr)
3741+
{
3742+
mutex_lock(&mgr->lock);
3743+
3744+
if (drm_WARN_ON(mgr->dev, !mgr->mst_state || !mgr->mst_primary))
3745+
goto out_unlock;
3746+
3747+
drm_dp_mst_topology_mgr_invalidate_mstb(mgr->mst_primary);
3748+
drm_dp_mst_queue_probe_work(mgr);
3749+
3750+
out_unlock:
3751+
mutex_unlock(&mgr->lock);
3752+
}
3753+
EXPORT_SYMBOL(drm_dp_mst_topology_queue_probe);
3754+
37263755
/**
37273756
* drm_dp_mst_topology_mgr_suspend() - suspend the MST manager
37283757
* @mgr: manager to suspend
@@ -3809,7 +3838,7 @@ int drm_dp_mst_topology_mgr_resume(struct drm_dp_mst_topology_mgr *mgr,
38093838
* state of our in-memory topology back into sync with reality. So,
38103839
* restart the probing process as if we're probing a new hub
38113840
*/
3812-
queue_work(system_long_wq, &mgr->work);
3841+
drm_dp_mst_queue_probe_work(mgr);
38133842
mutex_unlock(&mgr->lock);
38143843

38153844
if (sync) {

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ static bool ch7017_read(struct intel_dvo_device *dvo, u8 addr, u8 *val)
170170
{
171171
struct i2c_msg msgs[] = {
172172
{
173-
.addr = dvo->slave_addr,
173+
.addr = dvo->target_addr,
174174
.flags = 0,
175175
.len = 1,
176176
.buf = &addr,
177177
},
178178
{
179-
.addr = dvo->slave_addr,
179+
.addr = dvo->target_addr,
180180
.flags = I2C_M_RD,
181181
.len = 1,
182182
.buf = val,
@@ -189,15 +189,15 @@ static bool ch7017_write(struct intel_dvo_device *dvo, u8 addr, u8 val)
189189
{
190190
u8 buf[2] = { addr, val };
191191
struct i2c_msg msg = {
192-
.addr = dvo->slave_addr,
192+
.addr = dvo->target_addr,
193193
.flags = 0,
194194
.len = 2,
195195
.buf = buf,
196196
};
197197
return i2c_transfer(dvo->i2c_bus, &msg, 1) == 1;
198198
}
199199

200-
/** Probes for a CH7017 on the given bus and slave address. */
200+
/** Probes for a CH7017 on the given bus and target address. */
201201
static bool ch7017_init(struct intel_dvo_device *dvo,
202202
struct i2c_adapter *adapter)
203203
{
@@ -227,13 +227,13 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
227227
break;
228228
default:
229229
DRM_DEBUG_KMS("ch701x not detected, got %d: from %s "
230-
"slave %d.\n",
231-
val, adapter->name, dvo->slave_addr);
230+
"target %d.\n",
231+
val, adapter->name, dvo->target_addr);
232232
goto fail;
233233
}
234234

235235
DRM_DEBUG_KMS("%s detected on %s, addr %d\n",
236-
str, adapter->name, dvo->slave_addr);
236+
str, adapter->name, dvo->target_addr);
237237
return true;
238238

239239
fail:

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
153153

154154
struct i2c_msg msgs[] = {
155155
{
156-
.addr = dvo->slave_addr,
156+
.addr = dvo->target_addr,
157157
.flags = 0,
158158
.len = 1,
159159
.buf = out_buf,
160160
},
161161
{
162-
.addr = dvo->slave_addr,
162+
.addr = dvo->target_addr,
163163
.flags = I2C_M_RD,
164164
.len = 1,
165165
.buf = in_buf,
@@ -176,7 +176,7 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
176176

177177
if (!ch7xxx->quiet) {
178178
DRM_DEBUG_KMS("Unable to read register 0x%02x from %s:%02x.\n",
179-
addr, adapter->name, dvo->slave_addr);
179+
addr, adapter->name, dvo->target_addr);
180180
}
181181
return false;
182182
}
@@ -188,7 +188,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
188188
struct i2c_adapter *adapter = dvo->i2c_bus;
189189
u8 out_buf[2];
190190
struct i2c_msg msg = {
191-
.addr = dvo->slave_addr,
191+
.addr = dvo->target_addr,
192192
.flags = 0,
193193
.len = 2,
194194
.buf = out_buf,
@@ -202,7 +202,7 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
202202

203203
if (!ch7xxx->quiet) {
204204
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
205-
addr, adapter->name, dvo->slave_addr);
205+
addr, adapter->name, dvo->target_addr);
206206
}
207207

208208
return false;
@@ -229,8 +229,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
229229

230230
name = ch7xxx_get_id(vendor);
231231
if (!name) {
232-
DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s slave %d.\n",
233-
vendor, adapter->name, dvo->slave_addr);
232+
DRM_DEBUG_KMS("ch7xxx not detected; got VID 0x%02x from %s target %d.\n",
233+
vendor, adapter->name, dvo->target_addr);
234234
goto out;
235235
}
236236

@@ -240,8 +240,8 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
240240

241241
devid = ch7xxx_get_did(device);
242242
if (!devid) {
243-
DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s slave %d.\n",
244-
device, adapter->name, dvo->slave_addr);
243+
DRM_DEBUG_KMS("ch7xxx not detected; got DID 0x%02x from %s target %d.\n",
244+
device, adapter->name, dvo->target_addr);
245245
goto out;
246246
}
247247

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
198198

199199
struct i2c_msg msgs[] = {
200200
{
201-
.addr = dvo->slave_addr,
201+
.addr = dvo->target_addr,
202202
.flags = I2C_M_RD,
203203
.len = 0,
204204
},
@@ -209,7 +209,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
209209
.buf = out_buf,
210210
},
211211
{
212-
.addr = dvo->slave_addr,
212+
.addr = dvo->target_addr,
213213
.flags = I2C_M_RD | I2C_M_NOSTART,
214214
.len = 2,
215215
.buf = in_buf,
@@ -226,7 +226,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, u16 *data)
226226
if (!priv->quiet) {
227227
DRM_DEBUG_KMS("Unable to read register 0x%02x from "
228228
"%s:%02x.\n",
229-
addr, adapter->name, dvo->slave_addr);
229+
addr, adapter->name, dvo->target_addr);
230230
}
231231
return false;
232232
}
@@ -238,7 +238,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)
238238
struct i2c_adapter *adapter = dvo->i2c_bus;
239239
u8 out_buf[3];
240240
struct i2c_msg msg = {
241-
.addr = dvo->slave_addr,
241+
.addr = dvo->target_addr,
242242
.flags = 0,
243243
.len = 3,
244244
.buf = out_buf,
@@ -253,13 +253,13 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, u16 data)
253253

254254
if (!priv->quiet) {
255255
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d.\n",
256-
addr, adapter->name, dvo->slave_addr);
256+
addr, adapter->name, dvo->target_addr);
257257
}
258258

259259
return false;
260260
}
261261

262-
/* Probes the given bus and slave address for an ivch */
262+
/* Probes the given bus and target address for an ivch */
263263
static bool ivch_init(struct intel_dvo_device *dvo,
264264
struct i2c_adapter *adapter)
265265
{
@@ -283,10 +283,10 @@ static bool ivch_init(struct intel_dvo_device *dvo,
283283
* very unique, check that the value in the base address field matches
284284
* the address it's responding on.
285285
*/
286-
if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->slave_addr) {
286+
if ((temp & VR00_BASE_ADDRESS_MASK) != dvo->target_addr) {
287287
DRM_DEBUG_KMS("ivch detect failed due to address mismatch "
288288
"(%d vs %d)\n",
289-
(temp & VR00_BASE_ADDRESS_MASK), dvo->slave_addr);
289+
(temp & VR00_BASE_ADDRESS_MASK), dvo->target_addr);
290290
goto out;
291291
}
292292

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
398398

399399
struct i2c_msg msgs[] = {
400400
{
401-
.addr = dvo->slave_addr,
401+
.addr = dvo->target_addr,
402402
.flags = 0,
403403
.len = 1,
404404
.buf = out_buf,
405405
},
406406
{
407-
.addr = dvo->slave_addr,
407+
.addr = dvo->target_addr,
408408
.flags = I2C_M_RD,
409409
.len = 1,
410410
.buf = in_buf,
@@ -422,7 +422,7 @@ static bool ns2501_readb(struct intel_dvo_device *dvo, int addr, u8 *ch)
422422
if (!ns->quiet) {
423423
DRM_DEBUG_KMS
424424
("Unable to read register 0x%02x from %s:0x%02x.\n", addr,
425-
adapter->name, dvo->slave_addr);
425+
adapter->name, dvo->target_addr);
426426
}
427427

428428
return false;
@@ -441,7 +441,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
441441
u8 out_buf[2];
442442

443443
struct i2c_msg msg = {
444-
.addr = dvo->slave_addr,
444+
.addr = dvo->target_addr,
445445
.flags = 0,
446446
.len = 2,
447447
.buf = out_buf,
@@ -456,7 +456,7 @@ static bool ns2501_writeb(struct intel_dvo_device *dvo, int addr, u8 ch)
456456

457457
if (!ns->quiet) {
458458
DRM_DEBUG_KMS("Unable to write register 0x%02x to %s:%d\n",
459-
addr, adapter->name, dvo->slave_addr);
459+
addr, adapter->name, dvo->target_addr);
460460
}
461461

462462
return false;
@@ -487,17 +487,17 @@ static bool ns2501_init(struct intel_dvo_device *dvo,
487487
goto out;
488488

489489
if (ch != (NS2501_VID & 0xff)) {
490-
DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
491-
ch, adapter->name, dvo->slave_addr);
490+
DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Target %d.\n",
491+
ch, adapter->name, dvo->target_addr);
492492
goto out;
493493
}
494494

495495
if (!ns2501_readb(dvo, NS2501_DID_LO, &ch))
496496
goto out;
497497

498498
if (ch != (NS2501_DID & 0xff)) {
499-
DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Slave %d.\n",
500-
ch, adapter->name, dvo->slave_addr);
499+
DRM_DEBUG_KMS("ns2501 not detected got %d: from %s Target %d.\n",
500+
ch, adapter->name, dvo->target_addr);
501501
goto out;
502502
}
503503
ns->quiet = false;

0 commit comments

Comments
 (0)