History

Merge tag 'drm-fixes-2023-03-24' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Daniel Vetter: - usual pile of fixes for amdgpu & i915 - probe error handling fixes for meson, lt8912b bridge - the host1x patch from Arnd - panel-orientation fix for Lenovo Book X90F * tag 'drm-fixes-2023-03-24' of git://anongit.freedesktop.org/drm/drm: (23 commits) gpu: host1x: fix uninitialized variable use drm/amd/display: Set dcn32 caps.seamless_odm drm/amd/display: fix wrong index used in dccg32_set_dpstreamclk drm/amdgpu/nv: Apply ASPM quirk on Intel ADL + AMD Navi drm/amd/display: remove outdated 8bpc comments drm/amdgpu/gfx: set cg flags to enter/exit safe mode drm/amdgpu: Force signal hw_fences that are embedded in non-sched jobs drm/amdgpu: add mes resume when do gfx post soft reset drm/amdgpu: skip ASIC reset for APUs when go to S4 drm/amdgpu: reposition the gpu reset checking for reuse drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not found drm/meson: fix missing component unbind on bind errors drm: panel-orientation-quirks: Add quirk for Lenovo Yoga Book X90F Revert "drm/i915/hwmon: Enable PL1 power limit" drm/i915: Update vblank timestamping stuff on seamless M/N change drm/i915: Fix format for perf_limit_reasons drm/i915/gt: perform uc late init after probe error injection drm/i915/active: Fix missing debug object activation drm/i915/guc: Fix missing ecodes drm/i915/mtl: Disable MC6 for MTL A step ...

Linus Torvalds committed 3 years ago

Commit 37154c12 parents 5ad4fe9 08570b727 files · +180 −123Browse files

Unified · Split

27 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 −2
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +23 −18
  3. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +15 −0
  4. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 −1
  5. drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +9 −0
  6. drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +14 −0
  7. drivers/gpu/drm/amd/amdgpu/nv.c +1 −1
  8. drivers/gpu/drm/amd/amdgpu/vi.c +1 −16
  9. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 −1
  10. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c +1 −2
  11. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +1 −0
  12. drivers/gpu/drm/bridge/lontium-lt8912b.c +2 −2
  13. drivers/gpu/drm/drm_panel_orientation_quirks.c +10 −3
  14. drivers/gpu/drm/i915/display/intel_crtc.c +8 −0
  15. drivers/gpu/drm/i915/display/intel_display.c +1 −0
  16. drivers/gpu/drm/i915/display/intel_dmc.c +21 −5
  17. drivers/gpu/drm/i915/display/intel_fbdev.c +18 −6
  18. drivers/gpu/drm/i915/gt/intel_gt.c +2 −2
  19. drivers/gpu/drm/i915/gt/intel_gt_pm.c +0 −27
  20. drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c +1 −1
  21. drivers/gpu/drm/i915/gt/intel_rc6.c +8 −0
  22. drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +22 −0
  23. drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c +1 −12
  24. drivers/gpu/drm/i915/i915_active.c +1 −2
  25. drivers/gpu/drm/i915/i915_hwmon.c +0 −5
  26. drivers/gpu/drm/i915/i915_reg.h +5 −12
  27. drivers/gpu/drm/meson/meson_drv.c +8 −5
