Skip to content

Commit 595609b

Browse files
committed
Merge tag 'drm-fixes-2023-12-15' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "More regular fixes, amdgpu, i915, mediatek and nouveau are most of them this week. Nothing too major, then a few misc bits and pieces in core, panel and ivpu. drm: - fix uninit problems in crtc - fix fd ownership check - edid: add modes in fallback paths panel: - move LG panel into DSI yaml - ltk050h3146w: set burst mode mediatek: - mtk_disp_gamma: Fix breakage due to merge issue - fix kernel oops if no crtc is found - Add spinlock for setting vblank event in atomic_begin - Fix access violation in mtk_drm_crtc_dma_dev_get i915: - Fix selftest engine reset count storage for multi-tile - Fix out-of-bounds reads for engine reset counts - Fix ADL+ remapped stride with CCS - Fix intel_atomic_setup_scalers() plane_state handling - Fix ADL+ tiled plane stride when the POT stride is smaller than the original - Fix eDP 1.4 rate select method link configuration amdgpu: - Fix suspend fix that got accidently mangled last week - Fix OD regression - PSR fixes - OLED Backlight regression fix - JPEG 4.0.5 fix - Misc display fixes - SDMA 5.2 fix - SDMA 2.4 regression fix - GPUVM race fix nouveau: - fix gk20a instobj hierarchy - fix headless iors inheritance regression ivpu: - fix WA initialisation" * tag 'drm-fixes-2023-12-15' of git://anongit.freedesktop.org/drm/drm: (31 commits) drm/nouveau/kms/nv50-: Don't allow inheritance of headless iors drm/nouveau: Fixup gk20a instobj hierarchy drm/amdgpu: warn when there are still mappings when a BO is destroyed v2 drm/amdgpu: fix tear down order in amdgpu_vm_pt_free drm/amd: Fix a probing order problem on SDMA 2.4 drm/amdgpu/sdma5.2: add begin/end_use ring callbacks drm/panel: ltk050h3146w: Set burst mode for ltk050h3148w dt-bindings: panel-simple-dsi: move LG 5" HD TFT LCD panel into DSI yaml drm/amd/display: Disable PSR-SU on Parade 0803 TCON again drm/amd/display: Populate dtbclk from bounding box drm/amd/display: Revert "Fix conversions between bytes and KB" drm/amdgpu/jpeg: configure doorbell for each playback drm/amd/display: Restore guard against default backlight value < 1 nit drm/amd/display: fix hw rotated modes when PSR-SU is enabled drm/amd/pm: fix pp_*clk_od typo drm/amdgpu: fix buffer funcs setting order on suspend harder drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get drm/edid: also call add modes in EDID connector update fallback drm/i915/edp: don't write to DP_LINK_BW_SET when using rate select drm/i915: Fix ADL+ tiled plane stride when the POT stride is smaller than the original ...
2 parents 3f71685 + 7ba84cb commit 595609b

36 files changed

Lines changed: 190 additions & 83 deletions

Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ properties:
4242
- lg,acx467akm-7
4343
# LG Corporation 7" WXGA TFT LCD panel
4444
- lg,ld070wx3-sl01
45+
# LG Corporation 5" HD TFT LCD panel
46+
- lg,lh500wx1-sd03
4547
# One Stop Displays OSD101T2587-53TS 10.1" 1920x1200 panel
4648
- osddisplays,osd101t2587-53ts
4749
# Panasonic 10" WUXGA TFT LCD panel

Documentation/devicetree/bindings/display/panel/panel-simple.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ properties:
208208
- lemaker,bl035-rgb-002
209209
# LG 7" (800x480 pixels) TFT LCD panel
210210
- lg,lb070wv8
211-
# LG Corporation 5" HD TFT LCD panel
212-
- lg,lh500wx1-sd03
213211
# LG LP079QX1-SP0V 7.9" (1536x2048 pixels) TFT LCD panel
214212
- lg,lp079qx1-sp0v
215213
# LG 9.7" (2048x1536 pixels) TFT LCD panel

