drm/amdgpu: early merge post fix to df_v3_6 for xgmi
Subsystems (2)
PATCH 1/1 drm/amdgpu: early merge post fix to df_v3_6 for xgmi
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
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -732,7 +732,7 @@ struct amd_powerplay { };#define AMDGPU_RESET_MAGIC_NUM 64 -#define AMDGPU_MAX_DF_PERFMONS 16 +#define AMDGPU_MAX_DF_PERFMONS 4struct amdgpu_device {struct device *dev;struct drm_device *ddev;
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +2 -2
@@ -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,
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -3
@@ -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
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 40 lines · 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 initChange-Id Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7Signed-off-by Jonathan Kim <[email protected]>--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-1@@ -732,7 +732,7 @@ struct amd_powerplay { };#define AMDGPU_RESET_MAGIC_NUM 64 -#define AMDGPU_MAX_DF_PERFMONS 16 +#define AMDGPU_MAX_DF_PERFMONS 4struct amdgpu_device {struct device *dev;struct drm_device *ddev;drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1@@ -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;
drivers/gpu/drm/amd/amdgpu/df_v3_6.c static void df_v3_6_pmc_get_count(struct amdgpu_device *adev, · line 493
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1@@ -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,
Also rename the .init field in struct amdgpu_df_funcs to .sw_init.
With that fixed the patch is Reviewed-by: Felix Kuehling <[email protected]>
Quoted 25 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +0
-0.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,drivers/gpu/drm/amd/amdgpu/soc15.c +2
-1@@ -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);
drivers/gpu/drm/amd/amdgpu/soc15.c static int soc15_common_hw_init(void *handle) · line 1088
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +0
-2@@ -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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 41 lines · 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 initChange-Id Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7Signed-off-by Jonathan Kim <[email protected]>--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-1@@ -732,7 +732,7 @@ struct amd_powerplay { };#define AMDGPU_RESET_MAGIC_NUM 64 -#define AMDGPU_MAX_DF_PERFMONS 16 +#define AMDGPU_MAX_DF_PERFMONS 4struct amdgpu_device {struct device *dev;struct drm_device *ddev;drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1@@ -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;
drivers/gpu/drm/amd/amdgpu/df_v3_6.c static void df_v3_6_pmc_get_count(struct amdgpu_device *adev, · line 493
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1@@ -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,
Wasn't there a fini callback as well to tear stuff down? What happened to that? Apologies if I missed some of the discussion, I'm still catching up.
Alex
Quoted 36 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +0
-0.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,drivers/gpu/drm/amd/amdgpu/soc15.c +2
-4@@ -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
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_MRS_oT1fC45eEqJ3CTdNYc6eKuu2Fu-KTLJ3hbaUUfAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 43 lines · Alex Deucher
Quoted 42 lines · 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 initChange-Id Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7Signed-off-by Jonathan Kim <[email protected]>--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-1@@ -732,7 +732,7 @@ struct amd_powerplay { };#define AMDGPU_RESET_MAGIC_NUM 64 -#define AMDGPU_MAX_DF_PERFMONS 16 +#define AMDGPU_MAX_DF_PERFMONS 4struct amdgpu_device {struct device *dev;struct drm_device *ddev;drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1@@ -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, }
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c static void df_v3_6_pmc_get_count(struct amdgpu_device *adev, · line 493
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +1
-1const struct amdgpu_df_funcs df_v3_6_funcs = { - .init = df_v3_6_init, + .init = df_v3_6_sw_init,Wasn't there a fini callback as well to tear stuff down? What happened to that? Apologies if I missed some of the discussion, I'm still catching up.
The fini callback became unnecessary when we removed dynamic allocation of memory in the init function. So it wasn't in the final version of the patch.
Regards,
Felix
Quoted 39 lines
Alex
Quoted 36 lines
drivers/gpu/drm/amd/amdgpu/df_v3_6.c +0
-0.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,drivers/gpu/drm/amd/amdgpu/soc15.c +2
-4@@ -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
Quoted 8 lines
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx