Skip to content

Commit 0068dc8

Browse files
committed
Merge tag 'drm-fixes-2021-10-08' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "I've returned from my tropical island retreat, even managed to bring one of my kids on a dive with some turtles. Thanks to Daniel for doing last week's work. Otherwise this is the weekly fixes pull, it's a bit bigger because the vc4 reverts in your tree caused some problems with fixes in the drm-misc tree so it got left out last week, so this week has the misc fixes rebased without the vc4 pieces. Otherwise it's i915, amdgpu with the usual fixes and a scattering over other drivers. I expect things should calm down a bit more next week. core: - Kconfig fix for fb_simple vs simpledrm. i915: - Fix RKL HDMI audio - Fix runtime pm imbalance on i915_gem_shrink() error path - Fix Type-C port access before hw/sw state sync - Fix VBT backlight struct version/size check - Fix VT-d async flip on SKL/BXT with plane stretch workaround amdgpu: - DCN 3.1 DP alt mode fixes - S0ix gfxoff fix - Fix DRM_AMD_DC_SI dependencies - PCIe DPC handling fix - DCN 3.1 scaling fix - Documentation fix amdkfd: - Fix potential memory leak - IOMMUv2 init fixes vc4 (there were some hdmi fixes but things got reverted, sort it out later): - compiler fix nouveau: - Cursor fix - Fix ttm buffer moves for ampere gpu's by adding minimal acceleration support. - memory leak fixes rockchip: - crtc/clk fixup panel: - ili9341 Fix DT bindings indent - y030xx067a - yellow tint init seq fix gbefb: - Fix gbefb when built with COMPILE_TEST" * tag 'drm-fixes-2021-10-08' of git://anongit.freedesktop.org/drm/drm: (33 commits) drm/amd/display: Fix detection of 4 lane for DPALT drm/amd/display: Limit display scaling to up to 4k for DCN 3.1 drm/amd/display: Skip override for preferred link settings during link training drm/nouveau/debugfs: fix file release memory leak drm/nouveau/kms/nv50-: fix file release memory leak drm/nouveau: avoid a use-after-free when BO init fails DRM: delete DRM IRQ legacy midlayer docs video: fbdev: gbefb: Only instantiate device when built for IP32 fbdev: simplefb: fix Kconfig dependencies drm/panel: abt-y030xx067a: yellow tint fix dt-bindings: panel: ili9341: correct indentation drm/nouveau/fifo/ga102: initialise chid on return from channel creation drm/rockchip: Update crtc fixup to account for fractional clk change drm/nouveau/ga102-: support ttm buffer moves via copy engine drm/nouveau/kms/tu102-: delay enabling cursor until after assign_windows drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup drm/vc4: hdmi: Remove unused struct drm/kmb: Enable alpha blended second plane drm/amdgpu: handle the case of pci_channel_io_frozen only in amdgpu_pci_resume drm/amdgpu: init iommu after amdkfd device init ...
2 parents 1da3854 + bf79045 commit 0068dc8

Some content is hidden

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

53 files changed

+712
-163
lines changed

Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ properties:
2222
items:
2323
- enum:
2424
# ili9341 240*320 Color on stm32f429-disco board
25-
- st,sf-tc240t-9370-t
25+
- st,sf-tc240t-9370-t
2626
- const: ilitek,ili9341
2727

2828
reg: true

Documentation/gpu/amdgpu.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ pcie_replay_count
300300
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
301301
:doc: pcie_replay_count
302302

303-
+GPU SmartShift Information
304-
============================
303+
GPU SmartShift Information
304+
==========================
305305

306306
GPU SmartShift information via sysfs
307307

Documentation/gpu/drm-internals.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ Component Helper Usage
111111
.. kernel-doc:: drivers/gpu/drm/drm_drv.c
112112
:doc: component helper usage recommendations
113113

114-
IRQ Helper Library
115-
~~~~~~~~~~~~~~~~~~
116-
117-
.. kernel-doc:: drivers/gpu/drm/drm_irq.c
118-
:doc: irq helpers
119-
120-
.. kernel-doc:: drivers/gpu/drm/drm_irq.c
121-
:export:
122-
123114
Memory Manager Initialization
124115
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125116

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ struct amdgpu_device {
10871087

10881088
bool no_hw_access;
10891089
struct pci_saved_state *pci_state;
1090+
pci_channel_state_t pci_channel_state;
10901091

10911092
struct amdgpu_reset_control *reset_cntl;
10921093
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ kfd_mem_dmaunmap_userptr(struct kgd_mem *mem,
563563

564564
dma_unmap_sgtable(adev->dev, ttm->sg, direction, 0);
565565
sg_free_table(ttm->sg);
566+
kfree(ttm->sg);
566567
ttm->sg = NULL;
567568
}
568569

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,10 +2394,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
23942394
if (r)
23952395
goto init_failed;
23962396

2397-
r = amdgpu_amdkfd_resume_iommu(adev);
2398-
if (r)
2399-
goto init_failed;
2400-
24012397
r = amdgpu_device_ip_hw_init_phase1(adev);
24022398
if (r)
24032399
goto init_failed;
@@ -2436,6 +2432,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
24362432
if (!adev->gmc.xgmi.pending_reset)
24372433
amdgpu_amdkfd_device_init(adev);
24382434

2435+
r = amdgpu_amdkfd_resume_iommu(adev);
2436+
if (r)
2437+
goto init_failed;
2438+
24392439
amdgpu_fru_get_product_info(adev);
24402440

24412441
init_failed:
@@ -5399,6 +5399,8 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
53995399
return PCI_ERS_RESULT_DISCONNECT;
54005400
}
54015401

