[PATCH 18/20] drm/xe/fbdev: Use the same logic for fbdev stolen takever and fresh allocation

Shankar, Uma uma.shankar at intel.com
Wed Jul 10 09:08:42 UTC 2024



> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Ville Syrjala
> Sent: Friday, July 5, 2024 8:23 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: intel-xe at lists.freedesktop.org
> Subject: [PATCH 18/20] drm/xe/fbdev: Use the same logic for fbdev stolen
> takever and fresh allocation
> 
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Currently xe only checks that the BIOS FB doesn't take up too much stolen
> memory, but does no such check when allocating a fresh FB from stolen. Use the
> same rule for both, just like i915 does.

Would be good to add restriction for LNL+ as well.

However, current change looks good to me.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> index f7905b382d06..f67bc0fd803b 100644
> --- a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> +++ b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> @@ -17,6 +17,9 @@ bool intel_fbdev_fb_prefer_stolen(struct intel_display
> *display,
>  	struct xe_device *xe = to_xe_device(display->drm);
>  	struct ttm_resource_manager *stolen;
> 
> +	if (IS_DGFX(xe))
> +		return false;
> +
>  	stolen = ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
>  	if (!stolen)
>  		return false;
> @@ -55,7 +58,7 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct
> drm_fb_helper *helper,
>  	size = PAGE_ALIGN(size);
>  	obj = ERR_PTR(-ENODEV);
> 
> -	if (!IS_DGFX(xe)) {
> +	if (intel_fbdev_fb_prefer_stolen(&xe->display, size)) {
>  		obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
>  					   NULL, size,
>  					   ttm_bo_type_kernel,
> XE_BO_FLAG_SCANOUT |
> --
> 2.44.2



More information about the Intel-gfx mailing list