All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom St Denis <tstdenis82-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 3/4] drm/amd/dpm: Add PG support for UVD on Carrizo
Date: Thu, 21 Jul 2016 13:18:47 -0400	[thread overview]
Message-ID: <20160721171848.32368-4-tom.stdenis@amd.com> (raw)
In-Reply-To: <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
index 8ba07e79d4cb..a3e710147a69 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
@@ -41,6 +41,8 @@
 #include "gmc/gmc_8_1_d.h"
 #include "bif/bif_5_1_d.h"
 #include "gfx_v8_0.h"
+#include "uvd/uvd_6_0_d.h"
+#include "uvd/uvd_6_0_sh_mask.h"
 
 static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate);
 static void cz_dpm_powergate_vce(struct amdgpu_device *adev, bool gate);
@@ -2098,6 +2100,15 @@ static void cz_dpm_powergate_uvd(struct amdgpu_device *adev, bool gate)
 	struct cz_power_info *pi = cz_get_pi(adev);
 	int ret;
 
+	if (pi->caps_uvd_pg) {
+		if (pi->uvd_dynamic_pg)
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK |
+				UVD_POWER_STATUS__UVD_PG_MODE_MASK);
+		else
+			WREG32(mmUVD_POWER_STATUS,
+				UVD_POWER_STATUS__UVD_PG_EN_MASK);
+	}
 	if (pi->uvd_power_gated == gate)
 		return;
 
-- 
2.9.2

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

  parent reply	other threads:[~2016-07-21 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 17:18 GFX PG for Stoney/Carrizo and UVD static PG for Carrizo Tom St Denis
     [not found] ` <20160721171848.32368-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2016-07-21 17:18   ` [PATCH 1/4] Revert "drm/amdgpu: disable GFX PG on CZ/BR/ST" Tom St Denis
2016-07-21 17:18   ` [PATCH 2/4] drm/amd/amdgpu: Re-enable PG for GFX on Stoney Tom St Denis
2016-07-21 17:18   ` Tom St Denis [this message]
2016-07-21 17:18   ` [PATCH 4/4] drm/amd/amdgpu: Enable UVD PG on Carrizo Tom St Denis

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=20160721171848.32368-4-tom.stdenis@amd.com \
    --to=tstdenis82-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=tom.stdenis-5C7GfCeVMHo@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.