5402+
adev->pci_channel_state = state;
5403+
54025404
switch (state) {
54035405
case pci_channel_io_normal:
54045406
return PCI_ERS_RESULT_CAN_RECOVER;
@@ -5541,6 +5543,10 @@ void amdgpu_pci_resume(struct pci_dev *pdev)
55415543

55425544
DRM_INFO("PCI error: resume callback!!\n");
55435545

5546+
/* Only continue execution for the case of pci_channel_io_frozen */
5547+
if (adev->pci_channel_state != pci_channel_io_frozen)
5548+
return;
5549+
55445550
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
55455551
struct amdgpu_ring *ring = adev->rings[i];
55465552

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
/* delay 0.1 second to enable gfx off feature */
3232
#define GFX_OFF_DELAY_ENABLE msecs_to_jiffies(100)
3333

34+
#define GFX_OFF_NO_DELAY 0
35+
3436
/*
3537
* GPU GFX IP block helpers function.
3638
*/
@@ -558,6 +560,8 @@ int amdgpu_gfx_enable_kcq(struct amdgpu_device *adev)
558560

559561
void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
560562
{
563+
unsigned long delay = GFX_OFF_DELAY_ENABLE;
564+
561565
if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
562566
return;
563567

@@ -573,8 +577,14 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
573577

574578
adev->gfx.gfx_off_req_count--;
575579

576-
if (adev->gfx.gfx_off_req_count == 0 && !adev->gfx.gfx_off_state)
577-
schedule_delayed_work(&adev->gfx.gfx_off_delay_work, GFX_OFF_DELAY_ENABLE);
580+
if (adev->gfx.gfx_off_req_count == 0 &&
581+
!adev->gfx.gfx_off_state) {
582+
/* If going to s2idle, no need to wait */
583+
if (adev->in_s0ix)
584+
delay = GFX_OFF_NO_DELAY;
585+
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
586+
delay);
587+
}
578588
} else {
579589
if (adev->gfx.gfx_off_req_count == 0) {
580590
cancel_delayed_work_sync(&adev->gfx.gfx_off_delay_work);

drivers/gpu/drm/amd/amdkfd/kfd_device.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,18 +1085,12 @@ static int kfd_resume(struct kfd_dev *kfd)
10851085
int err = 0;
10861086

10871087
err = kfd->dqm->ops.start(kfd->dqm);
1088-
if (err) {
1088+
if (err)
10891089
dev_err(kfd_device,
10901090
"Error starting queue manager for device %x:%x\n",
10911091
kfd->pdev->vendor, kfd->pdev->device);
1092-
goto dqm_start_error;
1093-
}
10941092

10951093
return err;
1096-
1097-
dqm_start_error:
1098-
kfd_iommu_suspend(kfd);
1099-
return err;
11001094
}
11011095

11021096
static inline void kfd_queue_work(struct workqueue_struct *wq,

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ config DRM_AMD_DC_HDCP
2525

2626
config DRM_AMD_DC_SI
2727
bool "AMD DC support for Southern Islands ASICs"
28+
depends on DRM_AMDGPU_SI
29+
depends on DRM_AMD_DC
2830
default n
2931
help
3032
Choose this option to enable new AMD DC support for SI asics

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,12 +1306,6 @@ static void override_training_settings(
13061306
{
13071307
uint32_t lane;
13081308

1309-
/* Override link settings */
1310-
if (link->preferred_link_setting.link_rate != LINK_RATE_UNKNOWN)
1311-
lt_settings->link_settings.link_rate = link->preferred_link_setting.link_rate;
1312-
if (link->preferred_link_setting.lane_count != LANE_COUNT_UNKNOWN)
1313-
lt_settings->link_settings.lane_count = link->preferred_link_setting.lane_count;
1314-
13151309
/* Override link spread */
13161310
if (!link->dp_ss_off && overrides->downspread != NULL)
13171311
lt_settings->link_settings.link_spread = *overrides->downspread ?

0 commit comments

Comments
 (0)