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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Intel-xe <intel-xe-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Ville Syrjala
> Sent: Friday, July 5, 2024 8:23 PM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: intel-xe@xxxxxxxxxxxxxxxxxxxxx
> Subject: [PATCH 18/20] drm/xe/fbdev: Use the same logic for fbdev stolen
> takever and fresh allocation
> 
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxx>

> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  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





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux