All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: RE: [PATCH 02/20] drm/amdgpu:cg & pg are not applied on VF
Date: Tue, 7 Feb 2017 15:27:14 +0000	[thread overview]
Message-ID: <BN6PR12MB16524FDB788B08F599BC54EDF7430@BN6PR12MB1652.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1486447878-20521-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Tuesday, February 07, 2017 1:11 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 02/20] drm/amdgpu:cg & pg are not applied on VF
> 
> Change-Id: I93a4e97f1d24a289ab20c2a62371f3e303322587
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

Please add a better patch description.  Something like, CG and PG are not controlled by the PF and are not applicable to the VFs.  With that,
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  | 9 +++++++++
>  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c  | 6 ++++++
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 6 ++++++
>  drivers/gpu/drm/amd/amdgpu/vi.c        | 6 ++++++
>  4 files changed, 27 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 0a75021..1e170ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -5833,6 +5833,9 @@ static int gfx_v8_0_set_powergating_state(void
> *handle,
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  	bool enable = (state == AMD_PG_STATE_GATE) ? true : false;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	switch (adev->asic_type) {
>  	case CHIP_CARRIZO:
>  	case CHIP_STONEY:
> @@ -5890,6 +5893,9 @@ static void gfx_v8_0_get_clockgating_state(void
> *handle, u32 *flags)
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  	int data;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		*flags = 0;
> +
>  	/* AMD_CG_SUPPORT_GFX_MGCG */
>  	data = RREG32(mmRLC_CGTT_MGCG_OVERRIDE);
>  	if (!(data & RLC_CGTT_MGCG_OVERRIDE__CPF_MASK))
> @@ -6403,6 +6409,9 @@ static int gfx_v8_0_set_clockgating_state(void
> *handle,
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	switch (adev->asic_type) {
>  	case CHIP_FIJI:
>  	case CHIP_CARRIZO:
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> index 7669b32..22c52d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> @@ -1427,6 +1427,9 @@ static int gmc_v8_0_set_clockgating_state(void
> *handle,
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	switch (adev->asic_type) {
>  	case CHIP_FIJI:
>  		fiji_update_mc_medium_grain_clock_gating(adev,
> @@ -1451,6 +1454,9 @@ static void gmc_v8_0_get_clockgating_state(void
> *handle, u32 *flags)
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  	int data;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		*flags = 0;
> +
>  	/* AMD_CG_SUPPORT_MC_MGCG */
>  	data = RREG32(mmMC_HUB_MISC_HUB_CG);
>  	if (data & MC_HUB_MISC_HUB_CG__ENABLE_MASK)
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index 25602c4..9394ca6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -1512,6 +1512,9 @@ static int sdma_v3_0_set_clockgating_state(void
> *handle,
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	switch (adev->asic_type) {
>  	case CHIP_FIJI:
>  	case CHIP_CARRIZO:
> @@ -1538,6 +1541,9 @@ static void sdma_v3_0_get_clockgating_state(void
> *handle, u32 *flags)
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  	int data;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		*flags = 0;
> +
>  	/* AMD_CG_SUPPORT_SDMA_MGCG */
>  	data = RREG32(mmSDMA0_CLK_CTRL + sdma_offsets[0]);
>  	if (!(data & SDMA0_CLK_CTRL__SOFT_OVERRIDE0_MASK))
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c
> b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 89b0dfe..aeef3c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -1391,6 +1391,9 @@ static int vi_common_set_clockgating_state(void
> *handle,
>  {
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	switch (adev->asic_type) {
>  	case CHIP_FIJI:
>  		vi_update_bif_medium_grain_light_sleep(adev,
> @@ -1435,6 +1438,9 @@ static void vi_common_get_clockgating_state(void
> *handle, u32 *flags)
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>  	int data;
> 
> +	if (amdgpu_sriov_vf(adev))
> +		*flags = 0;
> +
>  	/* AMD_CG_SUPPORT_BIF_LS */
>  	data = RREG32_PCIE(ixPCIE_CNTL2);
>  	if (data & PCIE_CNTL2__SLV_MEM_LS_EN_MASK)
> --
> 2.7.4
> 
> _______________________________________________
> 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

  parent reply	other threads:[~2017-02-07 15:27 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  6:10 [PATCH 01/20] drm/amdgpu:fix powerplay logic Monk Liu
     [not found] ` <1486447878-20521-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07  6:11   ` [PATCH 02/20] drm/amdgpu:cg & pg are not applied on VF Monk Liu
     [not found]     ` <1486447878-20521-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:27       ` Deucher, Alexander [this message]
2017-02-07  6:11   ` [PATCH 03/20] drm/damdgpu:add new mqd member in ring Monk Liu
     [not found]     ` <1486447878-20521-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:29       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 04/20] drm/amdgpu:imple mqd soft ini/fini Monk Liu
     [not found]     ` <1486447878-20521-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:30       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 05/20] drm/amdgpu:bo_free_kernel will set ptr to NULL if freed Monk Liu
     [not found]     ` <1486447878-20521-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:31       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 06/20] drm/amdgpu:no need use sriov judge Monk Liu
     [not found]     ` <1486447878-20521-6-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:33       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 07/20] drm/amdgpu:minor cleanup Monk Liu
     [not found]     ` <1486447878-20521-7-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:34       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 08/20] drm/amdgpu:divide KCQ mqd init to sw and hw Monk Liu
     [not found]     ` <1486447878-20521-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:36       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 09/20] drm/amdgpu:implement SRIOV gpu_reset Monk Liu
     [not found]     ` <1486447878-20521-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07  6:26       ` 答复: " Liu, Monk
     [not found]         ` <DM5PR12MB16109EC5F03088C1CFB58FE484430-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 10:49           ` SPAM //答复: " Christian König
     [not found]             ` <5dfe222d-9564-0835-f749-3ea5ef78c701-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 14:57               ` 答复: " Liu, Monk
     [not found]                 ` <DM5PR12MB1610E1ADF3A9172B1A418C7184420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:13                   ` Christian König
     [not found]                     ` <afe8b046-c0ba-586e-99c3-adef380cfd3f-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 15:17                       ` 答复: " Liu, Monk
     [not found]                         ` <DM5PR12MB161095B3EBE0DCC3CEFCBB8A84420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:27                           ` Christian König
     [not found]                             ` <aea90712-dc2f-5bd5-ea8b-52b8688a44c9-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-08 15:40                               ` 答复: " Liu, Monk
     [not found]                                 ` <DM5PR12MB1610E5F6359C78E0740F428384420-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08 15:45                                   ` Liu, Monk
2017-02-07 15:45       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 10/20] drm/amdgpu:change kiq lock name Monk Liu
     [not found]     ` <1486447878-20521-10-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:38       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 11/20] drm/amdgpu:add lock_reset for SRIOV Monk Liu
     [not found]     ` <1486447878-20521-11-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:47       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 12/20] drm/amdgpu:impl mm_r/weg_nokiq Monk Liu
     [not found]     ` <1486447878-20521-12-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:52       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652FE39574BA6067AB64578F7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08  7:30           ` Yu, Xiangliang
2017-02-07  6:11   ` [PATCH 13/20] Refine handshake between guest and host by mailbox Monk Liu
     [not found]     ` <1486447878-20521-13-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:40       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 14/20] drm/amdgpu:use nokiq version mm access Monk Liu
     [not found]     ` <1486447878-20521-14-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:54       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 15/20] drm/amdgpu:use work instead of delay-work Monk Liu
     [not found]     ` <1486447878-20521-15-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:10       ` Deucher, Alexander
     [not found]         ` <BN6PR12MB1652AA568136314BD28303BFF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-08  6:28           ` Yu, Xiangliang
2017-02-08  7:45           ` Liu, Monk
2017-02-07  6:11   ` [PATCH 16/20] drm/amdgpu:RUNTIME flag should clr later Monk Liu
     [not found]     ` <1486447878-20521-16-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 15:56       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 17/20] drm/amdgpu:new field is_load_stage introduced Monk Liu
     [not found]     ` <1486447878-20521-17-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:08       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 18/20] drm/amdgpu:alloc mqd backup Monk Liu
     [not found]     ` <1486447878-20521-18-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:11       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 19/20] drm/amdgpu:use nop to clear ring buffer Monk Liu
     [not found]     ` <1486447878-20521-19-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:10       ` Deucher, Alexander
2017-02-07  6:11   ` [PATCH 20/20] drm/amdgpu:fix kiq_resume routine Monk Liu
     [not found]     ` <1486447878-20521-20-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-07 16:09       ` Deucher, Alexander
2017-02-07 15:27   ` [PATCH 01/20] drm/amdgpu:fix powerplay logic Deucher, Alexander

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=BN6PR12MB16524FDB788B08F599BC54EDF7430@BN6PR12MB1652.namprd12.prod.outlook.com \
    --to=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 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.