All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
@ 2018-09-05 15:30 shaoyunl
       [not found] ` <1536161452-4429-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: shaoyunl @ 2018-09-05 15:30 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Shaoyun Liu

From: Shaoyun Liu <Shaoyun.Liu@amd.com>

Add dummy function for xgmi function interface with psp

Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index b70cfa3..b1c0b33 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
 	return 0;
 }
 
+static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
+	int number_devices, struct psp_xgmi_topology_info *topology)
+{
+	return 0;
+}
+
+static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
+	int number_devices, struct psp_xgmi_topology_info *topology)
+{
+	return 0;
+}
+
+static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
+{
+	u64 hive_id = 0;
+
+	/* Remove me when normal psp interface is ready */
+	if (psp->adev->gmc.xgmi.num_physical_nodes)
+		hive_id = 0x123456789abcdef;
+
+	return hive_id;
+}
+
 static const struct psp_funcs psp_v11_0_funcs = {
 	.init_microcode = psp_v11_0_init_microcode,
 	.bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
@@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
 	.cmd_submit = psp_v11_0_cmd_submit,
 	.compare_sram_data = psp_v11_0_compare_sram_data,
 	.mode1_reset = psp_v11_0_mode1_reset,
+	.xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
+	.xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
+	.xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
 };
 
 void psp_v11_0_set_psp_funcs(struct psp_context *psp)
-- 
2.7.4

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

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

* Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
       [not found] ` <1536161452-4429-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2018-09-06  7:42   ` Christian König
       [not found]     ` <ee4f1ae8-8563-712d-d1a3-9cd0d37eda30-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2018-09-06  7:42 UTC (permalink / raw)
  To: shaoyunl, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 05.09.2018 um 17:30 schrieb shaoyunl:
> From: Shaoyun Liu <Shaoyun.Liu@amd.com>
>
> Add dummy function for xgmi function interface with psp
>
> Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>

Well NAK. We usually don't add dummy functions and that completely 
circumvents the error handling added in patch #6.

Either we should implement the functions or not call them in the first 
place.

Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index b70cfa3..b1c0b33 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
>   	return 0;
>   }
>   
> +static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
> +	int number_devices, struct psp_xgmi_topology_info *topology)
> +{
> +	return 0;
> +}
> +
> +static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
> +	int number_devices, struct psp_xgmi_topology_info *topology)
> +{
> +	return 0;
> +}
> +
> +static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
> +{
> +	u64 hive_id = 0;
> +
> +	/* Remove me when normal psp interface is ready */
> +	if (psp->adev->gmc.xgmi.num_physical_nodes)
> +		hive_id = 0x123456789abcdef;
> +
> +	return hive_id;
> +}
> +
>   static const struct psp_funcs psp_v11_0_funcs = {
>   	.init_microcode = psp_v11_0_init_microcode,
>   	.bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
> @@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
>   	.cmd_submit = psp_v11_0_cmd_submit,
>   	.compare_sram_data = psp_v11_0_compare_sram_data,
>   	.mode1_reset = psp_v11_0_mode1_reset,
> +	.xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
> +	.xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
> +	.xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
>   };
>   
>   void psp_v11_0_set_psp_funcs(struct psp_context *psp)

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

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

* Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
       [not found]     ` <ee4f1ae8-8563-712d-d1a3-9cd0d37eda30-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-09-07  6:03       ` Kuehling, Felix
       [not found]         ` <CY4PR12MB170107ED00BB1FA93D834C4392000-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Kuehling, Felix @ 2018-09-07  6:03 UTC (permalink / raw)
  To: Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Koenig,
	Christian

This is on purpose. These functions for now are place holders because the PSP firmware interface is not ready yet, and we want to start testing XGMI with higher level code with some hard-coded topology. Once we have proper PSP firmware, these place holders will be filled in.

Regards,
  Felix

________________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Thursday, September 6, 2018 3:42:33 AM
To: Liu, Shaoyun; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp

Am 05.09.2018 um 17:30 schrieb shaoyunl:
> From: Shaoyun Liu <Shaoyun.Liu@amd.com>
>
> Add dummy function for xgmi function interface with psp
>
> Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>

Well NAK. We usually don't add dummy functions and that completely
circumvents the error handling added in patch #6.

Either we should implement the functions or not call them in the first
place.

Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index b70cfa3..b1c0b33 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
>       return 0;
>   }
>
> +static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
> +     int number_devices, struct psp_xgmi_topology_info *topology)
> +{
> +     return 0;
> +}
> +
> +static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
> +     int number_devices, struct psp_xgmi_topology_info *topology)
> +{
> +     return 0;
> +}
> +
> +static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
> +{
> +     u64 hive_id = 0;
> +
> +     /* Remove me when normal psp interface is ready */
> +     if (psp->adev->gmc.xgmi.num_physical_nodes)
> +             hive_id = 0x123456789abcdef;
> +
> +     return hive_id;
> +}
> +
>   static const struct psp_funcs psp_v11_0_funcs = {
>       .init_microcode = psp_v11_0_init_microcode,
>       .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
> @@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
>       .cmd_submit = psp_v11_0_cmd_submit,
>       .compare_sram_data = psp_v11_0_compare_sram_data,
>       .mode1_reset = psp_v11_0_mode1_reset,
> +     .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
> +     .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
> +     .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
>   };
>
>   void psp_v11_0_set_psp_funcs(struct psp_context *psp)

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

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

* Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
       [not found]         ` <CY4PR12MB170107ED00BB1FA93D834C4392000-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-09-07  9:05           ` Christian König
       [not found]             ` <2c1a277f-83d1-da5d-fb40-321446588d49-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2018-09-07  9:05 UTC (permalink / raw)
  To: Kuehling, Felix, Liu, Shaoyun,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Koenig, Christian

Well, exactly that's my point. How certain are we that the PSP firmware 
interface is not going to change?

At bare minimum we should add big "/* TODOD: .. */" markers all around 
explaining why those functions aren't implemented yet.

Thanks,
Christian.

Am 07.09.2018 um 08:03 schrieb Kuehling, Felix:
> This is on purpose. These functions for now are place holders because the PSP firmware interface is not ready yet, and we want to start testing XGMI with higher level code with some hard-coded topology. Once we have proper PSP firmware, these place holders will be filled in.
>
> Regards,
>    Felix
>
> ________________________________________
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Thursday, September 6, 2018 3:42:33 AM
> To: Liu, Shaoyun; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
>
> Am 05.09.2018 um 17:30 schrieb shaoyunl:
>> From: Shaoyun Liu <Shaoyun.Liu@amd.com>
>>
>> Add dummy function for xgmi function interface with psp
>>
>> Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
>> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
>> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> Well NAK. We usually don't add dummy functions and that completely
> circumvents the error handling added in patch #6.
>
> Either we should implement the functions or not call them in the first
> place.
>
> Christian.
>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26 ++++++++++++++++++++++++++
>>    1 file changed, 26 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> index b70cfa3..b1c0b33 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>> @@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
>>        return 0;
>>    }
>>
>> +static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>> +{
>> +     return 0;
>> +}
>> +
>> +static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>> +{
>> +     return 0;
>> +}
>> +
>> +static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
>> +{
>> +     u64 hive_id = 0;
>> +
>> +     /* Remove me when normal psp interface is ready */
>> +     if (psp->adev->gmc.xgmi.num_physical_nodes)
>> +             hive_id = 0x123456789abcdef;
>> +
>> +     return hive_id;
>> +}
>> +
>>    static const struct psp_funcs psp_v11_0_funcs = {
>>        .init_microcode = psp_v11_0_init_microcode,
>>        .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
>> @@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
>>        .cmd_submit = psp_v11_0_cmd_submit,
>>        .compare_sram_data = psp_v11_0_compare_sram_data,
>>        .mode1_reset = psp_v11_0_mode1_reset,
>> +     .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
>> +     .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
>> +     .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
>>    };
>>
>>    void psp_v11_0_set_psp_funcs(struct psp_context *psp)
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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

* Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
       [not found]             ` <2c1a277f-83d1-da5d-fb40-321446588d49-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-09-07 18:10               ` Felix Kuehling
       [not found]                 ` <66bfa07e-ba29-d77c-a2e4-b6a2c15e4952-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Felix Kuehling @ 2018-09-07 18:10 UTC (permalink / raw)
  To: christian.koenig-5C7GfCeVMHo, Liu, Shaoyun,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 2018-09-07 05:05 AM, Christian König wrote:
> Well, exactly that's my point. How certain are we that the PSP
> firmware interface is not going to change?

The interface has been defined and agreed on and is being implemented at
the moment. The placeholders here are based on that design. Of course
that's not a guarantee that it won't change, but it's the best we can do
to be prepared and allow us to make progress in the mean time.

>
> At bare minimum we should add big "/* TODOD: .. */" markers all around
> explaining why those functions aren't implemented yet.

OK.

Regards,
  Felix

>
> Thanks,
> Christian.
>
> Am 07.09.2018 um 08:03 schrieb Kuehling, Felix:
>> This is on purpose. These functions for now are place holders because
>> the PSP firmware interface is not ready yet, and we want to start
>> testing XGMI with higher level code with some hard-coded topology.
>> Once we have proper PSP firmware, these place holders will be filled in.
>>
>> Regards,
>>    Felix
>>
>> ________________________________________
>> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of
>> Christian König <ckoenig.leichtzumerken@gmail.com>
>> Sent: Thursday, September 6, 2018 3:42:33 AM
>> To: Liu, Shaoyun; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for
>> xgmi topology interface with psp
>>
>> Am 05.09.2018 um 17:30 schrieb shaoyunl:
>>> From: Shaoyun Liu <Shaoyun.Liu@amd.com>
>>>
>>> Add dummy function for xgmi function interface with psp
>>>
>>> Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
>>> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
>>> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
>> Well NAK. We usually don't add dummy functions and that completely
>> circumvents the error handling added in patch #6.
>>
>> Either we should implement the functions or not call them in the first
>> place.
>>
>> Christian.
>>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26
>>> ++++++++++++++++++++++++++
>>>    1 file changed, 26 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>> index b70cfa3..b1c0b33 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>> @@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct
>>> psp_context *psp)
>>>        return 0;
>>>    }
>>>
>>> +static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
>>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>>> +{
>>> +     return 0;
>>> +}
>>> +
>>> +static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
>>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>>> +{
>>> +     return 0;
>>> +}
>>> +
>>> +static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
>>> +{
>>> +     u64 hive_id = 0;
>>> +
>>> +     /* Remove me when normal psp interface is ready */
>>> +     if (psp->adev->gmc.xgmi.num_physical_nodes)
>>> +             hive_id = 0x123456789abcdef;
>>> +
>>> +     return hive_id;
>>> +}
>>> +
>>>    static const struct psp_funcs psp_v11_0_funcs = {
>>>        .init_microcode = psp_v11_0_init_microcode,
>>>        .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
>>> @@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
>>>        .cmd_submit = psp_v11_0_cmd_submit,
>>>        .compare_sram_data = psp_v11_0_compare_sram_data,
>>>        .mode1_reset = psp_v11_0_mode1_reset,
>>> +     .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
>>> +     .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
>>> +     .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
>>>    };
>>>
>>>    void psp_v11_0_set_psp_funcs(struct psp_context *psp)
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>

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

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

* Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp
       [not found]                 ` <66bfa07e-ba29-d77c-a2e4-b6a2c15e4952-5C7GfCeVMHo@public.gmane.org>
