Skip to content

Commit 5bfc75d

Browse files
committed
Merge tag 'drm-fixes-2021-04-23' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Just some small i915 and amdgpu fixes this week, should be all until you open the merge window. amdgpu: - Fix gpuvm page table update issue - Modifier fixes - Register fix for dimgrey cavefish i915: - GVT's BDW regression fix for cmd parser - Fix modesetting in case of unexpected AUX timeouts" * tag 'drm-fixes-2021-04-23' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish amd/display: allow non-linear multi-planar formats drm/amd/display: Update modifier list for gfx10_3 drm/amdgpu: reserve fence slot to update page table drm/i915: Fix modesetting in case of unexpected AUX timeouts drm/i915/gvt: Fix BDW command parser regression
2 parents 22c4e5b + aca3873 commit 5bfc75d

5 files changed

Lines changed: 30 additions & 19 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,7 +3300,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid,
33003300
struct amdgpu_bo *root;
33013301
uint64_t value, flags;
33023302
struct amdgpu_vm *vm;
3303-
long r;
3303+
int r;
33043304

33053305
spin_lock(&adev->vm_manager.pasid_lock);
33063306
vm = idr_find(&adev->vm_manager.pasid_idr, pasid);
@@ -3349,6 +3349,12 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid,
33493349
value = 0;
33503350
}
33513351

3352+
r = dma_resv_reserve_shared(root->tbo.base.resv, 1);
3353+
if (r) {
3354+
pr_debug("failed %d to reserve fence slot\n", r);
3355+
goto error_unlock;
3356+
}
3357+
33523358
r = amdgpu_vm_bo_update_mapping(adev, adev, vm, true, false, NULL, addr,
33533359
addr, flags, value, NULL, NULL,
33543360
NULL);
@@ -3360,7 +3366,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid,
33603366
error_unlock:
33613367
amdgpu_bo_unreserve(root);
33623368
if (r < 0)
3363-
DRM_ERROR("Can't handle page fault (%ld)\n", r);
3369+
DRM_ERROR("Can't handle page fault (%d)\n", r);
33643370

33653371
error_unref:
33663372
amdgpu_bo_unref(&root);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3280,7 +3280,7 @@ static const struct soc15_reg_golden golden_settings_gc_10_3_4[] =
32803280
SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
32813281
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0x00000280, 0x00000280),
32823282
SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0x07800000, 0x00800000),
3283-
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL, 0x00001d00, 0x00000500),
3283+
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x00001d00, 0x00000500),
32843284
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003c0000, 0x00280400),
32853285
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
32863286
SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,13 +4071,6 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
40714071
if (modifier == DRM_FORMAT_MOD_LINEAR)
40724072
return true;
40734073

4074-
/*
4075-
* The arbitrary tiling support for multiplane formats has not been hooked
4076-
* up.
4077-
*/
4078-
if (info->num_planes > 1)
4079-
return false;
4080-
40814074
/*
40824075
* For D swizzle the canonical modifier depends on the bpp, so check
40834076
* it here.
@@ -4096,6 +4089,10 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
40964089
/* Per radeonsi comments 16/64 bpp are more complicated. */
40974090
if (info->cpp[0] != 4)
40984091
return false;
4092+
/* We support multi-planar formats, but not when combined with
4093+
* additional DCC metadata planes. */
4094+
if (info->num_planes > 1)
4095+
return false;
40994096
}
41004097

41014098
return true;
@@ -4296,7 +4293,7 @@ add_gfx10_3_modifiers(const struct amdgpu_device *adev,
42964293
AMD_FMT_MOD_SET(DCC_CONSTANT_ENCODE, 1) |
42974294
AMD_FMT_MOD_SET(DCC_INDEPENDENT_64B, 1) |
42984295
AMD_FMT_MOD_SET(DCC_INDEPENDENT_128B, 1) |
4299-
AMD_FMT_MOD_SET(DCC_MAX_COMPRESSED_BLOCK, AMD_FMT_MOD_DCC_BLOCK_128B));
4296+
AMD_FMT_MOD_SET(DCC_MAX_COMPRESSED_BLOCK, AMD_FMT_MOD_DCC_BLOCK_64B));
43004297

43014298
add_modifier(mods, size, capacity, AMD_FMT_MOD |
43024299
AMD_FMT_MOD_SET(TILE, AMD_FMT_MOD_TILE_GFX9_64K_R_X) |
@@ -4308,7 +4305,7 @@ add_gfx10_3_modifiers(const struct amdgpu_device *adev,
43084305
AMD_FMT_MOD_SET(DCC_CONSTANT_ENCODE, 1) |
43094306
AMD_FMT_MOD_SET(DCC_INDEPENDENT_64B, 1) |
43104307
AMD_FMT_MOD_SET(DCC_INDEPENDENT_128B, 1) |
4311-
AMD_FMT_MOD_SET(DCC_MAX_COMPRESSED_BLOCK, AMD_FMT_MOD_DCC_BLOCK_128B));
4308+
AMD_FMT_MOD_SET(DCC_MAX_COMPRESSED_BLOCK, AMD_FMT_MOD_DCC_BLOCK_64B));
43124309

43134310
add_modifier(mods, size, capacity, AMD_FMT_MOD |
43144311
AMD_FMT_MOD_SET(TILE, AMD_FMT_MOD_TILE_GFX9_64K_R_X) |

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,8 @@ void intel_dp_start_link_train(struct intel_dp *intel_dp,
848848
int lttpr_count = intel_dp_init_lttpr_and_dprx_caps(intel_dp);
849849

850850
if (lttpr_count < 0)
851-
return;
851+
/* Still continue with enabling the port and link training. */
852+
lttpr_count = 0;
852853

853854
if (!intel_dp_link_train_all_phys(intel_dp, crtc_state, lttpr_count))
854855
intel_dp_schedule_fallback_link_training(intel_dp, crtc_state);

drivers/gpu/drm/i915/gvt/cmd_parser.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -916,19 +916,26 @@ static int cmd_reg_handler(struct parser_exec_state *s,
916916

917917
if (!strncmp(cmd, "srm", 3) ||
918918
!strncmp(cmd, "lrm", 3)) {
919-
if (offset != i915_mmio_reg_offset(GEN8_L3SQCREG4) &&
920-
offset != 0x21f0) {
919+
if (offset == i915_mmio_reg_offset(GEN8_L3SQCREG4) ||
920+
offset == 0x21f0 ||
921+
(IS_BROADWELL(gvt->gt->i915) &&
922+
offset == i915_mmio_reg_offset(INSTPM)))
923+
return 0;
924+
else {
921925
gvt_vgpu_err("%s access to register (%x)\n",
922926
cmd, offset);
923927
return -EPERM;
924-
} else
925-
return 0;
928+
}
926929
}
927930

928931
if (!strncmp(cmd, "lrr-src", 7) ||
929932
!strncmp(cmd, "lrr-dst", 7)) {
930-
gvt_vgpu_err("not allowed cmd %s\n", cmd);
931-
return -EPERM;
933+
if (IS_BROADWELL(gvt->gt->i915) && offset == 0x215c)
934+
return 0;
935+
else {
936+
gvt_vgpu_err("not allowed cmd %s reg (%x)\n", cmd, offset);
937+
return -EPERM;
938+
}
932939
}
933940

934941
if (!strncmp(cmd, "pipe_ctrl", 9)) {

0 commit comments

Comments
 (0)