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 1/5] Revert "drm/i915/display: Implement FBC support"
Date: Thu, 31 Aug 2023 12:51:50 +0300 [thread overview]
Message-ID: <20230831095154.3121578-2-jouni.hogander@intel.com> (raw)
In-Reply-To: <20230831095154.3121578-1-jouni.hogander@intel.com>
This reverts commit 62074302224cee194f642a811a2b70687fe2e6cc.
As a part of clean-up we want to revert this patch and introduce required
changes as a set of patches.
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
drivers/gpu/drm/i915/display/intel_fbc.c | 57 ++++--------------------
1 file changed, 9 insertions(+), 48 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 66c8aed07bbc..b0e676069677 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -59,64 +59,27 @@
#ifdef I915
#define i915_gem_stolen_initialized(i915) (drm_mm_initialized(&(i915)->mm.stolen))
-#define i915_gem_stolen_allocated(node) drm_mm_node_allocated(&(node))
-#define i915_gem_stolen_compressed_offset(node) ((node).start)
-#define i915_gem_stolen_compressed_size(node) ((node).size)
#else
-#include "xe_ttm_stolen_mgr.h"
-#include "xe_res_cursor.h"
-
-static int i915_gem_stolen_insert_node_in_range(struct xe_device *xe, struct xe_bo **bo, u32 size, u32 align, u32 start, u32 end)
+/* No stolen memory support in xe yet */
+static int i915_gem_stolen_insert_node_in_range(struct xe_device *xe, void *ptr, u32 size, u32 align, u32 start, u32 end)
{
- int err;
- u32 flags = XE_BO_CREATE_PINNED_BIT | XE_BO_CREATE_STOLEN_BIT;
-
- *bo = xe_bo_create_locked_range(xe, xe_device_get_root_tile(xe),
- NULL, size, start, end,
- ttm_bo_type_kernel, flags);
- if (IS_ERR(*bo)) {
- err = PTR_ERR(*bo);
- *bo = NULL;
- return err;
- }
- err = xe_bo_pin(*bo);
- xe_bo_unlock_vm_held(*bo);
-
- if (err) {
- xe_bo_put(*bo);
- *bo = NULL;
- }
-
- return err;
+ return -ENODEV;
}
-static int i915_gem_stolen_insert_node(struct xe_device *xe, struct xe_bo **bo, u32 size, u32 align)
+static int i915_gem_stolen_insert_node(struct xe_device *xe, void *ptr, u32 size, u32 align)
{
- /* Not used on xe */
- BUG_ON(1);
+ XE_WARN_ON(1);
return -ENODEV;
}
-static void i915_gem_stolen_remove_node(struct xe_device *xe, struct xe_bo **bo)
+static void i915_gem_stolen_remove_node(struct xe_device *xe, void *ptr)
{
- xe_bo_unpin_map_no_vm(*bo);
- *bo = NULL;
}
-#define i915_gem_stolen_initialized(xe) (!!ttm_manager_type(&(xe)->ttm, XE_PL_STOLEN))
-#define i915_gem_stolen_allocated(bo) (!!(bo))
+#define i915_gem_stolen_initialized(xe) ((xe) && 0)
-static u32 i915_gem_stolen_compressed_offset(struct xe_bo *bo)
-{
- struct xe_res_cursor res;
-
- xe_res_first(bo->ttm.resource, 0, 4096, &res);
- return res.start;
-}
-
-#define i915_gem_stolen_compressed_size(fb) ((u64)((fb)->ttm.base.size))
#endif
#define for_each_fbc_id(__dev_priv, __fbc_id) \
@@ -159,11 +122,7 @@ struct intel_fbc {
struct mutex lock;
unsigned int busy_bits;
-#ifdef I915
struct i915_stolen_fb compressed_fb, compressed_llb;
-#else
- struct xe_bo *compressed_fb, *compressed_llb;
-#endif
enum intel_fbc_id id;
@@ -791,6 +750,8 @@ static u64 intel_fbc_stolen_end(struct drm_i915_private *i915)
(DISPLAY_VER(i915) == 9 && !IS_BROXTON(i915)))
end = i915_gem_stolen_area_size(i915) - 8 * 1024 * 1024;
else
+#else
+ /* TODO */
#endif
end = U64_MAX;
--
2.34.1
next prev parent reply other threads:[~2023-08-31 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-31 9:51 [Intel-xe] [PATCH v2 0/5] FBC refactoring Jouni Högander
2023-08-31 9:51 ` Jouni Högander [this message]
2023-08-31 9:51 ` [Intel-xe] [PATCH v2 2/5] fixup! drm/i915/display: Remaining changes to make xe compile Jouni Högander
2023-08-31 9:51 ` [Intel-xe] [PATCH v2 3/5] drm/xe: Xe stolen memory handling for fbc support Jouni Högander
2023-08-31 9:51 ` [Intel-xe] [PATCH v2 4/5] drm/xe: Add i915_gem.h compatibility header Jouni Högander
2023-08-31 9:51 ` [Intel-xe] [PATCH v2 5/5] drm/xe: Add Xe implementation for fence checks used by fbc code Jouni Högander
2023-08-31 12:38 ` [Intel-xe] ✓ CI.Patch_applied: success for FBC refactoring (rev3) Patchwork
2023-08-31 12:39 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-31 12:40 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-31 12:47 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-31 12:47 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-08-31 12:47 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-31 13:21 ` [Intel-xe] ✓ CI.BAT: success " Patchwork
2023-09-12 16:22 ` [Intel-xe] [PATCH v2 0/5] FBC refactoring Maarten Lankhorst
2023-09-14 5:40 ` Hogander, Jouni
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=20230831095154.3121578-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