Skip to content

Commit 38bc4ac

Browse files
committed
Merge tag 'drm-fixes-2022-06-24' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Fixes for this week, bit larger than normal, but I think the last couple have been quieter, and it's only rc4. There are a lot of small msm fixes, and a slightly larger set of vc4 fixes. The vc4 fixes clean up a lot of crashes around the rPI4 hardware differences from earlier ones, and problems in the page flip and modeset code which assumed earlier hw, so I thought it would be okay to keep them in. Otherwise, it's a few amdgpu, i915, sun4i and a panel quirk. amdgpu: - Adjust GTT size logic - eDP fix for RMB - DCN 3.15 fix - DP training fix - Color encoding fix for DCN2+ sun4i: - multiple suspend fixes vc4: - rework driver split for rpi4, fixes mulitple crashers. panel: - quirk for Aya Neo Next i915: - Revert low voltage SKU check removal to fix display issues - Apply PLL DCO fraction workaround for ADL-S - Don't show engine classes not present in client fdinfo msm: - Workaround for parade DSI bridge power sequencing - Fix for multi-planar YUV format offsets - Limiting WB modes to max sspp linewidth - Fixing the supported rotations to add 180 back for IGT - Fix to handle pm_runtime_get_sync() errors to avoid unclocked access in the bind() path for dpu driver - Fix the irq_free() without request issue which was a being hit frequently in CI. - Fix to add minimum ICC vote in the msm_mdss pm_resume path to address bootup splats - Fix to avoid dereferencing without checking in WB encoder - Fix to avoid crash during suspend in DP driver by ensuring interrupt mask bits are updated - Remove unused code from dpu_encoder_virt_atomic_check() - Fix to remove redundant init of dsc variable - Fix to ensure mmap offset is initialized to avoid memory corruption from unpin/evict - Fix double runpm disable in probe-defer path - VMA fenced-unpin fixes - Fix for WB max-width - Fix for rare dp resolution change issue" * tag 'drm-fixes-2022-06-24' of git://anongit.freedesktop.org/drm/drm: (41 commits) amd/display/dc: Fix COLOR_ENCODING and COLOR_RANGE doing nothing for DCN20+ drm/amd/display: Fix typo in override_lane_settings drm/amd/display: Fix DC warning at driver load drm/amd: Revert "drm/amd/display: keep eDP Vdd on when eDP stream is already enabled" drm/amdgpu: Adjust logic around GTT size (v3) drm/sun4i: Return if frontend is not present drm/vc4: fix error code in vc4_check_tex_size() drm/sun4i: Add DMA mask and segment size drm/vc4: hdmi: Fixed possible integer overflow drm/i915/display: Re-add check for low voltage sku for max dp source rate drm/i915/fdinfo: Don't show engine classes not present drm/i915: Implement w/a 22010492432 for adl-s drm: panel-orientation-quirks: Add quirk for Aya Neo Next drm/msm/dp: force link training for display resolution change drm/msm/dpu: limit wb modes based on max_mixer_width drm/msm/dp: check core_initialized before disable interrupts at dp_display_unbind() drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf drm/msm: Don't overwrite hw fence in hw_init drm/msm: Drop update_fences() drm/vc4: Warn if some v3d code is run on BCM2711 ...
2 parents cbe232a + 1e9124d commit 38bc4ac

Some content is hidden

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

47 files changed

+670
-268
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,18 +1798,26 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
17981798
DRM_INFO("amdgpu: %uM of VRAM memory ready\n",
17991799
(unsigned) (adev->gmc.real_vram_size / (1024 * 1024)));
18001800

