diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3313-drm-amdkfd-Add-gpu-reset-interface-and-place-holder.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3313-drm-amdkfd-Add-gpu-reset-interface-and-place-holder.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3313-drm-amdkfd-Add-gpu-reset-interface-and-place-holder.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3313-drm-amdkfd-Add-gpu-reset-interface-and-place-holder.patch new file mode 100644 index 00000000..534b1eeb --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3313-drm-amdkfd-Add-gpu-reset-interface-and-place-holder.patch @@ -0,0 +1,66 @@ +From e6e164390d4d12e9afc8798ea5b0afd11bcdb379 Mon Sep 17 00:00:00 2001 +From: Shaoyun Liu <Shaoyun.Liu@amd.com> +Date: Fri, 26 Jan 2018 12:14:58 -0500 +Subject: [PATCH 3313/4131] drm/amdkfd: Add gpu reset interface and place + holder + +Change-Id: I0e3bc1761992e95138b7b5508bfe9cbb09fe3208 +Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 ++++++++++ + drivers/gpu/drm/amd/amdkfd/kfd_module.c | 2 ++ + drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 ++++ + 3 files changed, 16 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c +index 489c4a8..d3cfd67 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c +@@ -646,6 +646,16 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd) + kfree(kfd); + } + ++int kgd2kfd_pre_reset(struct kfd_dev *kfd) ++{ ++ return 0; ++} ++ ++int kgd2kfd_post_reset(struct kfd_dev *kfd) ++{ ++ return 0; ++} ++ + void kgd2kfd_suspend(struct kfd_dev *kfd) + { + if (!kfd->init_complete) +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_module.c b/drivers/gpu/drm/amd/amdkfd/kfd_module.c +index c3e50e2..b6f9d23 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_module.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_module.c +@@ -46,6 +46,8 @@ static const struct kgd2kfd_calls kgd2kfd = { + .resume_mm = kgd2kfd_resume_mm, + .schedule_evict_and_restore_process = + kgd2kfd_schedule_evict_and_restore_process, ++ .pre_reset = kgd2kfd_pre_reset, ++ .post_reset = kgd2kfd_post_reset, + }; + + int sched_policy = KFD_SCHED_POLICY_HWS; +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +index e04f6f9..28fac2d 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +@@ -884,6 +884,10 @@ bool interrupt_is_wanted(struct kfd_dev *dev, + void kgd2kfd_suspend(struct kfd_dev *kfd); + int kgd2kfd_resume(struct kfd_dev *kfd); + ++/* GPU reset */ ++int kgd2kfd_pre_reset(struct kfd_dev *kfd); ++int kgd2kfd_post_reset(struct kfd_dev *kfd); ++ + /* amdkfd Apertures */ + int kfd_init_apertures(struct kfd_process *process); + int kfd_set_process_dgpu_aperture(struct kfd_process_device *pdd, +-- +2.7.4 + |