aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch
new file mode 100644
index 00000000..56776086
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2577-drm-amdgpu-early-merge-post-fix-to-df_v3_6-for-xgmi.patch
@@ -0,0 +1,95 @@
+From b379ae77aca9b23994c1a9fe973b84bd041025e0 Mon Sep 17 00:00:00 2001
+From: Jonathan Kim <jonathan.kim@amd.com>
+Date: Thu, 20 Jun 2019 01:15:29 -0400
+Subject: [PATCH 2577/2940] drm/amdgpu: early merge post fix to df_v3_6 for
+ xgmi
+
+fixed df permon to 4
+removed unrequired ret in soc15
+changed df init to df sw_init
+
+Change-Id: I0098b86daa33f2dc20b6652104296d0d4e8bd030
+Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++-
+ drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
+ drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++---
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 56ff37805142..6972f808b388 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -703,6 +703,7 @@ struct amdgpu_nbio_funcs {
+
+ struct amdgpu_df_funcs {
+ void (*init)(struct amdgpu_device *adev);
++ void (*sw_init)(struct amdgpu_device *adev);
+ void (*enable_broadcast_mode)(struct amdgpu_device *adev,
+ bool enable);
+ u32 (*get_fb_channel_number)(struct amdgpu_device *adev);
+@@ -772,7 +773,7 @@ struct amd_powerplay {
+ };
+
+ #define AMDGPU_RESET_MAGIC_NUM 64
+-#define AMDGPU_MAX_DF_PERFMONS 16
++#define AMDGPU_MAX_DF_PERFMONS 4
+ struct amdgpu_device {
+ struct device *dev;
+ struct drm_device *ddev;
+diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
+index 08780fa10f32..7e0e8cda31b7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
++++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
+@@ -118,7 +118,7 @@ static ssize_t df_v3_6_get_df_cntr_avail(struct device *dev,
+ static DEVICE_ATTR(df_cntr_avail, S_IRUGO, df_v3_6_get_df_cntr_avail, NULL);
+
+ /* init perfmons */
+-static void df_v3_6_init(struct amdgpu_device *adev)
++static void df_v3_6_sw_init(struct amdgpu_device *adev)
+ {
+ int i, ret;
+
+@@ -491,7 +491,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,
+ }
+
+ const struct amdgpu_df_funcs df_v3_6_funcs = {
+- .init = df_v3_6_init,
++ .sw_init = df_v3_6_sw_init,
+ .enable_broadcast_mode = df_v3_6_enable_broadcast_mode,
+ .get_fb_channel_number = df_v3_6_get_fb_channel_number,
+ .get_hbm_channel_number = df_v3_6_get_hbm_channel_number,
+diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
+index be4d88ce4e74..52a7f30334e5 100644
+--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
++++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
+@@ -1024,6 +1024,8 @@ static int soc15_common_sw_init(void *handle)
+ if (amdgpu_sriov_vf(adev))
+ xgpu_ai_mailbox_add_irq_id(adev);
+
++ adev->df_funcs->sw_init(adev);
++
+ return 0;
+ }
+
+@@ -1057,7 +1059,6 @@ static void soc15_doorbell_range_init(struct amdgpu_device *adev)
+ static int soc15_common_hw_init(void *handle)
+ {
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+- int ret;
+
+ /* enable pcie gen2/3 link */
+ soc15_pcie_gen3_enable(adev);
+@@ -1072,8 +1073,6 @@ static int soc15_common_hw_init(void *handle)
+ if (adev->nbio_funcs->remap_hdp_registers)
+ adev->nbio_funcs->remap_hdp_registers(adev);
+
+- adev->df_funcs->init(adev);
+-
+ /* enable the doorbell aperture */
+ soc15_enable_doorbell_aperture(adev, true);
+ /* HW doorbell routing policy: doorbell writing not
+--
+2.17.1
+