1801-
/* Compute GTT size, either bsaed on 3/4th the size of RAM size
1801+
/* Compute GTT size, either based on 1/2 the size of RAM size
18021802
* or whatever the user passed on module init */
18031803
if (amdgpu_gtt_size == -1) {
18041804
struct sysinfo si;
18051805

18061806
si_meminfo(&si);
1807-
gtt_size = min(max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
1808-
adev->gmc.mc_vram_size),
1809-
((uint64_t)si.totalram * si.mem_unit * 3/4));
1810-
}
1811-
else
1807+
/* Certain GL unit tests for large textures can cause problems
1808+
* with the OOM killer since there is no way to link this memory
1809+
* to a process. This was originally mitigated (but not necessarily
1810+
* eliminated) by limiting the GTT size. The problem is this limit
1811+
* is often too low for many modern games so just make the limit 1/2
1812+
* of system memory which aligns with TTM. The OOM accounting needs
1813+
* to be addressed, but we shouldn't prevent common 3D applications
1814+
* from being usable just to potentially mitigate that corner case.
1815+
*/
1816+
gtt_size = max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
1817+
(u64)si.totalram * si.mem_unit / 2);
1818+
} else {
18121819
gtt_size = (uint64_t)amdgpu_gtt_size << 20;
1820+
}
18131821

18141822
/* Initialize GTT memory pool */
18151823
r = amdgpu_gtt_mgr_init(adev, gtt_size);

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ static void dcn315_clk_mgr_helper_populate_bw_params(
550550
if (!bw_params->clk_table.entries[i].dtbclk_mhz)
551551
bw_params->clk_table.entries[i].dtbclk_mhz = def_max.dtbclk_mhz;
552552
}
553-
ASSERT(bw_params->clk_table.entries[i].dcfclk_mhz);
553+
ASSERT(bw_params->clk_table.entries[i-1].dcfclk_mhz);
554554
bw_params->vram_type = bios_info->memory_type;
555555
bw_params->num_channels = bios_info->ma_channel_number;
556556
if (!bw_params->num_channels)

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ static void override_lane_settings(const struct link_training_settings *lt_setti
944944

945945
return;
946946

947-
for (lane = 1; lane < LANE_COUNT_DP_MAX; lane++) {
947+
for (lane = 0; lane < LANE_COUNT_DP_MAX; lane++) {
948948
if (lt_settings->voltage_swing)
949949
lane_settings[lane].VOLTAGE_SWING = *lt_settings->voltage_swing;
950950
if (lt_settings->pre_emphasis)

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,29 +1766,9 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
17661766
break;
17671767
}
17681768
}
1769-
1770-
/*
1771-
* TO-DO: So far the code logic below only addresses single eDP case.
1772-
* For dual eDP case, there are a few things that need to be
1773-
* implemented first:
1774-
*
1775-
* 1. Change the fastboot logic above, so eDP link[0 or 1]'s
1776-
* stream[0 or 1] will all be checked.
1777-
*
1778-
* 2. Change keep_edp_vdd_on to an array, and maintain keep_edp_vdd_on
1779-
* for each eDP.
1780-
*
1781-
* Once above 2 things are completed, we can then change the logic below
1782-
* correspondingly, so dual eDP case will be fully covered.
1783-
*/
1784-
1785-
// We are trying to enable eDP, don't power down VDD if eDP stream is existing
1786-
if ((edp_stream_num == 1 && edp_streams[0] != NULL) || can_apply_edp_fast_boot) {
1769+
// We are trying to enable eDP, don't power down VDD
1770+
if (can_apply_edp_fast_boot)
17871771
keep_edp_vdd_on = true;
1788-
DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd on\n");
1789-
} else {
1790-
DC_LOG_EVENT_LINK_TRAINING("No eDP stream enabled, turn eDP Vdd off\n");
1791-
}
17921772
}
17931773

17941774
// Check seamless boot support

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ static void dpp2_cnv_setup (
212212
break;
213213
}
214214

215+
/* Set default color space based on format if none is given. */
216+
color_space = input_color_space ? input_color_space : color_space;
217+
215218
if (is_2bit == 1 && alpha_2bit_lut != NULL) {
216219
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
217220
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);

drivers/gpu/drm/amd/display/dc/dcn201/dcn201_dpp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ static void dpp201_cnv_setup(
153153
break;
154154
}
155155

