Re: [PATCH 2/5] drm/ttm: fix adding foreign BOs to the swap LRU

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

 



Reviewed-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>

BTW, does Radeon touch the caching mode of imported buffers through TTM
(like write-combining)?
Do we need something similar for that?

/Thomas


On 01/11/2016 03:35 PM, Christian König wrote:
> From: Christian König <christian.koenig@xxxxxxx>
>
> It doesn't make any sense to try to swap out imported BOs.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> ---
>  drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index a98a5d5..3ea9a01 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -176,7 +176,7 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo)
>  		list_add_tail(&bo->lru, &man->lru);
>  		kref_get(&bo->list_kref);
>  
> -		if (bo->ttm != NULL) {
> +		if (bo->ttm && !(bo->ttm->page_flags & TTM_PAGE_FLAG_SG)) {
>  			list_add_tail(&bo->swap, &bo->glob->swap_lru);
>  			kref_get(&bo->list_kref);
>  		}



_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux