drm/xe: pass struct xe_device to xe_display_bo_fbdev_prefer_stolen()

This is xe core code, use struct xe_device for simplicity.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/56bd532dc5cf460cdbf17c7781f18db5378a28e6.1774950508.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula 2026-03-31 12:49:18 +03:00
parent 3fd0d237c9
commit 8e005ef09b
3 changed files with 5 additions and 6 deletions

View File

@ -119,9 +119,8 @@ static u32 xe_display_bo_fbdev_pitch_align(u32 stride)
return ALIGN(stride, XE_PAGE_SIZE);
}
bool xe_display_bo_fbdev_prefer_stolen(struct drm_device *drm, unsigned int size)
bool xe_display_bo_fbdev_prefer_stolen(struct xe_device *xe, unsigned int size)
{
struct xe_device *xe = to_xe_device(drm);
struct ttm_resource_manager *stolen;
stolen = ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
@ -149,7 +148,7 @@ static struct drm_gem_object *xe_display_bo_fbdev_create(struct drm_device *drm,
obj = ERR_PTR(-ENODEV);
if (xe_display_bo_fbdev_prefer_stolen(drm, size)) {
if (xe_display_bo_fbdev_prefer_stolen(xe, size)) {
obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe),
size,
ttm_bo_type_kernel,

View File

@ -6,9 +6,9 @@
#include <linux/types.h>
struct drm_device;
struct xe_device;
bool xe_display_bo_fbdev_prefer_stolen(struct drm_device *drm, unsigned int size);
bool xe_display_bo_fbdev_prefer_stolen(struct xe_device *xe, unsigned int size);
extern const struct intel_display_bo_interface xe_display_bo_interface;

View File

@ -87,7 +87,7 @@ initial_plane_bo(struct xe_device *xe,
if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
!xe_display_bo_fbdev_prefer_stolen(&xe->drm, plane_config->size)) {
!xe_display_bo_fbdev_prefer_stolen(xe, plane_config->size)) {
drm_info(&xe->drm, "Initial FB size exceeds half of stolen, discarding\n");
return NULL;
}