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 01/11] drm/i915/display: Move releasing gem object away from fb tacking
Date: Fri,  8 Sep 2023 15:24:05 +0300	[thread overview]
Message-ID: <20230908122415.1886366-2-jouni.hogander@intel.com> (raw)
In-Reply-To: <20230908122415.1886366-1-jouni.hogander@intel.com>

As a preparation for Xe we want to remove all i915_gem_object details away
from frontbuffer tacking code. Due to this mobe releasing gem object
reference to i915_gem_object_set_frontbuffer.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_frontbuffer.c | 2 --
 drivers/gpu/drm/i915/gem/i915_gem_object.h       | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
index 4f077b222b36..a9a8c75b8236 100644
--- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
+++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
@@ -244,8 +244,6 @@ static void frontbuffer_release(struct kref *ref)
 
 #ifdef I915
 	i915_active_fini(&front->write);
-
-	i915_gem_object_put(obj);
 #endif
 	kfree_rcu(front, rcu);
 }
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
index f607b87890dd..525cb440cc15 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
@@ -943,6 +943,7 @@ i915_gem_object_set_frontbuffer(struct drm_i915_gem_object *obj,
 
 	if (!front) {
 		RCU_INIT_POINTER(obj->frontbuffer, NULL);
+		i915_gem_object_put(obj);
 	} else if (rcu_access_pointer(obj->frontbuffer)) {
 		cur = rcu_dereference_protected(obj->frontbuffer, true);
 		kref_get(&cur->ref);
-- 
2.34.1


  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 ` Jouni Högander [this message]
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 ` [Intel-xe] [PATCH v2 04/11] fixup! drm/i915/display: Remaining changes to make xe compile Jouni Högander
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-2-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