Re: [PATCH 11/11] drm/ttm: remove TTM_MEMTYPE_FLAG_MAPPABLE

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

 



On Tue, Jul 21, 2020 at 09:32:45AM +0200, Christian König wrote:
> Not used any more. And it is bad design to use a TTM flag
> to do a check inside a driver.
> 
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> ---
>  include/drm/ttm/ttm_bo_driver.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 71b195e78c7c..9b251853afe2 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -46,7 +46,6 @@
>  #define TTM_MAX_BO_PRIORITY	4U
>  
>  #define TTM_MEMTYPE_FLAG_FIXED         (1 << 0)	/* Fixed (on-card) PCI memory */
> -#define TTM_MEMTYPE_FLAG_MAPPABLE      (1 << 1)	/* Memory mappable */

I think you can still do this, and it makes sense to delete: Just code a
driver-specific check in the io callback which checks whether a buffer can
be mappable directly, instead of going through the indirection of using
this flag.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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