Skip to content

Commit 9ca1f47

Browse files
committed
Merge tag 'amd-drm-next-5.8-2020-05-27' of git://people.freedesktop.org/~agd5f/linux into drm-next
amd-drm-next-5.8-2020-05-27: amdgpu: - SRIOV fixes - RAS fixes - VCN 2.5 DPG (Dynamic PowerGating) fixes - FP16 updates for display - CTF cleanups - Display fixes - Fix pcie bw sysfs handling - Enable resizeable BAR support for gmc 10.x - GFXOFF fixes for Raven - PM sysfs handling fixes amdkfd: - Fix a race condition - Warning fixes Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 5afeb97 + 185082b commit 9ca1f47

Some content is hidden

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

65 files changed

+780
-535
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ extern int amdgpu_gpu_recovery;
173173
extern int amdgpu_emu_mode;
174174
extern uint amdgpu_smu_memory_pool_size;
175175
extern uint amdgpu_dc_feature_mask;
176+
extern uint amdgpu_dc_debug_mask;
176177
extern uint amdgpu_dm_abm_level;
177178
extern struct amdgpu_mgpu_info mgpu_info;
178179
extern int amdgpu_ras_enable;
@@ -738,6 +739,7 @@ struct amdgpu_device {
738739
uint32_t rev_id;
739740
uint32_t external_rev_id;
740741
unsigned long flags;
742+
unsigned long apu_flags;
741743
int usec_timeout;
742744
const struct amdgpu_asic_funcs *asic_funcs;
743745
bool shutdown;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,15 +1302,15 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
13021302
return -EBUSY;
13031303
}
13041304

1305-
/* No more MMU notifiers */
1306-
amdgpu_mn_unregister(mem->bo);
1307-
13081305
/* Make sure restore workers don't access the BO any more */
13091306
bo_list_entry = &mem->validate_list;
13101307
mutex_lock(&process_info->lock);
13111308
list_del(&bo_list_entry->head);
13121309
mutex_unlock(&process_info->lock);
13131310

1311+
/* No more MMU notifiers */
1312+
amdgpu_mn_unregister(mem->bo);
1313+
13141314
ret = reserve_bo_and_cond_vms(mem, NULL, BO_VM_ALL, &ctx);
13151315
if (unlikely(ret))
13161316
return ret;

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,9 +1567,9 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
15671567
chip_name = "vega12";
15681568
break;
15691569
case CHIP_RAVEN:
1570-
if (adev->rev_id >= 8)
1570+
if (adev->apu_flags & AMD_APU_IS_RAVEN2)
15711571
chip_name = "raven2";
1572-
else if (adev->pdev->device == 0x15d8)
1572+
else if (adev->apu_flags & AMD_APU_IS_PICASSO)
15731573
chip_name = "picasso";
15741574
else
15751575
chip_name = "raven";
@@ -1617,8 +1617,10 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
16171617
(const struct gpu_info_firmware_v1_0 *)(adev->firmware.gpu_info_fw->data +
16181618
le32_to_cpu(hdr->header.ucode_array_offset_bytes));
16191619

1620-
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
1620+
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10) {
1621+
amdgpu_discovery_get_gfx_info(adev);
16211622
goto parse_soc_bounding_box;
1623+
}
16221624

16231625
adev->gfx.config.max_shader_engines = le32_to_cpu(gpu_info_fw->gc_num_se);
16241626
adev->gfx.config.max_cu_per_sh = le32_to_cpu(gpu_info_fw->gc_num_cu_per_sh);
@@ -1764,13 +1766,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
17641766
return -EINVAL;
17651767
}
17661768

1767-
r = amdgpu_device_parse_gpu_info_fw(adev);
1768-
if (r)
1769-
return r;
1770-
1771-
if (amdgpu_discovery && adev->asic_type >= CHIP_NAVI10)
1772-
amdgpu_discovery_get_gfx_info(adev);
1773-
17741769
amdgpu_amdkfd_device_probe(adev);
17751770

17761771
if (amdgpu_sriov_vf(adev)) {
@@ -1825,6 +1820,10 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
18251820
}
18261821
/* get the vbios after the asic_funcs are set up */
18271822
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
1823+
r = amdgpu_device_parse_gpu_info_fw(adev);
1824+
if (r)
1825+
return r;
1826+
18281827
/* skip vbios handling for new handshake */
18291828
if (amdgpu_sriov_vf(adev) && adev->virt.req_init_data_ver == 1)
18301829
continue;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
523523
break;
524524
case CHIP_RAVEN:
525525
/* enable S/G on PCO and RV2 */
526-
if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
526+
if ((adev->apu_flags & AMD_APU_IS_RAVEN2) ||
527+
(adev->apu_flags & AMD_APU_IS_PICASSO))
527528
domain |= AMDGPU_GEM_DOMAIN_GTT;
528529
break;
529530
default:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ struct amdgpu_pm {
450450

451451
/* Used for I2C access to various EEPROMs on relevant ASICs */
452452
struct i2c_adapter smu_i2c;
453+
struct list_head pm_attr_list;
453454
};
454455

455456
#define R600_SSTU_DFLT 0

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ int amdgpu_emu_mode = 0;
140140
uint amdgpu_smu_memory_pool_size = 0;
141141
/* FBC (bit 0) disabled by default*/
142142
uint amdgpu_dc_feature_mask = 0;
143+
uint amdgpu_dc_debug_mask = 0;
143144
int amdgpu_async_gfx_ring = 1;
144145
int amdgpu_mcbp = 0;
145146
int amdgpu_discovery = -1;
@@ -714,6 +715,13 @@ MODULE_PARM_DESC(queue_preemption_timeout_ms, "queue preemption timeout in ms (1
714715
MODULE_PARM_DESC(dcfeaturemask, "all stable DC features enabled (default))");
715716
module_param_named(dcfeaturemask, amdgpu_dc_feature_mask, uint, 0444);
716717

718+
/**
719+
* DOC: dcdebugmask (uint)
720+
* Override display features enabled. See enum DC_DEBUG_MASK in drivers/gpu/drm/amd/include/amd_shared.h.
721+
*/
722+
MODULE_PARM_DESC(dcdebugmask, "all debug options disabled (default))");
723+
module_param_named(dcdebugmask, amdgpu_dc_debug_mask, uint, 0444);
724+
717725
/**
718726
* DOC: abmlevel (uint)
719727
* Override the default ABM (Adaptive Backlight Management) level used for DC

0 commit comments

Comments
 (0)