Merge tag 'drm-amdkfd-fixes-2018-04-24' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes
- fix amdkfd Kconfig to select MMU_NOTIFIER - allow clock retrieval in case GPU not present - fix return code from function - make function static (fix sparse warning) * tag 'drm-amdkfd-fixes-2018-04-24' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: fix build, select MMU_NOTIFIER drm/amdkfd: fix clock counter retrieval for node without GPU drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu() drm/amdkfd: kfd_dev_is_large_bar() can be static
This commit is contained in:
commit
d736aa62c2
drivers/gpu/drm/amd/amdkfd
@ -6,5 +6,6 @@ config HSA_AMD
|
|||||||
tristate "HSA kernel driver for AMD GPU devices"
|
tristate "HSA kernel driver for AMD GPU devices"
|
||||||
depends on DRM_AMDGPU && X86_64
|
depends on DRM_AMDGPU && X86_64
|
||||||
imply AMD_IOMMU_V2
|
imply AMD_IOMMU_V2
|
||||||
|
select MMU_NOTIFIER
|
||||||
help
|
help
|
||||||
Enable this if you want to use HSA features on AMD GPU devices.
|
Enable this if you want to use HSA features on AMD GPU devices.
|
||||||
|
@ -749,12 +749,13 @@ static int kfd_ioctl_get_clock_counters(struct file *filep,
|
|||||||
struct timespec64 time;
|
struct timespec64 time;
|
||||||
|
|
||||||
dev = kfd_device_by_id(args->gpu_id);
|
dev = kfd_device_by_id(args->gpu_id);
|
||||||
if (dev == NULL)
|
if (dev)
|
||||||
return -EINVAL;
|
/* Reading GPU clock counter from KGD */
|
||||||
|
args->gpu_clock_counter =
|
||||||
/* Reading GPU clock counter from KGD */
|
dev->kfd2kgd->get_gpu_clock_counter(dev->kgd);
|
||||||
args->gpu_clock_counter =
|
else
|
||||||
dev->kfd2kgd->get_gpu_clock_counter(dev->kgd);
|
/* Node without GPU resource */
|
||||||
|
args->gpu_clock_counter = 0;
|
||||||
|
|
||||||
/* No access to rdtsc. Using raw monotonic time */
|
/* No access to rdtsc. Using raw monotonic time */
|
||||||
getrawmonotonic64(&time);
|
getrawmonotonic64(&time);
|
||||||
@ -1147,7 +1148,7 @@ err_unlock:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool kfd_dev_is_large_bar(struct kfd_dev *dev)
|
static bool kfd_dev_is_large_bar(struct kfd_dev *dev)
|
||||||
{
|
{
|
||||||
struct kfd_local_mem_info mem_info;
|
struct kfd_local_mem_info mem_info;
|
||||||
|
|
||||||
@ -1421,7 +1422,7 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
|
|||||||
|
|
||||||
pdd = kfd_get_process_device_data(dev, p);
|
pdd = kfd_get_process_device_data(dev, p);
|
||||||
if (!pdd) {
|
if (!pdd) {
|
||||||
err = PTR_ERR(pdd);
|
err = -EINVAL;
|
||||||
goto bind_process_to_device_failed;
|
goto bind_process_to_device_failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user