[PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

Thomas Zimmermann tzimmermann at suse.de
Fri Feb 8 07:58:48 UTC 2019


Hi

Am 07.02.19 um 20:07 schrieb Thomas Hellstrom:
> 
>> diff --git a/include/drm/ttm/ttm_bo_driver.h
>> b/include/drm/ttm/ttm_bo_driver.h
>> index cbf3180cb612..c0bed72492f3 100644
>> --- a/include/drm/ttm/ttm_bo_driver.h
>> +++ b/include/drm/ttm/ttm_bo_driver.h
>> @@ -49,6 +49,8 @@
>>  #define TTM_MEMTYPE_FLAG_MAPPABLE      (1 << 1)	/* Memory
>> mappable */
>>  #define TTM_MEMTYPE_FLAG_CMA           (1 << 3)	/* Can't map
>> aperture */
>>  
>> +#define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
>> +
> 
> IMO strictly, the place in the drm file address space where a driver
> chooses to insert the TTM bo address space is to be determined by DRM,
> (as also the define indicates) rather than TTM. So I think the right
> place for this define is a drm header, not a ttm header.

I put this here temporarily for the cleanup. But it gets fixed by patch
[05], which moves the constants into drm_vma_manager.h

Best regards
Thomas

> 
> Thanks,
> Thomas
> 
> 
>>  struct ttm_mem_type_manager;
>>  
>>  struct ttm_mem_type_manager_func {
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnberg
Tel: +49-911-74053-0; Fax: +49-911-7417755;  https://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard,
Graham Norton, HRB 21284 (AG Nürnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190208/b9325232/attachment.sig>


More information about the amd-gfx mailing list