All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/3] drm/i915/fbc: Make FBC check stolen at use time
Date: Fri,  9 Jun 2023 11:53:58 +0300	[thread overview]
Message-ID: <20230609085359.1259932-3-jouni.hogander@intel.com> (raw)
In-Reply-To: <20230609085359.1259932-1-jouni.hogander@intel.com>

As a preparation for Xe change stolen memory initialization check to be
done in use-time instead of during initialization.

In case of xe, stolen memory is initialised much later so it can't be
checked during init. There is no specific reason to check this in init for
i915 either -> perform the check in use-time. This also gives us benefit
fbc_no_reason reporting missing initialization being reason for disabled
fbc.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 20b33553023d..53313232bec7 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1056,6 +1056,11 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
 	if (!fbc)
 		return 0;
 
+	if (!i915_gem_stolen_initialized(i915)) {
+		plane_state->no_fbc_reason = "stolen memory not initialised";
+		return 0;
+	}
+
 	if (intel_vgpu_active(i915)) {
 		plane_state->no_fbc_reason = "VGPU active";
 		return 0;
@@ -1709,9 +1714,6 @@ void intel_fbc_init(struct drm_i915_private *i915)
 {
 	enum intel_fbc_id fbc_id;
 
-	if (!i915_gem_stolen_initialized(i915))
-		DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
-
 	if (need_fbc_vtd_wa(i915))
 		DISPLAY_RUNTIME_INFO(i915)->fbc_mask = 0;
 
-- 
2.34.1


  parent reply	other threads:[~2023-06-09  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09  8:53 [Intel-gfx] [PATCH 0/3] Move stolen memory handling details into i915_gem_stolen Jouni Högander
2023-06-09  8:53 ` [Intel-gfx] [PATCH 1/3] drm/i915: Move stolen memory handling " Jouni Högander
2023-06-09  8:53 ` Jouni Högander [this message]
2023-06-09  8:53 ` [Intel-gfx] [PATCH 3/3] drm/i915/fbc: Moved fence related code away from intel_fbc Jouni Högander
2023-06-09  9:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Move stolen memory handling details into i915_gem_stolen Patchwork
2023-06-09  9:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-06-09 17:23 ` [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=20230609085359.1259932-3-jouni.hogander@intel.com \
    --to=jouni.hogander@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 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.