Skip to content

Commit e6fac3c

Browse files
committed
Merge tag 'drm-fixes-2024-03-08' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Regular fixes (two weeks for i915), scattered across drivers, amdgpu and i915 being the main ones, with nouveau having a couple of fixes. One patch got applied for udl, but reverted soon after as the maintainer has missed some crucial prior discussion. Seems quiet and normal enough for this stage. MAINTAINERS - update email address core: - fix polling in certain configurations buddy: - fix kunit test warning panel: - boe-tv101wum-nl6: timing tuning fixes i915: - Fix to extract HDCP information from primary connector - Check for NULL mmu_interval_notifier before removing - Fix for #10184: Kernel crash on UHD Graphics 730 (Cc stable) - Fix for #10284: Boot delay regresion with PSR - Fix DP connector DSC HW state readout - Selftest fix to convert msecs to jiffies xe: - error path fix amdgpu: - SMU14 fix - Fix possible NULL pointer - VRR fix - pwm fix nouveau: - fix deadlock in new ioctls fail path - fix missing locking around object rbtree udl: - apply and revert format change" * tag 'drm-fixes-2024-03-08' of https://gitlab.freedesktop.org/drm/kernel: (21 commits) nouveau: lock the client object tree. drm/tests/buddy: fix print format drm/xe: Return immediately on tile_init failure drm/amdgpu/pm: Fix the error of pwm1_enable setting drm/amd/display: handle range offsets in VRR ranges drm/amd/display: check dc_link before dereferencing drm/amd/swsmu: modify the gfx activity scaling Revert "drm/udl: Add ARGB8888 as a format" drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector() drm/i915/dp: Fix connector DSC HW state readout drm/i915/selftests: Fix dependency of some timeouts on HZ drm/udl: Add ARGB8888 as a format drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf drm/i915: Don't explode when the dig port we don't have an AUX CH MAINTAINERS: Update email address for Tvrtko Ursulin drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP (again) drm: Fix output poll work for drm_kms_helper_poll=n drm/i915: Check before removing mm notifier drm/i915/hdcp: Extract hdcp structure from correct connector drm/i915/hdcp: Remove additional timing for reading mst hdcp message ...
2 parents 3aaa8ce + b7cc4ff commit e6fac3c

24 files changed

+141
-74
lines changed

.mailmap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,11 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
610610
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
611611
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
612612
Tudor Ambarus <tudor.ambarus@linaro.org> <tudor.ambarus@microchip.com>
613+
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@intel.com>
614+
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@linux.intel.com>
615+
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@sophos.com>
616+
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko.ursulin@onelan.co.uk>
617+
Tvrtko Ursulin <tursulin@ursulin.net> <tvrtko@ursulin.net>
613618
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
614619
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
615620
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10735,7 +10735,7 @@ INTEL DRM I915 DRIVER (Meteor Lake, DG2 and older excluding Poulsbo, Moorestown
1073510735
M: Jani Nikula <jani.nikula@linux.intel.com>
1073610736
M: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1073710737
M: Rodrigo Vivi <rodrigo.vivi@intel.com>
10738-
M: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
10738+
M: Tvrtko Ursulin <tursulin@ursulin.net>
1073910739
L: intel-gfx@lists.freedesktop.org
1074010740
S: Supported
1074110741
W: https://drm.pages.freedesktop.org/intel-docs/

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6539,7 +6539,7 @@ static void amdgpu_dm_connector_funcs_force(struct drm_connector *connector)
65396539
struct edid *edid;
65406540
struct i2c_adapter *ddc;
65416541

6542-
if (dc_link->aux_mode)
6542+
if (dc_link && dc_link->aux_mode)
65436543
ddc = &aconnector->dm_dp_aux.aux.ddc;
65446544
else
65456545
ddc = &aconnector->i2c->base;
@@ -11169,14 +11169,23 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
1116911169
if (range->flags != 1)
1117011170
continue;
1117111171

11172-
amdgpu_dm_connector->min_vfreq = range->min_vfreq;
11173-
amdgpu_dm_connector->max_vfreq = range->max_vfreq;
11174-
amdgpu_dm_connector->pixel_clock_mhz =
11175-
range->pixel_clock_mhz * 10;
11176-
1117711172
connector->display_info.monitor_range.min_vfreq = range->min_vfreq;
1117811173
connector->display_info.monitor_range.max_vfreq = range->max_vfreq;
1117911174

11175+
if (edid->revision >= 4) {
11176+
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MIN_VFREQ)
11177+
connector->display_info.monitor_range.min_vfreq += 255;
11178+
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MAX_VFREQ)
11179+
connector->display_info.monitor_range.max_vfreq += 255;
11180+
}
11181+
11182+
amdgpu_dm_connector->min_vfreq =
11183+
connector->display_info.monitor_range.min_vfreq;
11184+
amdgpu_dm_connector->max_vfreq =
11185+
connector->display_info.monitor_range.max_vfreq;
11186+
amdgpu_dm_connector->pixel_clock_mhz =
11187+
range->pixel_clock_mhz * 10;
11188+
1118011189
break;
1118111190
}
1118211191

