All of lore.kernel.org
 help / color / mirror / Atom feed
From: changbin.du@intel.com
To: intel-gvt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH v6 03/14] drm/i915/gvt: Handle MMIO GEN8_GAMW_ECO_DEV_RW_IA for 64K GTT
Date: Tue,  8 May 2018 17:05:05 +0800	[thread overview]
Message-ID: <1525770316-5287-4-git-send-email-changbin.du@intel.com> (raw)
In-Reply-To: <1525770316-5287-1-git-send-email-changbin.du@intel.com>

From: Changbin Du <changbin.du@intel.com>

The register RENDER_HWS_PGA_GEN7 is renamed to GEN8_GAMW_ECO_DEV_RW_IA
from GEN8 which can control IPS enabling.

v2: IPS of all engines must be enabled together for gen9.

Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 drivers/gpu/drm/i915/gvt/handlers.c | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index b77adcc..a3e439b 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -211,6 +211,31 @@ static int sanitize_fence_mmio_access(struct intel_vgpu *vgpu,
 	return 0;
 }
 
+static int gamw_echo_dev_rw_ia_write(struct intel_vgpu *vgpu,
+		unsigned int offset, void *p_data, unsigned int bytes)
+{
+	u32 ips = (*(u32 *)p_data) & GAMW_ECO_ENABLE_64K_IPS_FIELD;
+
+	if (INTEL_GEN(vgpu->gvt->dev_priv) == 9) {
+		if (ips == GAMW_ECO_ENABLE_64K_IPS_FIELD)
+			gvt_dbg_core("vgpu%d: ips enabled\n", vgpu->id);
+		else if (!ips)
+			gvt_dbg_core("vgpu%d: ips disabled\n", vgpu->id);
+		else {
+			/* All engines must be enabled together for vGPU,
+			 * since we don't know which engine the ppgtt will
+			 * bind to when shadowing.
+			 */
+			gvt_vgpu_err("Unsupported IPS setting %x, cannot enable 64K gtt.\n",
+				     ips);
+			return -EINVAL;
+		}
+	}
+
+	write_vreg(vgpu, offset, p_data, bytes);
+	return 0;
+}
+
 static int fence_mmio_read(struct intel_vgpu *vgpu, unsigned int off,
 		void *p_data, unsigned int bytes)
 {
@@ -1654,7 +1679,9 @@ static int init_generic_mmio_info(struct intel_gvt *gvt)
 
 	MMIO_RING_DFH(RING_HWSTAM, D_ALL, F_CMD_ACCESS, NULL, NULL);
 
-	MMIO_GM_RDR(RENDER_HWS_PGA_GEN7, D_ALL, NULL, NULL);
+	MMIO_DH(GEN8_GAMW_ECO_DEV_RW_IA, D_BDW_PLUS, NULL,
+		gamw_echo_dev_rw_ia_write);
+
 	MMIO_GM_RDR(BSD_HWS_PGA_GEN7, D_ALL, NULL, NULL);
 	MMIO_GM_RDR(BLT_HWS_PGA_GEN7, D_ALL, NULL, NULL);
 	MMIO_GM_RDR(VEBOX_HWS_PGA_GEN7, D_ALL, NULL, NULL);
-- 
2.7.4

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

  parent reply	other threads:[~2018-05-08  9:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  9:05 [PATCH v6 00/14] drm/i915/gvt: Add huge gtt shadowing changbin.du
2018-05-08  9:05 ` [PATCH v6 01/14] drm/i915/gvt: Add new 64K entry type changbin.du
2018-05-08  9:05 ` [PATCH v6 02/14] drm/i915/gvt: Add PTE IPS bit operations changbin.du
2018-05-08  9:05 ` changbin.du [this message]
2018-05-08  9:05 ` [PATCH v6 04/14] drm/i915/gvt: Detect 64K gtt entry by IPS bit of PDE changbin.du
2018-05-10 15:17   ` Matthew Auld
2018-05-11  2:29     ` Zhenyu Wang
2018-05-08  9:05 ` [PATCH v6 05/14] drm/i915/gvt: Add software PTE flag to mark special 64K splited entry changbin.du
2018-05-08  9:05 ` [PATCH v6 06/14] drm/i915/gvt: Add GTT clear_pse operation changbin.du
2018-05-08  9:05 ` [PATCH v6 07/14] drm/i915/gvt: Split ppgtt_alloc_spt into two parts changbin.du
2018-05-08  9:05 ` [PATCH v6 08/14] drm/i915/gvt: Make PTE iterator 64K entry aware changbin.du
2018-05-08  9:05 ` [PATCH v6 09/14] drm/i915/gvt: Add 64K huge gtt support changbin.du
2018-05-14 20:31   ` Matthew Auld
2018-05-15  0:01     ` Du, Changbin
2018-05-08  9:05 ` [PATCH v6 10/14] drm/i915/kvmgt: Support setting dma map for huge pages changbin.du
2018-05-10 14:31   ` Matthew Auld
2018-05-14 23:51     ` Du, Changbin
2018-05-08  9:05 ` [PATCH v6 11/14] drm/i915/gvt: Add 2M huge gtt support changbin.du
2018-05-08  9:05 ` [PATCH v6 12/14] drm/i915/gvt: Handle special sequence on PDE IPS bit changbin.du
2018-05-08  9:05 ` [PATCH v6 13/14] drm/i915/gvt: Fix error handling in ppgtt_populate_spt_by_guest_entry changbin.du
2018-05-08  9:05 ` [PATCH v6 14/14] drm/i915: Enable platform support for vGPU huge gtt pages changbin.du
2018-05-16 13:39   ` Joonas Lahtinen
2018-05-08  9:31 ` ✗ Fi.CI.BAT: failure for drm/i915/gvt: Add huge gtt shadowing (rev2) 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=1525770316-5287-4-git-send-email-changbin.du@intel.com \
    --to=changbin.du@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@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 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.