Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Sean Z" <sean.z.huang@intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [RFC-v18 02/13] drm/i915/pxp: set KCR reg init during the boot time
Date: Sun,  3 Jan 2021 22:01:24 -0800	[thread overview]
Message-ID: <20210104060135.3076-3-sean.z.huang@intel.com> (raw)
In-Reply-To: <20210104060135.3076-1-sean.z.huang@intel.com>

Set the KCR init during the boot time, which is
required by hardware, to allow us doing further
protection operation such as sending commands to
GPU or TEE.

Signed-off-by: Huang, Sean Z <sean.z.huang@intel.com>
---
 drivers/gpu/drm/i915/pxp/intel_pxp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
index 9bc3c7e30654..f566a4fda044 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
@@ -6,6 +6,12 @@
 #include "intel_pxp.h"
 #include "intel_pxp_context.h"
 
+/* KCR register definitions */
+#define KCR_INIT            _MMIO(0x320f0)
+#define KCR_INIT_MASK_SHIFT (16)
+/* Setting KCR Init bit is required after system boot */
+#define KCR_INIT_ALLOW_DISPLAY_ME_WRITES (BIT(14) | (BIT(14) << KCR_INIT_MASK_SHIFT))
+
 void intel_pxp_init(struct intel_pxp *pxp)
 {
 	struct intel_gt *gt = container_of(pxp, struct intel_gt, pxp);
@@ -15,6 +21,8 @@ void intel_pxp_init(struct intel_pxp *pxp)
 
 	intel_pxp_ctx_init(&pxp->ctx);
 
+	intel_uncore_write(gt->uncore, KCR_INIT, KCR_INIT_ALLOW_DISPLAY_ME_WRITES);
+
 	drm_info(&gt->i915->drm, "Protected Xe Path (PXP) protected content support initialized\n");
 }
 
-- 
2.17.1

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

  parent reply	other threads:[~2021-01-04  6:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04  6:01 [Intel-gfx] [RFC-v18 00/13] Introduce Intel PXP component - Mesa single session Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 01/13] drm/i915/pxp: Introduce Intel PXP component Huang, Sean Z
2021-01-04  6:01 ` Huang, Sean Z [this message]
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 03/13] drm/i915/pxp: Implement funcs to create the TEE channel Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 04/13] drm/i915/pxp: Create the arbitrary session after boot Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 05/13] drm/i915/pxp: Func to send hardware session termination Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 06/13] drm/i915/pxp: Enable PXP irq worker and callback stub Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 07/13] drm/i915/pxp: Destroy arb session upon teardown Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 08/13] drm/i915/pxp: Enable PXP power management Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 09/13] drm/i915/pxp: Expose session state for display protection flip Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 10/13] mei: pxp: export pavp client to me client bus Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 11/13] drm/i915/uapi: introduce drm_i915_gem_create_ext Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 12/13] drm/i915/pxp: User interface for Protected buffer Huang, Sean Z
2021-01-04  6:01 ` [Intel-gfx] [RFC-v18 13/13] drm/i915/pxp: Add plane decryption support Huang, Sean Z
2021-01-04  6:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce Intel PXP component - Mesa single session (rev18) Patchwork
2021-01-04  7:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

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=20210104060135.3076-3-sean.z.huang@intel.com \
    --to=sean.z.huang@intel.com \
    --cc=Intel-gfx@lists.freedesktop.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