All of lore.kernel.org
 help / color / mirror / Atom feed
* release ex mode after hw_init
@ 2017-11-06  8:18 Pixel Ding
       [not found] ` <1509956320-10208-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Pixel Ding @ 2017-11-06  8:18 UTC (permalink / raw)
  To: Felix.Kuehling-5C7GfCeVMHo, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hi Felix,

Please review.

[PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init
As you suggested, move kfd init/fini inside amdgpu_device_init.
Other changes for KFD interfaces are dropped.

[PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init

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

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

* [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init
       [not found] ` <1509956320-10208-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-06  8:18   ` Pixel Ding
  2017-11-06  8:18   ` [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init Pixel Ding
  2017-11-06 16:01   ` release ex " Felix Kuehling
  2 siblings, 0 replies; 5+ messages in thread
From: Pixel Ding @ 2017-11-06  8:18 UTC (permalink / raw)
  To: Felix.Kuehling-5C7GfCeVMHo, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: pding

From: pding <Pixel.Ding@amd.com>

Also finalize kfd inside amdgpu_device_fini. kfd device_init needs
SRIOV exclusive accessing. Try to gather exclusive accessing to
reduce time consuming.

Signed-off-by: pding <Pixel.Ding@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7b7439f..7161af2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1693,6 +1693,8 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
 	if (r)
 		return r;
 
+	amdgpu_amdkfd_device_probe(adev);
+
 	if (amdgpu_sriov_vf(adev)) {
 		r = amdgpu_virt_request_full_gpu(adev, true);
 		if (r)
@@ -1787,6 +1789,7 @@ static int amdgpu_init(struct amdgpu_device *adev)
 		adev->ip_blocks[i].status.hw = true;
 	}
 
+	amdgpu_amdkfd_device_init(adev);
 	return 0;
 }
 
@@ -1854,6 +1857,7 @@ static int amdgpu_fini(struct amdgpu_device *adev)
 {
 	int i, r;
 
+	amdgpu_amdkfd_device_fini(adev);
 	/* need to disable SMC first */
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if (!adev->ip_blocks[i].status.hw)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 3e9760d..c5d2419 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -63,8 +63,6 @@ void amdgpu_driver_unload_kms(struct drm_device *dev)
 		pm_runtime_forbid(dev->dev);
 	}
 
-	amdgpu_amdkfd_device_fini(adev);
-
 	amdgpu_acpi_fini(adev);
 
 	amdgpu_device_fini(adev);
@@ -170,9 +168,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
 				"Error during ACPI methods call\n");
 	}
 
-	amdgpu_amdkfd_device_probe(adev);
-	amdgpu_amdkfd_device_init(adev);
-
 	if (amdgpu_device_is_px(dev)) {
 		pm_runtime_use_autosuspend(dev->dev);
 		pm_runtime_set_autosuspend_delay(dev->dev, 5000);
-- 
2.9.5

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

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

* [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init
       [not found] ` <1509956320-10208-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
  2017-11-06  8:18   ` [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init Pixel Ding
@ 2017-11-06  8:18   ` Pixel Ding
  2017-11-06 16:01   ` release ex " Felix Kuehling
  2 siblings, 0 replies; 5+ messages in thread
From: Pixel Ding @ 2017-11-06  8:18 UTC (permalink / raw)
  To: Felix.Kuehling-5C7GfCeVMHo, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: pding

From: pding <Pixel.Ding@amd.com>

Signed-off-by: pding <Pixel.Ding@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 3 ---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7161af2..6f01dda 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1790,6 +1790,10 @@ static int amdgpu_init(struct amdgpu_device *adev)
 	}
 
 	amdgpu_amdkfd_device_init(adev);
+
+	if (amdgpu_sriov_vf(adev))
+		amdgpu_virt_release_full_gpu(adev, true);
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index c5d2419..1d56b5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -177,9 +177,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		pm_runtime_put_autosuspend(dev->dev);
 	}
 
-	if (amdgpu_sriov_vf(adev))
-		amdgpu_virt_release_full_gpu(adev, true);
-
 out:
 	if (r) {
 		/* balance pm_runtime_get_sync in amdgpu_driver_unload_kms */
-- 
2.9.5

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

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

* Re: release ex mode after hw_init
       [not found] ` <1509956320-10208-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
  2017-11-06  8:18   ` [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init Pixel Ding
  2017-11-06  8:18   ` [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init Pixel Ding
@ 2017-11-06 16:01   ` Felix Kuehling
       [not found]     ` <85376f85-7407-53a1-e10a-5095e888de27-5C7GfCeVMHo@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Felix Kuehling @ 2017-11-06 16:01 UTC (permalink / raw)
  To: Pixel Ding, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Oded Gabbay

[+Oded]

Hi Pixel,

Thanks, this looks a lot cleaner. The series is Reviewed-by: Felix
Kuehling <Felix.Kuehling@amd.com>. Oded, are you OK with this as well?

Regards,
  Felix


On 2017-11-06 03:18 AM, Pixel Ding wrote:
> Hi Felix,
>
> Please review.
>
> [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init
> As you suggested, move kfd init/fini inside amdgpu_device_init.
> Other changes for KFD interfaces are dropped.
>
> [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init
>

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

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

* Re: release ex mode after hw_init
       [not found]     ` <85376f85-7407-53a1-e10a-5095e888de27-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-09  7:18       ` Oded Gabbay
  0 siblings, 0 replies; 5+ messages in thread
From: Oded Gabbay @ 2017-11-09  7:18 UTC (permalink / raw)
  To: Felix Kuehling; +Cc: Pixel Ding, amd-gfx list

Yes, that's fine now

On Mon, Nov 6, 2017 at 6:01 PM, Felix Kuehling <felix.kuehling@amd.com> wrote:
> [+Oded]
>
> Hi Pixel,
>
> Thanks, this looks a lot cleaner. The series is Reviewed-by: Felix
> Kuehling <Felix.Kuehling@amd.com>. Oded, are you OK with this as well?
>
> Regards,
>   Felix
>
>
> On 2017-11-06 03:18 AM, Pixel Ding wrote:
>> Hi Felix,
>>
>> Please review.
>>
>> [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init
>> As you suggested, move kfd init/fini inside amdgpu_device_init.
>> Other changes for KFD interfaces are dropped.
>>
>> [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init
>>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2017-11-09  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06  8:18 release ex mode after hw_init Pixel Ding
     [not found] ` <1509956320-10208-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-11-06  8:18   ` [PATCH 1/2] drm/amdkfd: initialise kfd inside amdgpu_device_init Pixel Ding
2017-11-06  8:18   ` [PATCH 2/2] drm/amdgpu: release exclusive mode after hw_init Pixel Ding
2017-11-06 16:01   ` release ex " Felix Kuehling
     [not found]     ` <85376f85-7407-53a1-e10a-5095e888de27-5C7GfCeVMHo@public.gmane.org>
2017-11-09  7:18       ` Oded Gabbay

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.