drivers/accel/ivpu/ivpu_hw_37xx.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@
5353

5454
#define ICB_0_1_IRQ_MASK ((((u64)ICB_1_IRQ_MASK) << 32) | ICB_0_IRQ_MASK)
5555

56-
#define BUTTRESS_IRQ_MASK ((REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE)) | \
57-
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, ATS_ERR)) | \
56+
#define BUTTRESS_IRQ_MASK ((REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, ATS_ERR)) | \
5857
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, UFI_ERR)))
5958

59+
#define BUTTRESS_ALL_IRQ_MASK (BUTTRESS_IRQ_MASK | \
60+
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE)))
61+
6062
#define BUTTRESS_IRQ_ENABLE_MASK ((u32)~BUTTRESS_IRQ_MASK)
6163
#define BUTTRESS_IRQ_DISABLE_MASK ((u32)-1)
6264

@@ -74,8 +76,12 @@ static void ivpu_hw_wa_init(struct ivpu_device *vdev)
7476
vdev->wa.clear_runtime_mem = false;
7577
vdev->wa.d3hot_after_power_off = true;
7678

77-
if (ivpu_device_id(vdev) == PCI_DEVICE_ID_MTL && ivpu_revision(vdev) < 4)
79+
REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, BUTTRESS_ALL_IRQ_MASK);
80+
if (REGB_RD32(VPU_37XX_BUTTRESS_INTERRUPT_STAT) == BUTTRESS_ALL_IRQ_MASK) {
81+
/* Writing 1s does not clear the interrupt status register */
7882
vdev->wa.interrupt_clear_with_0 = true;
83+
REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, 0x0);
84+
}
7985

8086
IVPU_PRINT_WA(punit_disabled);
8187
IVPU_PRINT_WA(clear_runtime_mem);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4516,8 +4516,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
45164516

45174517
amdgpu_ras_suspend(adev);
45184518

4519-
amdgpu_ttm_set_buffer_funcs_status(adev, false);
4520-
45214519
amdgpu_device_ip_suspend_phase1(adev);
45224520

45234521
if (!adev->in_s0ix)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
13431343

13441344
abo = ttm_to_amdgpu_bo(bo);
13451345

1346+
WARN_ON(abo->vm_bo);
1347+
13461348
if (abo->kfd_bo)
13471349
amdgpu_amdkfd_release_notify(abo);
13481350

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,13 +642,14 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
642642

643643
if (!entry->bo)
644644
return;
645+
646+
entry->bo->vm_bo = NULL;
645647
shadow = amdgpu_bo_shadowed(entry->bo);
646648
if (shadow) {
647649
ttm_bo_set_bulk_move(&shadow->tbo, NULL);
648650
amdgpu_bo_unref(&shadow);
649651
}
650652
ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
651-
entry->bo->vm_bo = NULL;
652653

653654
spin_lock(&entry->vm->status_lock);
654655
list_del(&entry->vm_status);

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,6 @@ static int jpeg_v4_0_5_hw_init(void *handle)
155155
struct amdgpu_ring *ring = adev->jpeg.inst->ring_dec;
156156
int r;
157157

158-
adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
159-
(adev->doorbell_index.vcn.vcn_ring0_1 << 1), 0);
160-
161-
WREG32_SOC15(VCN, 0, regVCN_JPEG_DB_CTRL,
162-
ring->doorbell_index << VCN_JPEG_DB_CTRL__OFFSET__SHIFT |
163-
VCN_JPEG_DB_CTRL__EN_MASK);
164-
165158
r = amdgpu_ring_test_helper(ring);
166159
if (r)
167160
return r;
@@ -336,6 +329,14 @@ static int jpeg_v4_0_5_start(struct amdgpu_device *adev)
336329
if (adev->pm.dpm_enabled)
337330
amdgpu_dpm_enable_jpeg(adev, true);
338331

332+
/* doorbell programming is done for every playback */
333+
adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
334+
(adev->doorbell_index.vcn.vcn_ring0_1 << 1), 0);
335+
336+
WREG32_SOC15(VCN, 0, regVCN_JPEG_DB_CTRL,
337+
ring->doorbell_index << VCN_JPEG_DB_CTRL__OFFSET__SHIFT |
338+
VCN_JPEG_DB_CTRL__EN_MASK);
339+
339340
/* disable power gating */
340341
r = jpeg_v4_0_5_disable_static_power_gating(adev);
341342
if (r)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,12 +813,12 @@ static int sdma_v2_4_early_init(void *handle)
813813
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
814814
int r;
815815

816+
adev->sdma.num_instances = SDMA_MAX_INSTANCE;
817+
816818
r = sdma_v2_4_init_microcode(adev);
817819
if (r)
818820
return r;
819821

820-
adev->sdma.num_instances = SDMA_MAX_INSTANCE;
821-
822822
sdma_v2_4_set_ring_funcs(adev);
823823
sdma_v2_4_set_buffer_funcs(adev);
824824
sdma_v2_4_set_vm_pte_funcs(adev);

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,32 @@ static void sdma_v5_2_get_clockgating_state(void *handle, u64 *flags)
16431643
*flags |= AMD_CG_SUPPORT_SDMA_LS;
16441644
}
16451645

1646+
static void sdma_v5_2_ring_begin_use(struct amdgpu_ring *ring)
1647+
{
1648+
struct amdgpu_device *adev = ring->adev;
1649+
1650+
/* SDMA 5.2.3 (RMB) FW doesn't seem to properly
1651+
* disallow GFXOFF in some cases leading to
1652+
* hangs in SDMA. Disallow GFXOFF while SDMA is active.
1653+
* We can probably just limit this to 5.2.3,
1654+
* but it shouldn't hurt for other parts since
1655+
* this GFXOFF will be disallowed anyway when SDMA is
1656+
* active, this just makes it explicit.
1657+
*/
1658+
amdgpu_gfx_off_ctrl(adev, false);
1659+
}
1660+
1661+
static void sdma_v5_2_ring_end_use(struct amdgpu_ring *ring)
1662+
{
1663+
struct amdgpu_device *adev = ring->adev;
1664+
1665+
/* SDMA 5.2.3 (RMB) FW doesn't seem to properly
1666+
* disallow GFXOFF in some cases leading to
1667+
* hangs in SDMA. Allow GFXOFF when SDMA is complete.
1668+
*/
1669+
amdgpu_gfx_off_ctrl(adev, true);
1670+
}
1671+
16461672
const struct amd_ip_funcs sdma_v5_2_ip_funcs = {
16471673
.name = "sdma_v5_2",
16481674
.early_init = sdma_v5_2_early_init,
@@ -1690,6 +1716,8 @@ static const struct amdgpu_ring_funcs sdma_v5_2_ring_funcs = {
16901716
.test_ib = sdma_v5_2_ring_test_ib,
16911717
.insert_nop = sdma_v5_2_ring_insert_nop,
16921718
.pad_ib = sdma_v5_2_ring_pad_ib,
1719+
.begin_use = sdma_v5_2_ring_begin_use,
1720+
.end_use = sdma_v5_2_ring_end_use,
16931721
.emit_wreg = sdma_v5_2_ring_emit_wreg,
16941722
.emit_reg_wait = sdma_v5_2_ring_emit_reg_wait,
16951723
.emit_reg_write_reg_wait = sdma_v5_2_ring_emit_reg_write_reg_wait,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5182,6 +5182,9 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
51825182
if (plane->type == DRM_PLANE_TYPE_CURSOR)
51835183
return;
51845184

5185+
if (new_plane_state->rotation != DRM_MODE_ROTATE_0)
5186+
goto ffu;
5187+
51855188
num_clips = drm_plane_get_damage_clips_count(new_plane_state);
51865189
clips = drm_plane_get_damage_clips(new_plane_state);
51875190

0 commit comments

Comments
 (0)