Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Jouni Högander" <jouni.hogander@intel.com>
Subject: [Intel-xe] [PATCH v2 04/11] fixup! drm/i915/display: Remaining changes to make xe compile
Date: Fri,  8 Sep 2023 15:24:08 +0300	[thread overview]
Message-ID: <20230908122415.1886366-5-jouni.hogander@intel.com> (raw)
In-Reply-To: <20230908122415.1886366-1-jouni.hogander@intel.com>

Fixups related to "drm/xe: Add frontbuffer setter/getter for xe_bo"

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_frontbuffer.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index ed62a1c48cce..0c8c30bf580d 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -233,9 +233,8 @@ static void frontbuffer_release(struct kref *ref)
 
 #ifdef I915
 	i915_ggtt_clear_scanout(obj);
-
-	i915_gem_object_set_frontbuffer(obj, NULL);
 #endif
+	i915_gem_object_set_frontbuffer(obj, NULL);
 	spin_unlock(&intel_bo_to_i915(obj)->display.fb_tracking.lock);
 
 #ifdef I915
@@ -247,17 +246,12 @@ static void frontbuffer_release(struct kref *ref)
 struct intel_frontbuffer *
 intel_frontbuffer_get(struct drm_i915_gem_object *obj)
 {
-#ifdef I915
 	struct drm_i915_private *i915 = intel_bo_to_i915(obj);
-	struct intel_frontbuffer *cur;
-#endif
-	struct intel_frontbuffer *front;
+	struct intel_frontbuffer *front, *cur;
 
-#ifdef I915
 	front = i915_gem_object_get_frontbuffer(obj);
 	if (front)
 		return front;
-#endif
 
 	front = kmalloc(sizeof(*front), GFP_KERNEL);
 	if (!front)
@@ -271,16 +265,14 @@ intel_frontbuffer_get(struct drm_i915_gem_object *obj)
 			 frontbuffer_active,
 			 frontbuffer_retire,
 			 I915_ACTIVE_RETIRE_SLEEPS);
-
+#endif
 	spin_lock(&i915->display.fb_tracking.lock);
 	cur = i915_gem_object_set_frontbuffer(obj, front);
 	spin_unlock(&i915->display.fb_tracking.lock);
 	if (cur != front)
 		kfree(front);
-	return cur;
-#endif
 
-	return front;
+	return cur;
 }
 
 void intel_frontbuffer_put(struct intel_frontbuffer *front)
-- 
2.34.1


  parent reply	other threads:[~2023-09-08 12:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 12:24 [Intel-xe] [PATCH v2 00/11] Frontbuffer tracking refactoring Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 01/11] drm/i915/display: Move releasing gem object away from fb tacking Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 02/11] fixup! drm/i915/display: Remaining changes to make xe compile Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 03/11] drm/xe: Add macro to get i915 device from xe_bo Jouni Högander
2023-09-08 12:24 ` Jouni Högander [this message]
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 05/11] drm/xe: Add frontbuffer setter/getter for xe_bo Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 06/11] fixup! drm/i915/display: Remaining changes to make xe compile Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 07/11] drm/xe: Add i915_active.h compatibility header Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 08/11] drm/xe/display: Include i916_active header Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 09/11] drm/xe: Add struct i915_active for Xe Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 10/11] fixup! drm/i915/display: Remaining changes to make xe compile Jouni Högander
2023-09-08 12:24 ` [Intel-xe] [PATCH v2 11/11] drm/xe: Add empty define for i915_ggtt_clear_scanout Jouni Högander
2023-09-08 12:27 ` [Intel-xe] ✓ CI.Patch_applied: success for Frontbuffer tracking refactoring (rev7) Patchwork
2023-09-08 12:27 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-08 12:28 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-08 12:35 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-08 12:36 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-08 12:37 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-09-08 13:26 ` [Intel-xe] ✓ CI.BAT: success " 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=20230908122415.1886366-5-jouni.hogander@intel.com \
    --to=jouni.hogander@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