Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>

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 at amd.com>
>
> It doesn't make any sense to try to swap out imported BOs.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  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);
>               }



Reply via email to