aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch
new file mode 100644
index 00000000..16751577
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1264-drm-amd-amdkfd-kcl-for-supporting-Rhel7.2.patch
@@ -0,0 +1,122 @@
+From 9d9dd7e29f3213fdf6ca083e80490da2f711bb3f Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Thu, 27 Apr 2017 11:32:21 +0800
+Subject: [PATCH 1264/4131] drm/amd/amdkfd: kcl for supporting Rhel7.2
+
+Change-Id: Ibec9699346b02357c9c684492f1ab346dff07b05
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 ++++--
+ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 ++--
+ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++--
+ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 4 ++--
+ drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 2 +-
+ 5 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+index 68fa045..f394f05 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+@@ -853,7 +853,8 @@ static int kfd_ioctl_get_clock_counters(struct file *filep,
+ {
+ struct kfd_ioctl_get_clock_counters_args *args = data;
+ struct kfd_dev *dev;
+-#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6)
++#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6) \
++ || (defined OS_NAME_RHEL_7_2)
+ struct timespec time;
+ #else
+ struct timespec64 time;
+@@ -869,7 +870,8 @@ static int kfd_ioctl_get_clock_counters(struct file *filep,
+ args->gpu_clock_counter = 0;
+
+ /* No access to rdtsc. Using raw monotonic time */
+-#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6)
++#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6) \
++ || (defined OS_NAME_RHEL_7_2)
+ getrawmonotonic(&time);
+ args->cpu_clock_counter = (uint64_t)timespec_to_ns(&time);
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
+index 27e62c3..a9e3681 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
+@@ -494,7 +494,7 @@ static int update_mqd_hiq(struct mqd_manager *mm, void *mqd,
+
+ static int debugfs_show_mqd(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct cik_mqd), false);
+ #endif
+@@ -503,7 +503,7 @@ static int debugfs_show_mqd(struct seq_file *m, void *data)
+
+ static int debugfs_show_mqd_sdma(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct cik_sdma_rlc_registers), false);
+ #endif
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+index 191b98b..2f12e80 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+@@ -436,7 +436,7 @@ static bool is_occupied_sdma(struct mqd_manager *mm, void *mqd,
+
+ static int debugfs_show_mqd(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct v9_mqd), false);
+ #endif
+@@ -445,7 +445,7 @@ static int debugfs_show_mqd(struct seq_file *m, void *data)
+
+ static int debugfs_show_mqd_sdma(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct v9_sdma_mqd), false);
+ #endif
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
+index 1957383..fb30623 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c
+@@ -458,7 +458,7 @@ static bool is_occupied_sdma(struct mqd_manager *mm, void *mqd,
+
+ static int debugfs_show_mqd(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct vi_mqd), false);
+ #endif
+@@ -467,7 +467,7 @@ static int debugfs_show_mqd(struct seq_file *m, void *data)
+
+ static int debugfs_show_mqd_sdma(struct seq_file *m, void *data)
+ {
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ data, sizeof(struct vi_sdma_mqd), false);
+ #endif
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
+index 453cab4..d4d521d 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
+@@ -404,7 +404,7 @@ int pm_debugfs_runlist(struct seq_file *m, void *data)
+ return 0;
+ }
+
+-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0)
++#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 0, 0) && !defined(OS_NAME_RHEL_7_2)
+ seq_hex_dump(m, " ", DUMP_PREFIX_OFFSET, 32, 4,
+ pm->ib_buffer_obj->cpu_ptr, pm->ib_size_bytes, false);
+ #endif
+--
+2.7.4
+