[PATCH 1/2] drm/ttm: add interface to export kernel_zone max memory size in ttm

Christian König deathsimple at vodafone.de
Tue Aug 2 15:19:58 UTC 2016


Am 02.08.2016 um 06:57 schrieb Alex Deucher:
> On Wed, Jul 27, 2016 at 7:21 AM, Ken Wang <Qingqing.Wang at amd.com> wrote:
>> Change-Id: I9f30b54365492b234a7f0887dd0c67a9817c3705
>> Signed-off-by: Ken Wang <Qingqing.Wang at amd.com>
> Adding dri-devel as well since ttm is a common component.
>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

A bit commit message would be nice, e.g. something like "Add a function 
to get the maximum memory used by the kernel zone."

With that fixed he patch is Reviewed-by: Christian König 
<christian.koenig at amd.com> as well.

Regards,
Christian.

>
>> ---
>>   drivers/gpu/drm/ttm/ttm_memory.c | 6 ++++++
>>   include/drm/ttm/ttm_memory.h     | 1 +
>>   2 files changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
>> index a1803fb..29855be 100644
>> --- a/drivers/gpu/drm/ttm/ttm_memory.c
>> +++ b/drivers/gpu/drm/ttm/ttm_memory.c
>> @@ -600,3 +600,9 @@ size_t ttm_round_pot(size_t size)
>>          return 0;
>>   }
>>   EXPORT_SYMBOL(ttm_round_pot);
>> +
>> +uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob)
>> +{
>> +       return glob->zone_kernel->max_mem;
>> +}
>> +EXPORT_SYMBOL(ttm_get_kernel_zone_memory_size);
>> diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
>> index 72dcbe8..c452089 100644
>> --- a/include/drm/ttm/ttm_memory.h
>> +++ b/include/drm/ttm/ttm_memory.h
>> @@ -155,4 +155,5 @@ extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
>>   extern void ttm_mem_global_free_page(struct ttm_mem_global *glob,
>>                                       struct page *page);
>>   extern size_t ttm_round_pot(size_t size);
>> +extern uint64_t ttm_get_kernel_zone_memory_size(struct ttm_mem_global *glob);
>>   #endif
>> --
>> 2.7.4
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




More information about the amd-gfx mailing list