[PATCH 2/8] drm/ttm: move ttm_set_memory.h out of include

Christian König christian.koenig at amd.com
Wed Oct 7 12:10:00 UTC 2020


Am 07.10.20 um 13:46 schrieb Ruhl, Michael J:
>> -----Original Message-----
>> From: Christian König <ckoenig.leichtzumerken at gmail.com>
>> Sent: Wednesday, October 7, 2020 4:31 AM
>> To: Ruhl, Michael J <michael.j.ruhl at intel.com>; dri-
>> devel at lists.freedesktop.org; ray.huang at amd.com; airlied at gmail.com;
>> daniel at ffwll.ch
>> Subject: Re: [PATCH 2/8] drm/ttm: move ttm_set_memory.h out of include
>>
>> Am 05.10.20 um 17:01 schrieb Ruhl, Michael J:
>>>> -----Original Message-----
>>>> From: dri-devel <dri-devel-bounces at lists.freedesktop.org> On Behalf Of
>>>> Christian König
>>>> Sent: Thursday, October 1, 2020 7:28 AM
>>>> To: dri-devel at lists.freedesktop.org; ray.huang at amd.com;
>>>> airlied at gmail.com; daniel at ffwll.ch
>>>> Subject: [PATCH 2/8] drm/ttm: move ttm_set_memory.h out of include
>>>>
>>>> This is not something drivers should use.
>>> It's not?
>> Those are helper functions which are used by the two different page
>> pools to change the global mapping of pages on x86.
>>
>>> I am not really sure what you are doing here.
>> Making sure that no driver things that it should touch the CPU caching
>> attributes manually :)
> Got it.  So should you move the header to the drivers/gpu/drm/ttm ?

Yes, in the long term we probably want to move the functionality into 
the DMA API. But for now the TTM subfolder should do as well.

Christian.

>
> Reviewed-by: Michael J. Ruhl <michael.j.ruhl at intel.com>
>
> Mike
>
>> Christian.
>>
>>> M
>>>
>>>
>>>> Signed-off-by: Christian König <christian.koenig at amd.com>
>>>> ---
>>>> drivers/gpu/drm/ttm/ttm_page_alloc.c              | 3 ++-
>>>> drivers/gpu/drm/ttm/ttm_page_alloc_dma.c          | 3 ++-
>>>> {include => drivers/gpu}/drm/ttm/ttm_set_memory.h | 0
>>>> 3 files changed, 4 insertions(+), 2 deletions(-)
>>>> rename {include => drivers/gpu}/drm/ttm/ttm_set_memory.h (100%)
>>>>
>>>> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
>>>> b/drivers/gpu/drm/ttm/ttm_page_alloc.c
>>>> index 14660f723f71..912c30dcc9db 100644
>>>> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
>>>> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
>>>> @@ -47,7 +47,8 @@
>>>>
>>>> #include <drm/ttm/ttm_bo_driver.h>
>>>> #include <drm/ttm/ttm_page_alloc.h>
>>>> -#include <drm/ttm/ttm_set_memory.h>
>>>> +
>>>> +#include "ttm_set_memory.h"
>>>>
>>>> #define NUM_PAGES_TO_ALLOC		(PAGE_SIZE/sizeof(struct page
>>>> *))
>>>> #define SMALL_ALLOCATION		16
>>>> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
>>>> b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
>>>> index 5e2df11685e7..1045a5c26ee3 100644
>>>> --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
>>>> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
>>>> @@ -49,7 +49,8 @@
>>>> #include <linux/kthread.h>
>>>> #include <drm/ttm/ttm_bo_driver.h>
>>>> #include <drm/ttm/ttm_page_alloc.h>
>>>> -#include <drm/ttm/ttm_set_memory.h>
>>>> +
>>>> +#include "ttm_set_memory.h"
>>>>
>>>> #define NUM_PAGES_TO_ALLOC		(PAGE_SIZE/sizeof(struct page
>>>> *))
>>>> #define SMALL_ALLOCATION		4
>>>> diff --git a/include/drm/ttm/ttm_set_memory.h
>>>> b/drivers/gpu/drm/ttm/ttm_set_memory.h
>>>> similarity index 100%
>>>> rename from include/drm/ttm/ttm_set_memory.h
>>>> rename to drivers/gpu/drm/ttm/ttm_set_memory.h
>>>> --
>>>> 2.17.1
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel at lists.freedesktop.org
>>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=02%7C01%7Cchristian.koenig%40amd.com%7C4219f6c8468f4d5297bd08d86ab6ad3c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637376680113288476&sdata=G8IO0iMZWAROyBJZRSVrh%2FXgFI%2B3kEO58Si6cd%2F%2B8o0%3D&reserved=0



More information about the dri-devel mailing list