@ 2018-09-07 18:25                   ` Christian König
  0 siblings, 0 replies; 6+ messages in thread
From: Christian König @ 2018-09-07 18:25 UTC (permalink / raw)
  To: Felix Kuehling, Liu, Shaoyun, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Ok in this case feel free to add my Acked-by.

Christian.

Am 07.09.2018 um 20:10 schrieb Felix Kuehling:
> On 2018-09-07 05:05 AM, Christian König wrote:
>> Well, exactly that's my point. How certain are we that the PSP
>> firmware interface is not going to change?
> The interface has been defined and agreed on and is being implemented at
> the moment. The placeholders here are based on that design. Of course
> that's not a guarantee that it won't change, but it's the best we can do
> to be prepared and allow us to make progress in the mean time.
>
>> At bare minimum we should add big "/* TODOD: .. */" markers all around
>> explaining why those functions aren't implemented yet.
> OK.
>
> Regards,
>    Felix
>
>> Thanks,
>> Christian.
>>
>> Am 07.09.2018 um 08:03 schrieb Kuehling, Felix:
>>> This is on purpose. These functions for now are place holders because
>>> the PSP firmware interface is not ready yet, and we want to start
>>> testing XGMI with higher level code with some hard-coded topology.
>>> Once we have proper PSP firmware, these place holders will be filled in.
>>>
>>> Regards,
>>>     Felix
>>>
>>> ________________________________________
>>> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of
>>> Christian König <ckoenig.leichtzumerken@gmail.com>
>>> Sent: Thursday, September 6, 2018 3:42:33 AM
>>> To: Liu, Shaoyun; amd-gfx@lists.freedesktop.org
>>> Subject: Re: [PATCH 07/13] drm/amdgpu: Add place holder functions for
>>> xgmi topology interface with psp
>>>
>>> Am 05.09.2018 um 17:30 schrieb shaoyunl:
>>>> From: Shaoyun Liu <Shaoyun.Liu@amd.com>
>>>>
>>>> Add dummy function for xgmi function interface with psp
>>>>
>>>> Change-Id: I01f35baf5a4b96e9654d448c9892be3cd72c05b7
>>>> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
>>>> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>> Well NAK. We usually don't add dummy functions and that completely
>>> circumvents the error handling added in patch #6.
>>>
>>> Either we should implement the functions or not call them in the first
>>> place.
>>>
>>> Christian.
>>>
>>>> ---
>>>>     drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26
>>>> ++++++++++++++++++++++++++
>>>>     1 file changed, 26 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>>> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>>> index b70cfa3..b1c0b33 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
>>>> @@ -548,6 +548,29 @@ static int psp_v11_0_mode1_reset(struct
>>>> psp_context *psp)
>>>>         return 0;
>>>>     }
>>>>
>>>> +static int psp_v11_0_xgmi_get_topology_info(struct psp_context *psp,
>>>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>>>> +{
>>>> +     return 0;
>>>> +}
>>>> +
>>>> +static int psp_v11_0_xgmi_set_topology_info(struct psp_context *psp,
>>>> +     int number_devices, struct psp_xgmi_topology_info *topology)
>>>> +{
>>>> +     return 0;
>>>> +}
>>>> +
>>>> +static u64 psp_v11_0_xgmi_get_hive_id(struct psp_context *psp)
>>>> +{
>>>> +     u64 hive_id = 0;
>>>> +
>>>> +     /* Remove me when normal psp interface is ready */
>>>> +     if (psp->adev->gmc.xgmi.num_physical_nodes)
>>>> +             hive_id = 0x123456789abcdef;
>>>> +
>>>> +     return hive_id;
>>>> +}
>>>> +
>>>>     static const struct psp_funcs psp_v11_0_funcs = {
>>>>         .init_microcode = psp_v11_0_init_microcode,
>>>>         .bootloader_load_sysdrv = psp_v11_0_bootloader_load_sysdrv,
>>>> @@ -560,6 +583,9 @@ static const struct psp_funcs psp_v11_0_funcs = {
>>>>         .cmd_submit = psp_v11_0_cmd_submit,
>>>>         .compare_sram_data = psp_v11_0_compare_sram_data,
>>>>         .mode1_reset = psp_v11_0_mode1_reset,
>>>> +     .xgmi_get_topology_info = psp_v11_0_xgmi_get_topology_info,
>>>> +     .xgmi_set_topology_info = psp_v11_0_xgmi_set_topology_info,
>>>> +     .xgmi_get_hive_id = psp_v11_0_xgmi_get_hive_id,
>>>>     };
>>>>
>>>>     void psp_v11_0_set_psp_funcs(struct psp_context *psp)
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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

end of thread, other threads:[~2018-09-07 18:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 15:30 [PATCH 07/13] drm/amdgpu: Add place holder functions for xgmi topology interface with psp shaoyunl
     [not found] ` <1536161452-4429-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>
2018-09-06  7:42   ` Christian König
     [not found]     ` <ee4f1ae8-8563-712d-d1a3-9cd0d37eda30-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-07  6:03       ` Kuehling, Felix
     [not found]         ` <CY4PR12MB170107ED00BB1FA93D834C4392000-rpdhrqHFk05QaJCA3gGb3wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-09-07  9:05           ` Christian König
     [not found]             ` <2c1a277f-83d1-da5d-fb40-321446588d49-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-07 18:10               ` Felix Kuehling
     [not found]                 ` <66bfa07e-ba29-d77c-a2e4-b6a2c15e4952-5C7GfCeVMHo@public.gmane.org>
2018-09-07 18:25                   ` Christian König

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.