All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: early merge post fix to df_v3_6 for xgmi
@ 2019-06-20 15:19 Kim, Jonathan
       [not found] ` <20190620151924.86234-1-jonathan.kim-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Kim, Jonathan @ 2019-06-20 15:19 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Kim, Jonathan

fixed df permon to 4
removed unrequired ret in soc15
renamed df init to df sw init and moved callback from soc15 hw init to
soc15 sw init

Change-Id: Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7
Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h  | 2 +-
 drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/soc15.c   | 5 ++---
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index b227c956b8a9..c3ed09cd2678 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -732,7 +732,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 12e3e67013d9..c6514c609ae6 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;
 
@@ -490,7 +490,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,
+	.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 0afbcc80ea61..d1e7f623eea8 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -1034,6 +1034,8 @@ static int soc15_common_sw_init(void *handle)
 	if (amdgpu_sriov_vf(adev))
 		xgpu_ai_mailbox_add_irq_id(adev);
 
+	adev->df_funcs->init(adev);
+
 	return 0;
 }
 
@@ -1067,7 +1069,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);
@@ -1082,8 +1083,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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-20 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 15:19 [PATCH] drm/amdgpu: early merge post fix to df_v3_6 for xgmi Kim, Jonathan
     [not found] ` <20190620151924.86234-1-jonathan.kim-5C7GfCeVMHo@public.gmane.org>
2019-06-20 15:22   ` Kuehling, Felix
2019-06-20 15:28   ` Alex Deucher
     [not found]     ` <CADnq5_MRS_oT1fC45eEqJ3CTdNYc6eKuu2Fu-KTLJ3hbaUUfAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-06-20 15:29       ` Kuehling, Felix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.