Skip to content

Commit 2510037

Browse files
committed
Merge tag 'drm-intel-fixes-2022-09-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Revert a display patch around max DP source rate now that the proper WaEdpLinkRateDataReload is in place. (Ville) - Fix perf limit reasons bit position. (Ashutosh) - Fix unclaimmed mmio registers on suspend flow with GuC. (Umesh) - A vma_move_to_active fix for a regression with video decoding. (Nirmoy) - DP DSP fix. (Ankit) Signed-off-by: Dave Airlie <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 87d9862 + 8787f6f commit 2510037

File tree

6 files changed

+22
-40
lines changed

6 files changed

+22
-40
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,6 +1629,8 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
16291629
/* FIXME: initialize from VBT */
16301630
vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
16311631

1632+
vdsc_cfg->pic_height = crtc_state->hw.adjusted_mode.crtc_vdisplay;
1633+
16321634
ret = intel_dsc_compute_params(crtc_state);
16331635
if (ret)
16341636
return ret;

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

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -389,47 +389,21 @@ static int dg2_max_source_rate(struct intel_dp *intel_dp)
389389
return intel_dp_is_edp(intel_dp) ? 810000 : 1350000;
390390
}
391391

392-
static bool is_low_voltage_sku(struct drm_i915_private *i915, enum phy phy)
393-
{
394-
u32 voltage;
395-
396-
voltage = intel_de_read(i915, ICL_PORT_COMP_DW3(phy)) & VOLTAGE_INFO_MASK;
397-
398-
return voltage == VOLTAGE_INFO_0_85V;
399-
}
400-
401392
static int icl_max_source_rate(struct intel_dp *intel_dp)
402393
{
403394
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
404395
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
405396
enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port);
406397

407-
if (intel_phy_is_combo(dev_priv, phy) &&
408-
(is_low_voltage_sku(dev_priv, phy) || !intel_dp_is_edp(intel_dp)))
398+
if (intel_phy_is_combo(dev_priv, phy) && !intel_dp_is_edp(intel_dp))
409399
return 540000;
410400

411401
return 810000;
412402
}
413403

414404
static int ehl_max_source_rate(struct intel_dp *intel_dp)
415405
{
416-
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
417-
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
418-
enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port);
419-
420-
if (intel_dp_is_edp(intel_dp) || is_low_voltage_sku(dev_priv, phy))
421-
return 540000;
422-
423-
return 810000;
424-
}
425-
426-
static int dg1_max_source_rate(struct intel_dp *intel_dp)
427-
{
428-
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
429-
struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
430-
enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
431-
432-
if (intel_phy_is_combo(i915, phy) && is_low_voltage_sku(i915, phy))
406+
if (intel_dp_is_edp(intel_dp))
433407
return 540000;
434408

435409
return 810000;
@@ -491,7 +465,7 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)
491465
max_rate = dg2_max_source_rate(intel_dp);
492466
else if (IS_ALDERLAKE_P(dev_priv) || IS_ALDERLAKE_S(dev_priv) ||
493467
IS_DG1(dev_priv) || IS_ROCKETLAKE(dev_priv))
494-
max_rate = dg1_max_source_rate(intel_dp);
468+
max_rate = 810000;
495469
else if (IS_JSL_EHL(dev_priv))
496470
max_rate = ehl_max_source_rate(intel_dp);
497471
else
@@ -1395,6 +1369,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
13951369
* DP_DSC_RC_BUF_SIZE for this.
13961370
*/
13971371
vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
1372+
vdsc_cfg->pic_height = crtc_state->hw.adjusted_mode.crtc_vdisplay;
13981373

13991374
/*
14001375
* Slice Height of 8 works for all currently available panels. So start

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
460460
u8 i = 0;
461461

462462
vdsc_cfg->pic_width = pipe_config->hw.adjusted_mode.crtc_hdisplay;
463-
vdsc_cfg->pic_height = pipe_config->hw.adjusted_mode.crtc_vdisplay;
464463
vdsc_cfg->slice_width = DIV_ROUND_UP(vdsc_cfg->pic_width,
465464
pipe_config->dsc.slice_count);
466465

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
14381438
if (!guc_submission_initialized(guc))
14391439
return;
14401440

1441-
cancel_delayed_work(&guc->timestamp.work);
1441+
/*
1442+
* There is a race with suspend flow where the worker runs after suspend
1443+
* and causes an unclaimed register access warning. Cancel the worker
1444+
* synchronously here.
1445+
*/
1446+
cancel_delayed_work_sync(&guc->timestamp.work);
14421447

14431448
/*
14441449
* Before parking, we should sample engine busyness stats if we need to.

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,14 +1857,14 @@
18571857

18581858
#define GT0_PERF_LIMIT_REASONS _MMIO(0x1381a8)
18591859
#define GT0_PERF_LIMIT_REASONS_MASK 0xde3
1860-
#define PROCHOT_MASK REG_BIT(1)
1861-
#define THERMAL_LIMIT_MASK REG_BIT(2)
1862-
#define RATL_MASK REG_BIT(6)
1863-
#define VR_THERMALERT_MASK REG_BIT(7)
1864-
#define VR_TDC_MASK REG_BIT(8)
1865-
#define POWER_LIMIT_4_MASK REG_BIT(9)
1866-
#define POWER_LIMIT_1_MASK REG_BIT(11)
1867-
#define POWER_LIMIT_2_MASK REG_BIT(12)
1860+
#define PROCHOT_MASK REG_BIT(0)
1861+
#define THERMAL_LIMIT_MASK REG_BIT(1)
1862+
#define RATL_MASK REG_BIT(5)
1863+
#define VR_THERMALERT_MASK REG_BIT(6)
1864+
#define VR_TDC_MASK REG_BIT(7)
1865+
#define POWER_LIMIT_4_MASK REG_BIT(8)
1866+
#define POWER_LIMIT_1_MASK REG_BIT(10)
1867+
#define POWER_LIMIT_2_MASK REG_BIT(11)
18681868

18691869
#define CHV_CLK_CTL1 _MMIO(0x101100)
18701870
#define VLV_CLK_CTL2 _MMIO(0x101104)

drivers/gpu/drm/i915/i915_vma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,12 +1882,13 @@ int _i915_vma_move_to_active(struct i915_vma *vma,
18821882
enum dma_resv_usage usage;
18831883
int idx;
18841884

1885-
obj->read_domains = 0;
18861885
if (flags & EXEC_OBJECT_WRITE) {
18871886
usage = DMA_RESV_USAGE_WRITE;
18881887
obj->write_domain = I915_GEM_DOMAIN_RENDER;
1888+
obj->read_domains = 0;
18891889
} else {
18901890
usage = DMA_RESV_USAGE_READ;
1891+
obj->write_domain = 0;
18911892
}
18921893

18931894
dma_fence_array_for_each(curr, idx, fence)

0 commit comments

Comments
 (0)