All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: [Intel-gfx] [PATCH 3/3] drm/i915: error out on platform with small-bar and CCS
Date: Wed, 11 May 2022 17:37:46 +0200	[thread overview]
Message-ID: <20220511153746.14142-3-nirmoy.das@intel.com> (raw)
In-Reply-To: <20220511153746.14142-1-nirmoy.das@intel.com>

Until we enable small-bar, we can't support CCS so error
out gracefully on such platforms.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_region_lmem.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
index cd105ec10429..43caf8052ffb 100644
--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
@@ -111,6 +111,13 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
 		flat_ccs_base = intel_gt_read_register(gt, XEHPSDV_FLAT_CCS_BASE_ADDR);
 		flat_ccs_base = (flat_ccs_base >> XEHPSDV_CCS_BASE_SHIFT) * SZ_64K;
 
+		/* FIXME: Remove this when we have small-bar enabled */
+		if (pci_resource_len(pdev, 2) < lmem_size) {
+			drm_err(&i915->drm, "CCS isn't supported on platforms with small-bar\n");
+			return ERR_PTR(-EINVAL);
+
+		}
+
 		if (GEM_WARN_ON(lmem_size < flat_ccs_base))
 			return ERR_PTR(-EIO);
 
-- 
2.35.1


  parent reply	other threads:[~2022-05-11 15:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 15:37 [Intel-gfx] [PATCH 1/3] drm/i915: return -EIO on lmem setup failure Nirmoy Das
2022-05-11 15:37 ` [Intel-gfx] [PATCH 2/3] drm/i915: determine lmem_size properly Nirmoy Das
2022-05-11 15:37 ` Nirmoy Das [this message]
2022-05-11 16:00   ` [Intel-gfx] [PATCH 3/3] drm/i915: error out on platform with small-bar and CCS Matthew Auld
2022-05-11 18:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: return -EIO on lmem setup failure Patchwork
2022-05-11 18:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-05-11 22:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20220511153746.14142-3-nirmoy.das@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@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 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.