156+
/* Set default color space based on format if none is given. */
157+
color_space = input_color_space ? input_color_space : color_space;
158+
156159
if (is_2bit == 1 && alpha_2bit_lut != NULL) {
157160
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
158161
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ static void dpp3_cnv_setup (
294294
break;
295295
}
296296

297+
/* Set default color space based on format if none is given. */
298+
color_space = input_color_space ? input_color_space : color_space;
299+
297300
if (is_2bit == 1 && alpha_2bit_lut != NULL) {
298301
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT0, alpha_2bit_lut->lut0);
299302
REG_UPDATE(ALPHA_2BIT_LUT, ALPHA_2BIT_LUT1, alpha_2bit_lut->lut1);

drivers/gpu/drm/drm_panel_orientation_quirks.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ static const struct dmi_system_id orientation_data[] = {
152152
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AYA NEO 2021"),
153153
},
154154
.driver_data = (void *)&lcd800x1280_rightside_up,
155+
}, { /* AYA NEO NEXT */
156+
.matches = {
157+
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
158+
DMI_MATCH(DMI_BOARD_NAME, "NEXT"),
159+
},
160+
.driver_data = (void *)&lcd800x1280_rightside_up,
155161
}, { /* Chuwi HiBook (CWI514) */
156162
.matches = {
157163
DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),

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

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

391+
static bool is_low_voltage_sku(struct drm_i915_private *i915, enum phy phy)
392+
{
393+
u32 voltage;
394+
395+
voltage = intel_de_read(i915, ICL_PORT_COMP_DW3(phy)) & VOLTAGE_INFO_MASK;
396+
397+
return voltage == VOLTAGE_INFO_0_85V;
398+
}
399+
391400
static int icl_max_source_rate(struct intel_dp *intel_dp)
392401
{
393402
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
394403
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
395404
enum phy phy = intel_port_to_phy(dev_priv, dig_port->base.port);
396405

397-
if (intel_phy_is_combo(dev_priv, phy) && !intel_dp_is_edp(intel_dp))
406+
if (intel_phy_is_combo(dev_priv, phy) &&
407+
(is_low_voltage_sku(dev_priv, phy) || !intel_dp_is_edp(intel_dp)))
398408
return 540000;
399409

400410
return 810000;
401411
}
402412

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

408434
return 810000;
@@ -445,7 +471,7 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)
445471
max_rate = dg2_max_source_rate(intel_dp);
446472
else if (IS_ALDERLAKE_P(dev_priv) || IS_ALDERLAKE_S(dev_priv) ||
447473
IS_DG1(dev_priv) || IS_ROCKETLAKE(dev_priv))
448-
max_rate = 810000;
474+
max_rate = dg1_max_source_rate(intel_dp);
449475
else if (IS_JSL_EHL(dev_priv))
450476
max_rate = ehl_max_source_rate(intel_dp);
451477
else

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,15 +2396,15 @@ static void icl_wrpll_params_populate(struct skl_wrpll_params *params,
23962396
}
23972397

23982398
/*
2399-
* Display WA #22010492432: ehl, tgl, adl-p
2399+
* Display WA #22010492432: ehl, tgl, adl-s, adl-p
24002400
* Program half of the nominal DCO divider fraction value.
24012401
*/
24022402
static bool
24032403
ehl_combo_pll_div_frac_wa_needed(struct drm_i915_private *i915)
24042404
{
24052405
return ((IS_PLATFORM(i915, INTEL_ELKHARTLAKE) &&
24062406
IS_JSL_EHL_DISPLAY_STEP(i915, STEP_B0, STEP_FOREVER)) ||
2407-
IS_TIGERLAKE(i915) || IS_ALDERLAKE_P(i915)) &&
2407+
IS_TIGERLAKE(i915) || IS_ALDERLAKE_S(i915) || IS_ALDERLAKE_P(i915)) &&
24082408
i915->dpll.ref_clks.nssc == 38400;
24092409
}
24102410

0 commit comments

Comments
 (0)