From: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [Intel-xe] [PATCH v4 1/9] drm/xe/xe2: Determine bios enablement for flat ccs on igfx
Date: Wed, 6 Dec 2023 10:01:18 +0530 [thread overview]
Message-ID: <20231206043126.984049-2-himal.prasad.ghimiray@intel.com> (raw)
In-Reply-To: <20231206043126.984049-1-himal.prasad.ghimiray@intel.com>
If bios disables flat ccs on igfx make has_flat_ccs as 0 and notify
via drm_info.
Bspec:59255
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 3 +++
drivers/gpu/drm/xe/xe_device.c | 29 ++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index d318ec0efd7d..5979ec82ea31 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -145,6 +145,9 @@
#define XEHP_SLICE_COMMON_ECO_CHICKEN1 XE_REG_MCR(0x731c, XE_REG_OPTION_MASKED)
#define MSC_MSAA_REODER_BUF_BYPASS_DISABLE REG_BIT(14)
+#define XE2_FLAT_CCS_BASE_RANGE_LOWER XE_REG_MCR(0x8800)
+#define XE2_FLAT_CCS_ENABLE REG_BIT(0)
+
#define VF_PREEMPTION XE_REG(0x83a4, XE_REG_OPTION_MASKED)
#define PREEMPTION_VERTEX_COUNT REG_GENMASK(15, 0)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 8423c817111b..400fa1ac6168 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -16,6 +16,7 @@
#include <drm/xe_drm.h>
#include "regs/xe_regs.h"
+#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_debugfs.h"
#include "xe_display.h"
@@ -26,6 +27,7 @@
#include "xe_exec.h"
#include "xe_ggtt.h"
#include "xe_gt.h"
+#include "xe_gt_mcr.h"
#include "xe_irq.h"
#include "xe_mmio.h"
#include "xe_module.h"
@@ -392,6 +394,29 @@ int xe_device_probe_early(struct xe_device *xe)
return 0;
}
+static int xe_device_set_has_flat_ccs(struct xe_device *xe)
+{
+ u32 reg;
+ int err;
+
+ if (IS_DGFX(xe) || GRAPHICS_VER(xe) < 20 || !xe->info.has_flat_ccs)
+ return 0;
+
+ struct xe_gt *gt = xe_root_mmio_gt(xe);
+
+ err = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
+ if (err)
+ return err;
+
+ reg = xe_gt_mcr_unicast_read_any(gt, XE2_FLAT_CCS_BASE_RANGE_LOWER);
+ xe->info.has_flat_ccs = (reg & XE2_FLAT_CCS_ENABLE);
+
+ if (!xe->info.has_flat_ccs)
+ drm_info(&xe->drm,
+ "Flat CCS has been disabled in bios, May lead to performance impact");
+ return 0;
+}
+
int xe_device_probe(struct xe_device *xe)
{
struct xe_tile *tile;
@@ -447,6 +472,10 @@ int xe_device_probe(struct xe_device *xe)
goto err_irq_shutdown;
}
+ err = xe_device_set_has_flat_ccs(xe);
+ if (err)
+ return err;
+
err = xe_mmio_probe_vram(xe);
if (err)
goto err_irq_shutdown;
--
2.25.1
next prev parent reply other threads:[~2023-12-06 4:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 4:31 [Intel-xe] [PATCH v4 0/9] Enable compression handling on LNL Himal Prasad Ghimiray
2023-12-06 4:31 ` Himal Prasad Ghimiray [this message]
2023-12-06 22:14 ` [Intel-xe] [PATCH v4 1/9] drm/xe/xe2: Determine bios enablement for flat ccs on igfx Matt Roper
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 2/9] drm/xe/xe2: Allocate extra pages for ccs during bo create Himal Prasad Ghimiray
2023-12-06 22:27 ` Matt Roper
2023-12-08 3:59 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 3/9] drm/xe/xe2: Updates on XY_CTRL_SURF_COPY_BLT Himal Prasad Ghimiray
2023-12-06 23:22 ` Matt Roper
2023-12-08 4:01 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 4/9] drm/xe/xe_migrate: Use NULL 1G PTE mapped at 255GiB VA for ccs clear Himal Prasad Ghimiray
2023-12-06 23:37 ` Matt Roper
2023-12-08 4:10 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 5/9] drm/xe/xe2: Update chunk size for each iteration of ccs copy Himal Prasad Ghimiray
2023-12-07 0:01 ` Matt Roper
2023-12-08 4:22 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 6/9] drm/xe/xe2: Update emit_pte to use compression enabled PAT index Himal Prasad Ghimiray
2023-12-07 0:14 ` Matt Roper
2023-12-08 5:01 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 7/9] drm/xe/xe2: Handle flat ccs move for igfx Himal Prasad Ghimiray
2023-12-07 0:17 ` Matt Roper
2023-12-08 4:32 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 8/9] drm/xe/xe2: Modify xe_bo_test for system memory Himal Prasad Ghimiray
2023-12-07 0:23 ` Matt Roper
2023-12-08 4:35 ` Ghimiray, Himal Prasad
2023-12-06 4:31 ` [Intel-xe] [PATCH v4 9/9] drm/xe/xe2: Support flat ccs Himal Prasad Ghimiray
2023-12-06 8:23 ` [Intel-xe] ✓ CI.Patch_applied: success for Enable compression handling on LNL. (rev5) Patchwork
2023-12-06 8:23 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-12-06 8:24 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-12-06 8:32 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-12-06 8:32 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-12-06 8:33 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-12-06 9:07 ` [Intel-xe] ✗ 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=20231206043126.984049-2-himal.prasad.ghimiray@intel.com \
--to=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@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