Skip to content

Commit 8628752

Browse files
committed
Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
- Fix missing freesync properties on eDP - Fix locking in pasid mgr - Fix clang warning in kfd - DC/powerplay fix - Fix reported rev ids on raven - Doorbell fix for vega20 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190205231301.3815-1-alexander.deucher@amd.com
2 parents 2072ce0 + 7fad8da commit 8628752

File tree

6 files changed

+32
-7
lines changed

6 files changed

+32
-7
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,14 +3363,15 @@ void amdgpu_vm_get_task_info(struct amdgpu_device *adev, unsigned int pasid,
33633363
struct amdgpu_task_info *task_info)
33643364
{
33653365
struct amdgpu_vm *vm;
3366+
unsigned long flags;
33663367

3367-
spin_lock(&adev->vm_manager.pasid_lock);
3368+
spin_lock_irqsave(&adev->vm_manager.pasid_lock, flags);
33683369

33693370
vm = idr_find(&adev->vm_manager.pasid_idr, pasid);
33703371
if (vm)
33713372
*task_info = vm->task_info;
33723373

3373-
spin_unlock(&adev->vm_manager.pasid_lock);
3374+
spin_unlock_irqrestore(&adev->vm_manager.pasid_lock, flags);
33743375
}
33753376

33763377
/**

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,20 @@ static void nbio_v7_4_enable_doorbell_aperture(struct amdgpu_device *adev,
9393
static void nbio_v7_4_enable_doorbell_selfring_aperture(struct amdgpu_device *adev,
9494
bool enable)
9595
{
96+
u32 tmp = 0;
9697

98+
if (enable) {
99+
tmp = REG_SET_FIELD(tmp, DOORBELL_SELFRING_GPA_APER_CNTL, DOORBELL_SELFRING_GPA_APER_EN, 1) |
100+
REG_SET_FIELD(tmp, DOORBELL_SELFRING_GPA_APER_CNTL, DOORBELL_SELFRING_GPA_APER_MODE, 1) |
101+
REG_SET_FIELD(tmp, DOORBELL_SELFRING_GPA_APER_CNTL, DOORBELL_SELFRING_GPA_APER_SIZE, 0);
102+
103+
WREG32_SOC15(NBIO, 0, mmDOORBELL_SELFRING_GPA_APER_BASE_LOW,
104+
lower_32_bits(adev->doorbell.base));
105+
WREG32_SOC15(NBIO, 0, mmDOORBELL_SELFRING_GPA_APER_BASE_HIGH,
106+
upper_32_bits(adev->doorbell.base));
107+
}
108+
109+
WREG32_SOC15(NBIO, 0, mmDOORBELL_SELFRING_GPA_APER_CNTL, tmp);
97110
}
98111

99112
static void nbio_v7_4_ih_doorbell_range(struct amdgpu_device *adev,

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,13 @@ static int soc15_common_early_init(void *handle)
729729
case CHIP_RAVEN:
730730
adev->asic_funcs = &soc15_asic_funcs;
731731
if (adev->rev_id >= 0x8)
732-
adev->external_rev_id = adev->rev_id + 0x81;
732+
adev->external_rev_id = adev->rev_id + 0x79;
733733
else if (adev->pdev->device == 0x15d8)
734734
adev->external_rev_id = adev->rev_id + 0x41;
735+
else if (adev->rev_id == 1)
736+
adev->external_rev_id = adev->rev_id + 0x20;
735737
else
736-
adev->external_rev_id = 0x1;
738+
adev->external_rev_id = adev->rev_id + 0x01;
737739

738740
if (adev->rev_id >= 0x8) {
739741
adev->cg_flags = AMD_CG_SUPPORT_GFX_MGCG |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ static int kfd_fill_mem_info_for_cpu(int numa_node_id, int *avail_size,
863863
return 0;
864864
}
865865

866-
#if CONFIG_X86_64
866+
#ifdef CONFIG_X86_64
867867
static int kfd_fill_iolink_info_for_cpu(int numa_node_id, int *avail_size,
868868
uint32_t *num_entries,
869869
struct crat_subtype_iolink *sub_type_hdr)

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4082,7 +4082,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
40824082
}
40834083

40844084
if (connector_type == DRM_MODE_CONNECTOR_HDMIA ||
4085-
connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
4085+
connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
4086+
connector_type == DRM_MODE_CONNECTOR_eDP) {
40864087
drm_connector_attach_vrr_capable_property(
40874088
&aconnector->base);
40884089
}

drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,15 @@ static void dce11_pplib_apply_display_requirements(
591591
dc,
592592
context->bw.dce.sclk_khz);
593593

594-
pp_display_cfg->min_dcfclock_khz = pp_display_cfg->min_engine_clock_khz;
594+
/*
595+
* As workaround for >4x4K lightup set dcfclock to min_engine_clock value.
596+
* This is not required for less than 5 displays,
597+
* thus don't request decfclk in dc to avoid impact
598+
* on power saving.
599+
*
600+
*/
601+
pp_display_cfg->min_dcfclock_khz = (context->stream_count > 4)?
602+
pp_display_cfg->min_engine_clock_khz : 0;
595603

596604
pp_display_cfg->min_engine_clock_deep_sleep_khz
597605
= context->bw.dce.sclk_deep_sleep_khz;

0 commit comments

Comments
 (0)