From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
intel-xe@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH v7 01/10] drm/xe/xe2: Determine bios enablement for flat ccs on igfx
Date: Tue, 12 Dec 2023 13:23:43 +0100 [thread overview]
Message-ID: <e7a7381c-1d0b-c0f1-b7b1-c5c57b2f5773@linux.intel.com> (raw)
In-Reply-To: <20231211134356.1645973-2-himal.prasad.ghimiray@intel.com>
On 12/11/23 14:43, Himal Prasad Ghimiray wrote:
> If bios disables flat ccs on igfx make has_flat_ccs as 0 and notify
> via drm_info.
>
> Bspec:59255
>
> v2:
> - Release forcewake.
> - Add registers in order.
> - drop dgfx condition and only add it back in the future
> when the support for an Xe2 dgpu will be added.
> - Use drm_dbg instead of drm_info. (Matt)
>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> ---
> drivers/gpu/drm/xe/regs/xe_gt_regs.h | 3 +++
> drivers/gpu/drm/xe/xe_device.c | 30 ++++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> index 5f5a72e9d0d8..f5bf4c6d1761 100644
> --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
> @@ -162,6 +162,9 @@
> #define XEHP_SQCM XE_REG_MCR(0x8724)
> #define EN_32B_ACCESS REG_BIT(30)
>
> +#define XE2_FLAT_CCS_BASE_RANGE_LOWER XE_REG_MCR(0x8800)
> +#define XE2_FLAT_CCS_ENABLE REG_BIT(0)
> +
> #define GSCPSMI_BASE XE_REG(0x880c)
>
> #define MIRROR_FUSE3 XE_REG(0x9118)
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 2e0b2e40d8f3..91f5807d2d20 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"
> @@ -401,6 +403,30 @@ 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 (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_dbg(&xe->drm,
> + "Flat CCS has been disabled in bios, May lead to performance impact");
> +
> + return xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> +}
> +
> int xe_device_probe(struct xe_device *xe)
> {
> struct xe_tile *tile;
> @@ -456,6 +482,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;
next prev parent reply other threads:[~2023-12-12 12:23 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 13:43 [PATCH v7 00/10] Enable compression handling on LNL Himal Prasad Ghimiray
2023-12-11 13:43 ` [PATCH v7 01/10] drm/xe/xe2: Determine bios enablement for flat ccs on igfx Himal Prasad Ghimiray
2023-12-11 23:12 ` Matt Roper
2023-12-12 12:23 ` Thomas Hellström [this message]
2023-12-11 13:43 ` [PATCH v7 02/10] drm/xe/xe2: Modify main memory to ccs memory ratio Himal Prasad Ghimiray
2023-12-11 23:15 ` Matt Roper
2023-12-11 13:43 ` [PATCH v7 03/10] drm/xe/xe2: Allocate extra pages for ccs during bo create Himal Prasad Ghimiray
2023-12-12 0:41 ` Matt Roper
2023-12-12 9:00 ` Ghimiray, Himal Prasad
2023-12-11 13:43 ` [PATCH v7 04/10] drm/xe/xe2: Updates on XY_CTRL_SURF_COPY_BLT Himal Prasad Ghimiray
2023-12-12 0:45 ` Matt Roper
2023-12-11 13:43 ` [PATCH v7 05/10] drm/xe/xe_migrate: Use NULL 1G PTE mapped at 255GiB VA for ccs clear Himal Prasad Ghimiray
2023-12-11 13:43 ` [PATCH v7 06/10] drm/xe/xe2: Update chunk size for each iteration of ccs copy Himal Prasad Ghimiray
2023-12-12 12:27 ` Thomas Hellström
2023-12-11 13:43 ` [PATCH v7 07/10] drm/xe/xe2: Update emit_pte to use compression enabled PAT index Himal Prasad Ghimiray
2023-12-12 12:28 ` Thomas Hellström
2023-12-11 13:43 ` [PATCH v7 08/10] drm/xe/xe2: Handle flat ccs move for igfx Himal Prasad Ghimiray
2023-12-12 12:31 ` Thomas Hellström
2023-12-11 13:43 ` [PATCH v7 09/10] drm/xe/xe2: Modify xe_bo_test for system memory Himal Prasad Ghimiray
2023-12-11 13:43 ` [PATCH v7 10/10] drm/xe/xe2: Support flat ccs Himal Prasad Ghimiray
2023-12-12 12:33 ` Thomas Hellström
2023-12-11 14:25 ` ✓ CI.Patch_applied: success for Enable compression handling on LNL. (rev8) Patchwork
2023-12-11 14:25 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-11 14:26 ` ✓ CI.KUnit: success " Patchwork
2023-12-11 14:34 ` ✓ CI.Build: " Patchwork
2023-12-11 14:34 ` ✓ CI.Hooks: " Patchwork
2023-12-11 14:35 ` ✓ CI.checksparse: " Patchwork
2023-12-11 15:10 ` ✓ CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-12-11 13:41 [PATCH v7 00/10] *Enable compression handling on LNL Himal Prasad Ghimiray
2023-12-11 13:41 ` [PATCH v7 01/10] drm/xe/xe2: Determine bios enablement for flat ccs on igfx Himal Prasad Ghimiray
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=e7a7381c-1d0b-c0f1-b7b1-c5c57b2f5773@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/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