drivers/gpu/drm/amd/pm/amdgpu_pm.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,6 +2558,7 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev,
25582558
{
25592559
struct amdgpu_device *adev = dev_get_drvdata(dev);
25602560
int err, ret;
2561+
u32 pwm_mode;
25612562
int value;
25622563

25632564
if (amdgpu_in_reset(adev))
@@ -2569,13 +2570,22 @@ static ssize_t amdgpu_hwmon_set_pwm1_enable(struct device *dev,
25692570
if (err)
25702571
return err;
25712572

2573+
if (value == 0)
2574+
pwm_mode = AMD_FAN_CTRL_NONE;
2575+
else if (value == 1)
2576+
pwm_mode = AMD_FAN_CTRL_MANUAL;
2577+
else if (value == 2)
2578+
pwm_mode = AMD_FAN_CTRL_AUTO;
2579+
else
2580+
return -EINVAL;
2581+
25722582
ret = pm_runtime_get_sync(adev_to_drm(adev)->dev);
25732583
if (ret < 0) {
25742584
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
25752585
return ret;
25762586
}
25772587

2578-
ret = amdgpu_dpm_set_fan_control_mode(adev, value);
2588+
ret = amdgpu_dpm_set_fan_control_mode(adev, pwm_mode);
25792589

25802590
pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
25812591
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ int smu_v14_0_check_fw_version(struct smu_context *smu)
229229
smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_2;
230230
break;
231231
case IP_VERSION(14, 0, 0):
232-
if ((smu->smc_fw_version < 0x5d3a00))
233-
dev_warn(smu->adev->dev, "The PMFW version(%x) is behind in this BIOS!\n", smu->smc_fw_version);
234232
smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
235233
break;
236234
default:

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ static int smu_v14_0_0_get_smu_metrics_data(struct smu_context *smu,
261261
*value = metrics->MpipuclkFrequency;
262262
break;
263263
case METRICS_AVERAGE_GFXACTIVITY:
264-
*value = metrics->GfxActivity / 100;
264+
if ((smu->smc_fw_version > 0x5d4600))
265+
*value = metrics->GfxActivity;
266+
else
267+
*value = metrics->GfxActivity / 100;
265268
break;
266269
case METRICS_AVERAGE_VCNACTIVITY:
267270
*value = metrics->VcnActivity / 100;

drivers/gpu/drm/drm_probe_helper.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,11 @@ static void output_poll_execute(struct work_struct *work)
760760
changed = dev->mode_config.delayed_event;
761761
dev->mode_config.delayed_event = false;
762762

763-
if (!drm_kms_helper_poll && dev->mode_config.poll_running) {
764-
drm_kms_helper_disable_hpd(dev);
765-
dev->mode_config.poll_running = false;
763+
if (!drm_kms_helper_poll) {
764+
if (dev->mode_config.poll_running) {
765+
drm_kms_helper_disable_hpd(dev);
766+
dev->mode_config.poll_running = false;
767+
}
766768
goto out;
767769
}
768770

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,14 @@ static enum phy icl_aux_pw_to_phy(struct drm_i915_private *i915,
246246
enum aux_ch aux_ch = icl_aux_pw_to_ch(power_well);
247247
struct intel_digital_port *dig_port = aux_ch_to_digital_port(i915, aux_ch);
248248

249-
return intel_port_to_phy(i915, dig_port->base.port);
249+
/*
250+
* FIXME should we care about the (VBT defined) dig_port->aux_ch
251+
* relationship or should this be purely defined by the hardware layout?
252+
* Currently if the port doesn't appear in the VBT, or if it's declared
253+
* as HDMI-only and routed to a combo PHY, the encoder either won't be
254+
* present at all or it will not have an aux_ch assigned.
255+
*/
256+
return dig_port ? intel_port_to_phy(i915, dig_port->base.port) : PHY_NONE;
250257
}
251258

252259
static void hsw_wait_for_power_well_enable(struct drm_i915_private *dev_priv,
@@ -414,7 +421,8 @@ icl_combo_phy_aux_power_well_enable(struct drm_i915_private *dev_priv,
414421

415422
intel_de_rmw(dev_priv, regs->driver, 0, HSW_PWR_WELL_CTL_REQ(pw_idx));
416423

417-
if (DISPLAY_VER(dev_priv) < 12)
424+
/* FIXME this is a mess */
425+
if (phy != PHY_NONE)
418426
intel_de_rmw(dev_priv, ICL_PORT_CL_DW12(phy),
419427
0, ICL_LANE_ENABLE_AUX);
420428

@@ -437,7 +445,10 @@ icl_combo_phy_aux_power_well_disable(struct drm_i915_private *dev_priv,
437445

438446
drm_WARN_ON(&dev_priv->drm, !IS_ICELAKE(dev_priv));
439447

440-
intel_de_rmw(dev_priv, ICL_PORT_CL_DW12(phy), ICL_LANE_ENABLE_AUX, 0);
448+
/* FIXME this is a mess */
449+
if (phy != PHY_NONE)
450+
intel_de_rmw(dev_priv, ICL_PORT_CL_DW12(phy),
451+
ICL_LANE_ENABLE_AUX, 0);
441452

442453
intel_de_rmw(dev_priv, regs->driver, HSW_PWR_WELL_CTL_REQ(pw_idx), 0);
443454

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,13 @@ struct intel_connector {
609609
* and active (i.e. dpms ON state). */
610610
bool (*get_hw_state)(struct intel_connector *);
611611

612+
/*
613+
* Optional hook called during init/resume to sync any state
614+
* stored in the connector (eg. DSC state) wrt. the HW state.
615+
*/
616+
void (*sync_state)(struct intel_connector *connector,
617+
const struct intel_crtc_state *crtc_state);
618+
612619
/* Panel info for eDP and LVDS */
613620
struct intel_panel panel;
614621

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5699,6 +5699,9 @@ intel_dp_detect(struct drm_connector *connector,
56995699
goto out;
57005700
}
57015701

5702+
if (!intel_dp_is_edp(intel_dp))
5703+
intel_psr_init_dpcd(intel_dp);
5704+
57025705
intel_dp_detect_dsc_caps(intel_dp, intel_connector);
57035706

57045707
intel_dp_configure_mst(intel_dp);
@@ -5859,6 +5862,19 @@ intel_dp_connector_unregister(struct drm_connector *connector)
58595862
intel_connector_unregister(connector);
58605863
}
58615864

5865+
void intel_dp_connector_sync_state(struct intel_connector *connector,
5866+
const struct intel_crtc_state *crtc_state)
5867+
{
5868+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
5869+
5870+
if (crtc_state && crtc_state->dsc.compression_enable) {
5871+
drm_WARN_ON(&i915->drm, !connector->dp.dsc_decompression_aux);
5872+
connector->dp.dsc_decompression_enabled = true;
5873+
} else {
5874+
connector->dp.dsc_decompression_enabled = false;
5875+
}
5876+
}
5877+
58625878
void intel_dp_encoder_flush_work(struct drm_encoder *encoder)
58635879
{
58645880
struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder));

0 commit comments

Comments
 (0)