All of lore.kernel.org
 help / color / mirror / Atom feed
From: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Frank Min <Frank.Min-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 6/9] drm/amdgpu:add callback in cgs for sriov detect
Date: Wed, 28 Sep 2016 16:36:17 +0800	[thread overview]
Message-ID: <1475051780-21634-6-git-send-email-Monk.Liu@amd.com> (raw)
In-Reply-To: <1475051780-21634-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

From: Frank Min <Frank.Min@amd.com>

Change-Id: If2eac6a9ab445b775ce701a122dba6b1f21de4d7
Signed-off-by: Frank Min <Frank.Min@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c  | 7 +++++++
 drivers/gpu/drm/amd/include/cgs_common.h | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 7f79323..4641f0b 100755
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -855,6 +855,12 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
 	return 0;
 }
 
+static int amdgpu_cgs_is_virtualization_enabled(void *cgs_device)
+{
+	CGS_FUNC_ADEV;
+	return amdgpu_sriov_vf(adev);
+}
+
 static int amdgpu_cgs_query_system_info(struct cgs_device *cgs_device,
 					struct cgs_system_info *sys_info)
 {
@@ -1208,6 +1214,7 @@ static const struct cgs_ops amdgpu_cgs_ops = {
 	amdgpu_cgs_notify_dpm_enabled,
 	amdgpu_cgs_call_acpi_method,
 	amdgpu_cgs_query_system_info,
+	amdgpu_cgs_is_virtualization_enabled
 };
 
 static const struct cgs_os_ops amdgpu_cgs_os_ops = {
diff --git a/drivers/gpu/drm/amd/include/cgs_common.h b/drivers/gpu/drm/amd/include/cgs_common.h
index df7c18b..9695c2e 100755
--- a/drivers/gpu/drm/amd/include/cgs_common.h
+++ b/drivers/gpu/drm/amd/include/cgs_common.h
@@ -619,6 +619,8 @@ typedef int (*cgs_call_acpi_method)(struct cgs_device *cgs_device,
 typedef int (*cgs_query_system_info)(struct cgs_device *cgs_device,
 				struct cgs_system_info *sys_info);
 
+typedef int (*cgs_is_virtualization_enabled_t)(void *cgs_device);
+
 struct cgs_ops {
 	/* memory management calls (similar to KFD interface) */
 	cgs_gpu_mem_info_t gpu_mem_info;
@@ -670,6 +672,7 @@ struct cgs_ops {
 	cgs_call_acpi_method call_acpi_method;
 	/* get system info */
 	cgs_query_system_info query_system_info;
+	cgs_is_virtualization_enabled_t is_virtualization_enabled;
 };
 
 struct cgs_os_ops; /* To be define in OS-specific CGS header */
@@ -773,4 +776,6 @@ struct cgs_device
 	CGS_CALL(get_pci_resource, cgs_device, resource_type, size, offset, \
 	resource_base)
 
+#define cgs_is_virtualization_enabled(cgs_device) \
+		CGS_CALL(is_virtualization_enabled, cgs_device)
 #endif /* _CGS_COMMON_H */
-- 
1.9.1

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

  parent reply	other threads:[~2016-09-28  8:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  8:36 [PATCH 1/9] drm/amdgpu:exclude 5dw digest for entry Monk Liu
     [not found] ` <1475051780-21634-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28  8:36   ` [PATCH 2/9] drm/amdgpu:add one more fiji device id Monk Liu
2016-09-28  8:36   ` [PATCH 3/9] drm/amdgpu:use smc_index_11 for VI Monk Liu
2016-09-28  8:36   ` [PATCH 4/9] drm/amdgpu:keep bo pinned in prefered domain Monk Liu
     [not found]     ` <1475051780-21634-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-10-02 21:14       ` Grazvydas Ignotas
2016-09-28  8:36   ` [PATCH 5/9] drm/amdgpu:fw bo should be in VRAM for SRIOV Monk Liu
2016-09-28  8:36   ` Monk Liu [this message]
2016-09-28  8:36   ` [PATCH 7/9] drm/amdgpu:add MEC_STORAGE ucode id for sriov Monk Liu
2016-09-28  8:36   ` [PATCH 8/9] drm/amdgpu:wptr poll address of gfx8 is needed Monk Liu
     [not found]     ` <1475051780-21634-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28 13:41       ` StDenis, Tom
     [not found]         ` <CY4PR12MB17686C79F11C47CC29E00E2EF7CF0-rpdhrqHFk06yjjPBNVDk/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-09-28 15:27           ` Deucher, Alexander
2016-09-28  8:36   ` [PATCH 9/9] drm/amdgpu:properly fix some JumpTable issues Monk Liu
     [not found]     ` <1475051780-21634-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28 13:38       ` Edward O'Callaghan
2016-09-28 19:00   ` [PATCH 1/9] drm/amdgpu:exclude 5dw digest for entry Alex Deucher

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=1475051780-21634-6-git-send-email-Monk.Liu@amd.com \
    --to=monk.liu-5c7gfcevmho@public.gmane.org \
    --cc=Frank.Min-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 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.