drivers/gpu/drm/amd/amdgpu/amdgpu.h+3−2
@@ -1272,6 +1272,7 @@ void amdgpu_device_pci_config_reset(struct amdgpu_device *adev); · 1271 unmodified lines
12721272 int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12731273 bool amdgpu_device_need_post(struct amdgpu_device *adev);
12741274 bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
1275+bool amdgpu_device_aspm_support_quirk(void);
12751276
12761277 void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes,
12771278 u64 num_vis_bytes);
@@ -1391,10 +1392,12 @@ int amdgpu_acpi_smart_shift_update(struct drm_device *dev, enum amdgpu_ss ss_sta · 113 unmodified lines
13911392 int amdgpu_acpi_pcie_notify_device_ready(struct amdgpu_device *adev);
13921393
13931394 void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps);
1395+bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev);
13941396 void amdgpu_acpi_detect(void);
13951397 #else
13961398 static inline int amdgpu_acpi_init(struct amdgpu_device *adev) { return 0; }
13971399 static inline void amdgpu_acpi_fini(struct amdgpu_device *adev) { }
1400+static inline bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) { return false; }
13981401 static inline void amdgpu_acpi_detect(void) { }
13991402 static inline bool amdgpu_acpi_is_power_shift_control_supported(void) { return false; }
14001403 static inline int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
@@ -1405,11 +1408,9 @@ static inline int amdgpu_acpi_smart_shift_update(struct drm_device *dev, · 4 unmodified lines
14051408
14061409 #if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
14071410 bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev);
1408−bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev);
14091411 bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev);
14101412 #else
14111413 static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; }
1412−static inline bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) { return false; }
14131414 static inline bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) { return false; }
14141415 #endif
14151416
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+23−18
@@ -971,6 +971,29 @@ static bool amdgpu_atcs_pci_probe_handle(struct pci_dev *pdev) · 970 unmodified lines
971971 return true;
972972 }
973973
974+
975+/**
976+ * amdgpu_acpi_should_gpu_reset
977+ *
978+ * @adev: amdgpu_device_pointer
979+ *
980+ * returns true if should reset GPU, false if not
981+ */
982+bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
983+{
984+ if (adev->flags & AMD_IS_APU)
985+ return false;
986+
987+ if (amdgpu_sriov_vf(adev))
988+ return false;
989+
990+#if IS_ENABLED(CONFIG_SUSPEND)
991+ return pm_suspend_target_state != PM_SUSPEND_TO_IDLE;
992+#else
993+ return true;
994+#endif
995+}
996+
974997 /*
975998 * amdgpu_acpi_detect - detect ACPI ATIF/ATCS methods
976999 *
@@ -1042,24 +1065,6 @@ bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) · 65 unmodified lines
10421065 (pm_suspend_target_state == PM_SUSPEND_MEM);
10431066 }
10441067
1045−/**
1046− * amdgpu_acpi_should_gpu_reset
1047− *
1048− * @adev: amdgpu_device_pointer
1049− *
1050− * returns true if should reset GPU, false if not
1051− */
1052−bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
1053−{
1054− if (adev->flags & AMD_IS_APU)
1055− return false;
1056−
1057− if (amdgpu_sriov_vf(adev))
1058− return false;
1059−
1060− return pm_suspend_target_state != PM_SUSPEND_TO_IDLE;
1061−}
1062−
10631068 /**
10641069 * amdgpu_acpi_is_s0ix_active
10651070 *
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+15−0
@@ -80,6 +80,10 @@ · 79 unmodified lines
8080
8181 #include <drm/drm_drv.h>
8282
83+#if IS_ENABLED(CONFIG_X86)
84+#include <asm/intel-family.h>
85+#endif
86+
8387 MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin");
8488 MODULE_FIRMWARE("amdgpu/vega12_gpu_info.bin");
8589 MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin");
@@ -1356,6 +1360,17 @@ bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev) · 1270 unmodified lines
13561360 return pcie_aspm_enabled(adev->pdev);
13571361 }
13581362
1363+bool amdgpu_device_aspm_support_quirk(void)
1364+{
1365+#if IS_ENABLED(CONFIG_X86)
1366+ struct cpuinfo_x86 *c = &cpu_data(0);
1367+
1368+ return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
1369+#else
1370+ return true;
1371+#endif
1372+}
1373+
13591374 /* if we get transitioned to only one device, take VGA back */
13601375 /**
13611376 * amdgpu_device_vga_set_decode - enable/disable vga decode
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+4−1
@@ -2467,7 +2467,10 @@ static int amdgpu_pmops_freeze(struct device *dev) · 2466 unmodified lines
24672467 adev->in_s4 = false;
24682468 if (r)
24692469 return r;
2470− return amdgpu_asic_reset(adev);
2470+
2471+ if (amdgpu_acpi_should_gpu_reset(adev))
2472+ return amdgpu_asic_reset(adev);
2473+ return 0;
24712474 }
24722475
24732476 static int amdgpu_pmops_thaw(struct device *dev)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c+9−0
@@ -678,6 +678,15 @@ void amdgpu_fence_driver_clear_job_fences(struct amdgpu_ring *ring) · 677 unmodified lines
678678 ptr = &ring->fence_drv.fences[i];
679679 old = rcu_dereference_protected(*ptr, 1);
680680 if (old && old->ops == &amdgpu_job_fence_ops) {
681+ struct amdgpu_job *job;
682+
683+ /* For non-scheduler bad job, i.e. failed ib test, we need to signal
684+ * it right here or we won't be able to track them in fence_drv
685+ * and they will remain unsignaled during sa_bo free.
686+ */
687+ job = container_of(old, struct amdgpu_job, hw_fence);
688+ if (!job->base.s_fence && !dma_fence_is_signaled(old))
689+ dma_fence_signal(old);
681690 RCU_INIT_POINTER(*ptr, NULL);
682691 dma_fence_put(old);
683692 }
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+14−0
@@ -1287,6 +1287,11 @@ static int gfx_v11_0_sw_init(void *handle) · 1286 unmodified lines
12871287 break;
12881288 }
12891289
1290+ /* Enable CG flag in one VF mode for enabling RLC safe mode enter/exit */
1291+ if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(11, 0, 3) &&
1292+ amdgpu_sriov_is_pp_one_vf(adev))
1293+ adev->cg_flags = AMD_CG_SUPPORT_GFX_CGCG;
1294+
12901295 /* EOP Event */
12911296 r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP,
12921297 GFX_11_0_0__SRCID__CP_EOP_INTERRUPT,
@@ -4655,6 +4660,14 @@ static bool gfx_v11_0_check_soft_reset(void *handle) · 3362 unmodified lines
46554660 return false;
46564661 }
46574662
4663+static int gfx_v11_0_post_soft_reset(void *handle)
4664+{
4665+ /**
4666+ * GFX soft reset will impact MES, need resume MES when do GFX soft reset
4667+ */
4668+ return amdgpu_mes_resume((struct amdgpu_device *)handle);
4669+}
4670+
46584671 static uint64_t gfx_v11_0_get_gpu_clock_counter(struct amdgpu_device *adev)
46594672 {
46604673 uint64_t clock;
@@ -6166,6 +6179,7 @@ static const struct amd_ip_funcs gfx_v11_0_ip_funcs = { · 1505 unmodified lines
61666179 .wait_for_idle = gfx_v11_0_wait_for_idle,
61676180 .soft_reset = gfx_v11_0_soft_reset,
61686181 .check_soft_reset = gfx_v11_0_check_soft_reset,
6182+ .post_soft_reset = gfx_v11_0_post_soft_reset,
61696183 .set_clockgating_state = gfx_v11_0_set_clockgating_state,
61706184 .set_powergating_state = gfx_v11_0_set_powergating_state,
61716185 .get_clockgating_state = gfx_v11_0_get_clockgating_state,
drivers/gpu/drm/amd/amdgpu/nv.c+1−1
@@ -578,7 +578,7 @@ static void nv_pcie_gen3_enable(struct amdgpu_device *adev) · 577 unmodified lines
578578
579579 static void nv_program_aspm(struct amdgpu_device *adev)
580580 {
581− if (!amdgpu_device_should_use_aspm(adev))
581+ if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_aspm_support_quirk())
582582 return;
583583
584584 if (!(adev->flags & AMD_IS_APU) &&
drivers/gpu/drm/amd/amdgpu/vi.c+1−16
@@ -81,10 +81,6 @@ · 80 unmodified lines
8181 #include "mxgpu_vi.h"
8282 #include "amdgpu_dm.h"
8383
84−#if IS_ENABLED(CONFIG_X86)
85−#include <asm/intel-family.h>
86−#endif
87−
8884 #define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6
8985 #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L
9086 #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 0x00000002L
@@ -1138,24 +1134,13 @@ static void vi_enable_aspm(struct amdgpu_device *adev) · 1047 unmodified lines
11381134 WREG32_PCIE(ixPCIE_LC_CNTL, data);
11391135 }
11401136
1141−static bool aspm_support_quirk_check(void)
1142−{
1143−#if IS_ENABLED(CONFIG_X86)
1144− struct cpuinfo_x86 *c = &cpu_data(0);
1145−
1146− return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE);
1147−#else
1148− return true;
1149−#endif
1150−}
1151−
11521137 static void vi_program_aspm(struct amdgpu_device *adev)
11531138 {
11541139 u32 data, data1, orig;
11551140 bool bL1SS = false;
11561141 bool bClkReqSupport = true;
11571142
1158− if (!amdgpu_device_should_use_aspm(adev) || !aspm_support_quirk_check())
1143+ if (!amdgpu_device_should_use_aspm(adev) || !amdgpu_device_aspm_support_quirk())
11591144 return;
11601145
11611146 if (adev->flags & AMD_IS_APU ||
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+0−1
@@ -7244,7 +7244,6 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, · 7243 unmodified lines
72447244 if (!aconnector->mst_root)
72457245 drm_connector_attach_max_bpc_property(&aconnector->base, 8, 16);
72467246
7247− /* This defaults to the max in the range, but we want 8bpc for non-edp. */
72487247 aconnector->base.state->max_bpc = 16;
72497248 aconnector->base.state->max_requested_bpc = aconnector->base.state->max_bpc;
72507249
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c+1−2
@@ -271,8 +271,7 @@ static void dccg32_set_dpstreamclk( · 270 unmodified lines
271271 dccg32_set_dtbclk_p_src(dccg, src, otg_inst);
272272
273273 /* enabled to select one of the DTBCLKs for pipe */
274− switch (otg_inst)
275− {
274+ switch (dp_hpo_inst) {
276275 case 0:
277276 REG_UPDATE_2(DPSTREAMCLK_CNTL,
278277 DPSTREAMCLK0_EN,
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c+1−0
@@ -2186,6 +2186,7 @@ static bool dcn32_resource_construct( · 2185 unmodified lines
21862186 dc->caps.edp_dsc_support = true;
21872187 dc->caps.extended_aux_timeout_support = true;
21882188 dc->caps.dmcub_support = true;
2189+ dc->caps.seamless_odm = true;
21892190
21902191 /* Color pipeline capabilities */
21912192 dc->caps.color.dpp.dcn_arch = 1;
drivers/gpu/drm/bridge/lontium-lt8912b.c+2−2
@@ -676,8 +676,8 @@ static int lt8912_parse_dt(struct lt8912 *lt) · 675 unmodified lines
676676
677677 lt->hdmi_port = of_drm_find_bridge(port_node);
678678 if (!lt->hdmi_port) {
679− dev_err(lt->dev, "%s: Failed to get hdmi port\n", __func__);
680− ret = -ENODEV;
679+ ret = -EPROBE_DEFER;
680+ dev_err_probe(lt->dev, ret, "%s: Failed to get hdmi port\n", __func__);
681681 goto err_free_host_node;
682682 }
683683
drivers/gpu/drm/drm_panel_orientation_quirks.c+10−3
@@ -328,10 +328,17 @@ static const struct dmi_system_id orientation_data[] = { · 327 unmodified lines
328328 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"),
329329 },
330330 .driver_data = (void *)&lcd1200x1920_rightside_up,
331− }, { /* Lenovo Yoga Book X90F / X91F / X91L */
331+ }, { /* Lenovo Yoga Book X90F / X90L */
332332 .matches = {
333− /* Non exact match to match all versions */
334− DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
333+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
334+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
335+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
336+ },
337+ .driver_data = (void *)&lcd1200x1920_rightside_up,
338+ }, { /* Lenovo Yoga Book X91F / X91L */
339+ .matches = {
340+ /* Non exact match to match F + L versions */
341+ DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
335342 },
336343 .driver_data = (void *)&lcd1200x1920_rightside_up,
337344 }, { /* Lenovo Yoga Tablet 2 830F / 830L */
drivers/gpu/drm/i915/display/intel_crtc.c+8−0
@@ -683,6 +683,14 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state) · 682 unmodified lines
683683 */
684684 intel_vrr_send_push(new_crtc_state);
685685
686+ /*
687+ * Seamless M/N update may need to update frame timings.
688+ *
689+ * FIXME Should be synchronized with the start of vblank somehow...
690+ */
691+ if (new_crtc_state->seamless_m_n && intel_crtc_needs_fastset(new_crtc_state))
692+ intel_crtc_update_active_timings(new_crtc_state);
693+
686694 local_irq_enable();
687695
688696 if (intel_vgpu_active(dev_priv))
drivers/gpu/drm/i915/display/intel_display.c+1−0
@@ -5145,6 +5145,7 @@ intel_crtc_prepare_cleared_state(struct intel_atomic_state *state, · 5144 unmodified lines
51455145 * only fields that are know to not cause problems are preserved. */
51465146
51475147 saved_state->uapi = crtc_state->uapi;
5148+ saved_state->inherited = crtc_state->inherited;
51485149 saved_state->scaler_state = crtc_state->scaler_state;
51495150 saved_state->shared_dpll = crtc_state->shared_dpll;
51505151 saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
drivers/gpu/drm/i915/display/intel_dmc.c+21−5
@@ -384,15 +384,12 @@ static void disable_all_event_handlers(struct drm_i915_private *i915) · 383 unmodified lines
384384 }
385385 }
386386
387−static void pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable)
387+static void adlp_pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable)
388388 {
389389 enum pipe pipe;
390390
391− if (DISPLAY_VER(i915) < 13)
392− return;
393−
394391 /*
395− * Wa_16015201720:adl-p,dg2, mtl
392+ * Wa_16015201720:adl-p,dg2
396393 * The WA requires clock gating to be disabled all the time
397394 * for pipe A and B.
398395 * For pipe C and D clock gating needs to be disabled only
@@ -408,6 +405,25 @@ static void pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable) · 9 unmodified lines
408405 PIPEDMC_GATING_DIS, 0);
409406 }
410407
408+static void mtl_pipedmc_clock_gating_wa(struct drm_i915_private *i915)
409+{
410+ /*
411+ * Wa_16015201720
412+ * The WA requires clock gating to be disabled all the time
413+ * for pipe A and B.
414+ */
415+ intel_de_rmw(i915, GEN9_CLKGATE_DIS_0, 0,
416+ MTL_PIPEDMC_GATING_DIS_A | MTL_PIPEDMC_GATING_DIS_B);
417+}
418+
419+static void pipedmc_clock_gating_wa(struct drm_i915_private *i915, bool enable)
420+{
421+ if (DISPLAY_VER(i915) >= 14 && enable)
422+ mtl_pipedmc_clock_gating_wa(i915);
423+ else if (DISPLAY_VER(i915) == 13)
424+ adlp_pipedmc_clock_gating_wa(i915, enable);
425+}
426+
411427 void intel_dmc_enable_pipe(struct drm_i915_private *i915, enum pipe pipe)
412428 {
413429 if (!has_dmc_id_fw(i915, PIPE_TO_DMC_ID(pipe)))
drivers/gpu/drm/i915/display/intel_fbdev.c+18−6
@@ -210,6 +210,7 @@ static int intelfb_create(struct drm_fb_helper *helper, · 209 unmodified lines
210210 bool prealloc = false;
211211 void __iomem *vaddr;
212212 struct drm_i915_gem_object *obj;
213+ struct i915_gem_ww_ctx ww;
213214 int ret;
214215
215216 mutex_lock(&ifbdev->hpd_lock);
@@ -283,13 +284,24 @@ static int intelfb_create(struct drm_fb_helper *helper, · 67 unmodified lines
283284 info->fix.smem_len = vma->size;
284285 }
285286
286− vaddr = i915_vma_pin_iomap(vma);
287− if (IS_ERR(vaddr)) {
288− drm_err(&dev_priv->drm,
289− "Failed to remap framebuffer into virtual memory (%pe)\n", vaddr);
290− ret = PTR_ERR(vaddr);
291− goto out_unpin;
287+ for_i915_gem_ww(&ww, ret, false) {
288+ ret = i915_gem_object_lock(vma->obj, &ww);
289+
290+ if (ret)
291+ continue;
292+
293+ vaddr = i915_vma_pin_iomap(vma);
294+ if (IS_ERR(vaddr)) {
295+ drm_err(&dev_priv->drm,
296+ "Failed to remap framebuffer into virtual memory (%pe)\n", vaddr);
297+ ret = PTR_ERR(vaddr);
298+ continue;
299+ }
292300 }
301+
302+ if (ret)
303+ goto out_unpin;
304+
293305 info->screen_base = vaddr;
294306 info->screen_size = vma->size;
295307
drivers/gpu/drm/i915/gt/intel_gt.c+2−2
@@ -737,12 +737,12 @@ int intel_gt_init(struct intel_gt *gt) · 736 unmodified lines
737737 if (err)
738738 goto err_gt;
739739
740− intel_uc_init_late(&gt->uc);
741−
742740 err = i915_inject_probe_error(gt->i915, -EIO);
743741 if (err)
744742 goto err_gt;
745743
744+ intel_uc_init_late(&gt->uc);
745+
746746 intel_migrate_init(&gt->migrate, gt);
747747
748748 goto out_fw;
drivers/gpu/drm/i915/gt/intel_gt_pm.c+0−27
@@ -21,31 +21,10 @@ · 20 unmodified lines
2121 #include "intel_rc6.h"
2222 #include "intel_rps.h"
2323 #include "intel_wakeref.h"
24−#include "intel_pcode.h"
2524 #include "pxp/intel_pxp_pm.h"
2625
2726 #define I915_GT_SUSPEND_IDLE_TIMEOUT (HZ / 2)
2827
29−static void mtl_media_busy(struct intel_gt *gt)
30−{
31− /* Wa_14017073508: mtl */
32− if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
33− gt->type == GT_MEDIA)
34− snb_pcode_write_p(gt->uncore, PCODE_MBOX_GT_STATE,
35− PCODE_MBOX_GT_STATE_MEDIA_BUSY,
36− PCODE_MBOX_GT_STATE_DOMAIN_MEDIA, 0);
37−}
38−
39−static void mtl_media_idle(struct intel_gt *gt)
40−{
41− /* Wa_14017073508: mtl */
42− if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
43− gt->type == GT_MEDIA)
44− snb_pcode_write_p(gt->uncore, PCODE_MBOX_GT_STATE,
45− PCODE_MBOX_GT_STATE_MEDIA_NOT_BUSY,
46− PCODE_MBOX_GT_STATE_DOMAIN_MEDIA, 0);
47−}
48−
4928 static void user_forcewake(struct intel_gt *gt, bool suspend)
5029 {
5130 int count = atomic_read(&gt->user_wakeref);
@@ -93,9 +72,6 @@ static int __gt_unpark(struct intel_wakeref *wf) · 41 unmodified lines
9372
9473 GT_TRACE(gt, "\n");
9574
96− /* Wa_14017073508: mtl */
97− mtl_media_busy(gt);
98−
9975 /*
10076 * It seems that the DMC likes to transition between the DC states a lot
10177 * when there are no connected displays (no active power domains) during
@@ -145,9 +121,6 @@ static int __gt_park(struct intel_wakeref *wf) · 43 unmodified lines
145121 GEM_BUG_ON(!wakeref);
146122 intel_display_power_put_async(i915, POWER_DOMAIN_GT_IRQ, wakeref);
147123
148− /* Wa_14017073508: mtl */
149− mtl_media_idle(gt);
150−
151124 return 0;
152125 }
153126
drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c+1−1
@@ -580,7 +580,7 @@ static bool perf_limit_reasons_eval(void *data) · 579 unmodified lines
580580 }
581581
582582 DEFINE_SIMPLE_ATTRIBUTE(perf_limit_reasons_fops, perf_limit_reasons_get,
583− perf_limit_reasons_clear, "%llu\n");
583+ perf_limit_reasons_clear, "0x%llx\n");
584584
585585 void intel_gt_pm_debugfs_register(struct intel_gt *gt, struct dentry *root)
586586 {
drivers/gpu/drm/i915/gt/intel_rc6.c+8−0
@@ -486,6 +486,7 @@ static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6) · 485 unmodified lines
486486 static bool rc6_supported(struct intel_rc6 *rc6)
487487 {
488488 struct drm_i915_private *i915 = rc6_to_i915(rc6);
489+ struct intel_gt *gt = rc6_to_gt(rc6);
489490
490491 if (!HAS_RC6(i915))
491492 return false;
@@ -502,6 +503,13 @@ static bool rc6_supported(struct intel_rc6 *rc6) · 10 unmodified lines
502503 return false;
503504 }
504505
506+ if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
507+ gt->type == GT_MEDIA) {
508+ drm_notice(&i915->drm,
509+ "Media RC6 disabled on A step\n");
510+ return false;
511+ }
512+
505513 return true;
506514 }
507515
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c+22−0
@@ -1571,6 +1571,27 @@ int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf, · 1570 unmodified lines
15711571
15721572 #endif //CONFIG_DRM_I915_CAPTURE_ERROR
15731573
1574+static void guc_capture_find_ecode(struct intel_engine_coredump *ee)
1575+{
1576+ struct gcap_reg_list_info *reginfo;
1577+ struct guc_mmio_reg *regs;
1578+ i915_reg_t reg_ipehr = RING_IPEHR(0);
1579+ i915_reg_t reg_instdone = RING_INSTDONE(0);
1580+ int i;
1581+
1582+ if (!ee->guc_capture_node)
1583+ return;
1584+
1585+ reginfo = ee->guc_capture_node->reginfo + GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE;
1586+ regs = reginfo->regs;
1587+ for (i = 0; i < reginfo->num_regs; i++) {
1588+ if (regs[i].offset == reg_ipehr.reg)
1589+ ee->ipehr = regs[i].value;
1590+ else if (regs[i].offset == reg_instdone.reg)
1591+ ee->instdone.instdone = regs[i].value;
1592+ }
1593+}
1594+
15741595 void intel_guc_capture_free_node(struct intel_engine_coredump *ee)
15751596 {
15761597 if (!ee || !ee->guc_capture_node)
@@ -1612,6 +1633,7 @@ void intel_guc_capture_get_matching_node(struct intel_gt *gt, · 35 unmodified lines
16121633 list_del(&n->link);
16131634 ee->guc_capture_node = n;
16141635 ee->guc_capture = guc->capture;
1636+ guc_capture_find_ecode(ee);
16151637 return;
16161638 }
16171639 }
drivers/gpu/drm/i915/gt/uc/intel_guc_rc.c+1−12
@@ -11,20 +11,9 @@ · 10 unmodified lines
1111
1212 static bool __guc_rc_supported(struct intel_guc *guc)
1313 {
14− struct intel_gt *gt = guc_to_gt(guc);
15−
16− /*
17− * Wa_14017073508: mtl
18− * Do not enable gucrc to avoid additional interrupts which
19− * may disrupt pcode wa.
20− */
21− if (IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0) &&
22− gt->type == GT_MEDIA)
23− return false;
24−
2514 /* GuC RC is unavailable for pre-Gen12 */
2615 return guc->submission_supported &&
27− GRAPHICS_VER(gt->i915) >= 12;
16+ GRAPHICS_VER(guc_to_gt(guc)->i915) >= 12;
2817 }
2918
3019 static bool __guc_rc_selected(struct intel_guc *guc)
drivers/gpu/drm/i915/i915_active.c+1−2
@@ -92,8 +92,7 @@ static void debug_active_init(struct i915_active *ref) · 91 unmodified lines
9292 static void debug_active_activate(struct i915_active *ref)
9393 {
9494 lockdep_assert_held(&ref->tree_lock);
95− if (!atomic_read(&ref->count)) /* before the first inc */
96− debug_object_activate(ref, &active_debug_desc);
95+ debug_object_activate(ref, &active_debug_desc);
9796 }
9897
9998 static void debug_active_deactivate(struct i915_active *ref)
drivers/gpu/drm/i915/i915_hwmon.c+0−5
@@ -687,11 +687,6 @@ hwm_get_preregistration_info(struct drm_i915_private *i915) · 686 unmodified lines
687687 for_each_gt(gt, i915, i)
688688 hwm_energy(&hwmon->ddat_gt[i], &energy);
689689 }
690−
691− /* Enable PL1 power limit */
692− if (i915_mmio_reg_valid(hwmon->rg.pkg_rapl_limit))
693− hwm_locked_with_pm_intel_uncore_rmw(ddat, hwmon->rg.pkg_rapl_limit,
694− PKG_PWR_LIM_1_EN, PKG_PWR_LIM_1_EN);
695690 }
696691
697692 void i915_hwmon_register(struct drm_i915_private *i915)
drivers/gpu/drm/i915/i915_reg.h+5−12
@@ -1786,9 +1786,11 @@ · 1785 unmodified lines
17861786 * GEN9 clock gating regs
17871787 */
17881788 #define GEN9_CLKGATE_DIS_0 _MMIO(0x46530)
1789−#define DARBF_GATING_DIS (1 << 27)
1790−#define PWM2_GATING_DIS (1 << 14)
1791−#define PWM1_GATING_DIS (1 << 13)
1789+#define DARBF_GATING_DIS REG_BIT(27)
1790+#define MTL_PIPEDMC_GATING_DIS_A REG_BIT(15)
1791+#define MTL_PIPEDMC_GATING_DIS_B REG_BIT(14)
1792+#define PWM2_GATING_DIS REG_BIT(14)
1793+#define PWM1_GATING_DIS REG_BIT(13)
17921794
17931795 #define GEN9_CLKGATE_DIS_3 _MMIO(0x46538)
17941796 #define TGL_VRH_GATING_DIS REG_BIT(31)
@@ -6596,15 +6598,6 @@ · 4801 unmodified lines
65966598 /* XEHP_PCODE_FREQUENCY_CONFIG param2 */
65976599 #define PCODE_MBOX_DOMAIN_NONE 0x0
65986600 #define PCODE_MBOX_DOMAIN_MEDIAFF 0x3
6599−
6600−/* Wa_14017210380: mtl */
6601−#define PCODE_MBOX_GT_STATE 0x50
6602−/* sub-commands (param1) */
6603−#define PCODE_MBOX_GT_STATE_MEDIA_BUSY 0x1
6604−#define PCODE_MBOX_GT_STATE_MEDIA_NOT_BUSY 0x2
6605−/* param2 */
6606−#define PCODE_MBOX_GT_STATE_DOMAIN_MEDIA 0x1
6607−
66086601 #define GEN6_PCODE_DATA _MMIO(0x138128)
66096602 #define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8
66106603 #define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16
drivers/gpu/drm/meson/meson_drv.c+8−5
@@ -325,23 +325,23 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) · 324 unmodified lines
325325
326326 ret = meson_encoder_hdmi_init(priv);
327327 if (ret)
328− goto exit_afbcd;
328+ goto unbind_all;
329329
330330 ret = meson_plane_create(priv);
331331 if (ret)
332− goto exit_afbcd;
332+ goto unbind_all;
333333
334334 ret = meson_overlay_create(priv);
335335 if (ret)
336− goto exit_afbcd;
336+ goto unbind_all;
337337
338338 ret = meson_crtc_create(priv);
339339 if (ret)
340− goto exit_afbcd;
340+ goto unbind_all;
341341
342342 ret = request_irq(priv->vsync_irq, meson_irq, 0, drm->driver->name, drm);
343343 if (ret)
344− goto exit_afbcd;
344+ goto unbind_all;
345345
346346 drm_mode_config_reset(drm);
347347
@@ -359,6 +359,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) · 11 unmodified lines
359359
360360 uninstall_irq:
361361 free_irq(priv->vsync_irq, drm);
362+unbind_all:
363+ if (has_components)
364+ component_unbind_all(drm->dev, drm);
362365 exit_afbcd:
363366 if (priv->afbcd.ops)
364367 priv->afbcd.ops->exit(priv);