diff mbox series

[v4,1/4] drm/xe: Remove safety check from __xe_ttm_stolen_io_mem_reserve_stolen

Message ID 20240506103604.146146-2-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/xe: More fb pinning optimizations. | expand

Commit Message

Maarten Lankhorst May 6, 2024, 10:36 a.m. UTC
This is invalid with display code when reworking DPT pinning.
The only reason we added it, was because originally all display
allocations also had the bit set.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Rodrigo Vivi May 10, 2024, 1:41 a.m. UTC | #1
On Mon, May 06, 2024 at 12:36:01PM +0200, Maarten Lankhorst wrote:
> This is invalid with display code when reworking DPT pinning.
> The only reason we added it, was because originally all display
> allocations also had the bit set.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> index f77367329760..1613290b9eda 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> @@ -298,10 +298,6 @@ static int __xe_ttm_stolen_io_mem_reserve_stolen(struct xe_device *xe,
>  
>  	XE_WARN_ON(IS_DGFX(xe));
>  
> -	/* XXX: Require BO to be mapped to GGTT? */
> -	if (drm_WARN_ON(&xe->drm, !(bo->flags & XE_BO_FLAG_GGTT)))
> -		return -EIO;
> -
>  	/* GGTT is always contiguously mapped */
>  	mem->bus.offset = xe_bo_ggtt_addr(bo) + mgr->io_base;
>  
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
index f77367329760..1613290b9eda 100644
--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
@@ -298,10 +298,6 @@  static int __xe_ttm_stolen_io_mem_reserve_stolen(struct xe_device *xe,
 
 	XE_WARN_ON(IS_DGFX(xe));
 
-	/* XXX: Require BO to be mapped to GGTT? */
-	if (drm_WARN_ON(&xe->drm, !(bo->flags & XE_BO_FLAG_GGTT)))
-		return -EIO;
-
 	/* GGTT is always contiguously mapped */
 	mem->bus.offset = xe_bo_ggtt_addr(bo) + mgr->io_base;