Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'drm-fixes-2022-05-13' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
"Pretty quiet week on the fixes front, 4 amdgpu and one i915 fix.

I think there might be a few misc fbdev ones outstanding, but I'll see
if they are necessary and pass them on if so.

amdgpu:

- Disable ASPM for VI boards on ADL platforms

- S0ix DCN3.1 display fix

- Resume regression fix

- Stable pstate fix

i915:

- fix for kernel memory corruption when running a lot of OpenCL tests
in parallel"

* tag 'drm-fixes-2022-05-13' of git://anongit.freedesktop.org/drm/drm:
drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)
Revert "drm/amd/pm: keep the BACO feature enabled for suspend"
drm/i915: Fix race in __i915_vma_remove_closed
drm/amd/display: undo clearing of z10 related function pointers
drm/amdgpu: vi: disable ASPM on Intel Alder Lake based systems

+29 -17
+5
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
··· 296 296 { 297 297 struct amdgpu_device *adev = ctx->adev; 298 298 enum amd_dpm_forced_level level; 299 + u32 current_stable_pstate; 299 300 int r; 300 301 301 302 mutex_lock(&adev->pm.stable_pstate_ctx_lock); ··· 304 303 r = -EBUSY; 305 304 goto done; 306 305 } 306 + 307 + r = amdgpu_ctx_get_stable_pstate(ctx, &current_stable_pstate); 308 + if (r || (stable_pstate == current_stable_pstate)) 309 + goto done; 307 310 308 311 switch (stable_pstate) { 309 312 case AMDGPU_CTX_STABLE_PSTATE_NONE:
+16 -1
drivers/gpu/drm/amd/amdgpu/vi.c
··· 81 81 #include "mxgpu_vi.h" 82 82 #include "amdgpu_dm.h" 83 83 84 + #if IS_ENABLED(CONFIG_X86) 85 + #include <asm/intel-family.h> 86 + #endif 87 + 84 88 #define ixPCIE_LC_L1_PM_SUBSTATE 0x100100C6 85 89 #define PCIE_LC_L1_PM_SUBSTATE__LC_L1_SUBSTATES_OVERRIDE_EN_MASK 0x00000001L 86 90 #define PCIE_LC_L1_PM_SUBSTATE__LC_PCI_PM_L1_2_OVERRIDE_MASK 0x00000002L ··· 1138 1134 WREG32_PCIE(ixPCIE_LC_CNTL, data); 1139 1135 } 1140 1136 1137 + static bool aspm_support_quirk_check(void) 1138 + { 1139 + #if IS_ENABLED(CONFIG_X86) 1140 + struct cpuinfo_x86 *c = &cpu_data(0); 1141 + 1142 + return !(c->x86 == 6 && c->x86_model == INTEL_FAM6_ALDERLAKE); 1143 + #else 1144 + return true; 1145 + #endif 1146 + } 1147 + 1141 1148 static void vi_program_aspm(struct amdgpu_device *adev) 1142 1149 { 1143 1150 u32 data, data1, orig; 1144 1151 bool bL1SS = false; 1145 1152 bool bClkReqSupport = true; 1146 1153 1147 - if (!amdgpu_device_should_use_aspm(adev)) 1154 + if (!amdgpu_device_should_use_aspm(adev) || !aspm_support_quirk_check()) 1148 1155 return; 1149 1156 1150 1157 if (adev->flags & AMD_IS_APU ||
-5
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c
··· 153 153 dc->hwss.init_hw = dcn20_fpga_init_hw; 154 154 dc->hwseq->funcs.init_pipes = NULL; 155 155 } 156 - if (dc->debug.disable_z10) { 157 - /*hw not support z10 or sw disable it*/ 158 - dc->hwss.z10_restore = NULL; 159 - dc->hwss.z10_save_init = NULL; 160 - } 161 156 }
+1 -7
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
··· 1351 1351 { 1352 1352 struct amdgpu_device *adev = smu->adev; 1353 1353 int ret = 0; 1354 - /* 1355 - * TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair 1356 - * the workaround which always reset the asic in suspend. 1357 - * It's likely that workaround will be dropped in the future. 1358 - * Then the change here should be dropped together. 1359 - */ 1360 1354 bool use_baco = !smu->is_apu && 1361 - (((amdgpu_in_reset(adev) || (adev->in_suspend && !adev->in_s0ix)) && 1355 + ((amdgpu_in_reset(adev) && 1362 1356 (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) || 1363 1357 ((adev->in_runpm || adev->in_s4) && amdgpu_asic_supports_baco(adev))); 1364 1358
+7 -4
drivers/gpu/drm/i915/i915_vma.c
··· 1605 1605 1606 1606 static void __i915_vma_remove_closed(struct i915_vma *vma) 1607 1607 { 1608 - struct intel_gt *gt = vma->vm->gt; 1609 - 1610 - spin_lock_irq(&gt->closed_lock); 1611 1608 list_del_init(&vma->closed_link); 1612 - spin_unlock_irq(&gt->closed_lock); 1613 1609 } 1614 1610 1615 1611 void i915_vma_reopen(struct i915_vma *vma) 1616 1612 { 1613 + struct intel_gt *gt = vma->vm->gt; 1614 + 1615 + spin_lock_irq(&gt->closed_lock); 1617 1616 if (i915_vma_is_closed(vma)) 1618 1617 __i915_vma_remove_closed(vma); 1618 + spin_unlock_irq(&gt->closed_lock); 1619 1619 } 1620 1620 1621 1621 void i915_vma_release(struct kref *ref) ··· 1641 1641 static void release_references(struct i915_vma *vma) 1642 1642 { 1643 1643 struct drm_i915_gem_object *obj = vma->obj; 1644 + struct intel_gt *gt = vma->vm->gt; 1644 1645 1645 1646 GEM_BUG_ON(i915_vma_is_active(vma)); 1646 1647 ··· 1651 1650 rb_erase(&vma->obj_node, &obj->vma.tree); 1652 1651 spin_unlock(&obj->vma.lock); 1653 1652 1653 + spin_lock_irq(&gt->closed_lock); 1654 1654 __i915_vma_remove_closed(vma); 1655 + spin_unlock_irq(&gt->closed_lock); 1655 1656 1656 1657 __i915_vma_put(vma); 1657 1658 }