AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alexander.Deucher-5C7GfCeVMHo@public.gmane.org,
	Andrey Grodzovsky
	<andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>,
	Monk.Liu-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH 1/5] drm/amdgpu/psp: Add mode 0 reset function.
Date: Wed, 21 Nov 2018 13:10:17 -0500	[thread overview]
Message-ID: <1542823821-15631-2-git-send-email-andrey.grodzovsky@amd.com> (raw)
In-Reply-To: <1542823821-15631-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>

Currently just a place holder until support from PSP in place.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 +++
 drivers/gpu/drm/amd/amdgpu/psp_v11_0.c  | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
index 9ec5d1a..2bdb394 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
@@ -83,6 +83,7 @@ struct psp_funcs
 				  enum AMDGPU_UCODE_ID ucode_type);
 	bool (*smu_reload_quirk)(struct psp_context *psp);
 	int (*mode1_reset)(struct psp_context *psp);
+	int (*mode0_reset)(struct psp_context *psp);
 	uint64_t (*xgmi_get_node_id)(struct psp_context *psp);
 	uint64_t (*xgmi_get_hive_id)(struct psp_context *psp);
 	int (*xgmi_get_topology_info)(struct psp_context *psp, int number_devices,
@@ -194,6 +195,8 @@ struct psp_xgmi_topology_info {
 		((psp)->funcs->smu_reload_quirk ? (psp)->funcs->smu_reload_quirk((psp)) : false)
 #define psp_mode1_reset(psp) \
 		((psp)->funcs->mode1_reset ? (psp)->funcs->mode1_reset((psp)) : false)
+#define psp_mode0_reset(psp) \
+		((psp)->funcs->mode0_reset ? (psp)->funcs->mode1_reset((psp)) : false)
 #define psp_xgmi_get_node_id(psp) \
 		((psp)->funcs->xgmi_get_node_id ? (psp)->funcs->xgmi_get_node_id((psp)) : 0)
 #define psp_xgmi_get_hive_id(psp) \
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index 082093a..8feb580 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -573,6 +573,13 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
 	return 0;
 }
 
+static int psp_v11_0_mode0_reset(struct psp_context *psp)
+{
+	/* TBD Once support from PSP in place */
+
+	return 0;
+}
+
 /* TODO: Fill in follow functions once PSP firmware interface for XGMI is ready.
  * For now, return success and hack the hive_id so high level code can
  * start testing
@@ -698,6 +705,7 @@ 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,
+	.mode0_reset = psp_v11_0_mode0_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,
-- 
2.7.4

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

  parent reply	other threads:[~2018-11-21 18:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 18:10 [PATCH 0/5] Add support for XGMI hive reset Andrey Grodzovsky
     [not found] ` <1542823821-15631-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 18:10   ` Andrey Grodzovsky [this message]
     [not found]     ` <1542823821-15631-2-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:22       ` [PATCH 1/5] drm/amdgpu/psp: Add mode 0 reset function Alex Deucher
2018-11-21 18:10   ` [PATCH 2/5] drm/amdgpu/psp: Enable mode 0 reset for XGMI Andrey Grodzovsky
     [not found]     ` <1542823821-15631-3-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:23       ` Alex Deucher
2018-11-21 18:10   ` [PATCH 3/5] drm/amdgpu: Refactor amdgpu_xgmi_add_device Andrey Grodzovsky
     [not found]     ` <1542823821-15631-4-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:29       ` Alex Deucher
     [not found]         ` <CADnq5_MSpxAXsdwh+NzXCrOGVVo3gog9FjdzRNaX9ZhwuatmKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-21 19:36           ` Grodzovsky, Andrey
     [not found]             ` <aa7ee809-8f1f-c4de-c674-4b11f77b70f3-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:38               ` Alex Deucher
2018-11-21 18:10   ` [PATCH 4/5] drm/amdgpu: Expose hive adev list and xgmi_mutex Andrey Grodzovsky
     [not found]     ` <1542823821-15631-5-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:45       ` Alex Deucher
2018-11-21 18:10   ` [PATCH 5/5] drm/amdgpu: Refactor GPU reset for XGMI hive case Andrey Grodzovsky
     [not found]     ` <1542823821-15631-6-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-11-21 19:45       ` Alex Deucher
2018-11-21 20:49       ` Liu, Shaoyun
     [not found]         ` <ef758cf9-9e27-9807-4e25-47148782249e-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:02           ` Grodzovsky, Andrey
     [not found]             ` <5f257299-4833-82b7-83ec-75bf02c4e441-5C7GfCeVMHo@public.gmane.org>
2018-11-22 11:16               ` Christian König
     [not found]                 ` <8e9f51a4-7f0a-c435-c507-34eea96e0b08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-22 15:44                   ` Grodzovsky, Andrey
     [not found]                     ` <9e016b33-6c94-b1cb-cdcd-b68b91436e90-5C7GfCeVMHo@public.gmane.org>
2018-11-22 19:03                       ` Christian König
     [not found]                         ` <0f048ac9-1247-8d87-d8c8-5a249e24cdcb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-22 19:56                           ` Grodzovsky, Andrey
     [not found]                             ` <329e176f-ab36-fc79-8646-484975ebb8c3-5C7GfCeVMHo@public.gmane.org>
2018-11-26 19:28                               ` Grodzovsky, Andrey
     [not found]                                 ` <71b1c9db-68ec-d4bf-d125-1aed69769fc1-5C7GfCeVMHo@public.gmane.org>
2018-11-26 19:34                                   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542823821-15631-2-git-send-email-andrey.grodzovsky@amd.com \
    --to=andrey.grodzovsky-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox