dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Matthew Auld <matthew.william.auld@gmail.com>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/5] drm/ttm: remove the outdated kerneldoc section
Date: Tue, 7 Sep 2021 08:46:29 +0200	[thread overview]
Message-ID: <bcdd369c-bef3-4b39-40a9-a5dc3fc85147@gmail.com> (raw)
In-Reply-To: <CAM0jSHMdNUbbE2EzFnpfaVJn6gg2JEiPUL=qV2STmgEtfoEsjQ@mail.gmail.com>



Am 03.09.21 um 16:22 schrieb Matthew Auld:
> On Fri, 3 Sept 2021 at 13:31, Christian König
> <ckoenig.leichtzumerken@gmail.com> wrote:
>> Clean up to start over with new and more accurate documentation.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
> For the series,
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Thanks.

>
> We could maybe also bring in ttm_pool.[ch]? It looks like it already
> has near complete kernel-doc?

Yes, just didn't had time to cleanup the remaining fallout yet.

The last and most important remaining beast is the BO documentation, but 
that will still take a while.

Regards,
Christian.

>
>> ---
>>   Documentation/gpu/drm-mm.rst | 49 ------------------------------------
>>   1 file changed, 49 deletions(-)
>>
>> diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst
>> index 0198fa43d254..8ca981065e1a 100644
>> --- a/Documentation/gpu/drm-mm.rst
>> +++ b/Documentation/gpu/drm-mm.rst
>> @@ -30,55 +30,6 @@ The Translation Table Manager (TTM)
>>
>>   TTM design background and information belongs here.
>>
>> -TTM initialization
>> -------------------
>> -
>> -    **Warning**
>> -    This section is outdated.
>> -
>> -Drivers wishing to support TTM must pass a filled :c:type:`ttm_bo_driver
>> -<ttm_bo_driver>` structure to ttm_bo_device_init, together with an
>> -initialized global reference to the memory manager.  The ttm_bo_driver
>> -structure contains several fields with function pointers for
>> -initializing the TTM, allocating and freeing memory, waiting for command
>> -completion and fence synchronization, and memory migration.
>> -
>> -The :c:type:`struct drm_global_reference <drm_global_reference>` is made
>> -up of several fields:
>> -
>> -.. code-block:: c
>> -
>> -              struct drm_global_reference {
>> -                      enum ttm_global_types global_type;
>> -                      size_t size;
>> -                      void *object;
>> -                      int (*init) (struct drm_global_reference *);
>> -                      void (*release) (struct drm_global_reference *);
>> -              };
>> -
>> -
>> -There should be one global reference structure for your memory manager
>> -as a whole, and there will be others for each object created by the
>> -memory manager at runtime. Your global TTM should have a type of
>> -TTM_GLOBAL_TTM_MEM. The size field for the global object should be
>> -sizeof(struct ttm_mem_global), and the init and release hooks should
>> -point at your driver-specific init and release routines, which probably
>> -eventually call ttm_mem_global_init and ttm_mem_global_release,
>> -respectively.
>> -
>> -Once your global TTM accounting structure is set up and initialized by
>> -calling ttm_global_item_ref() on it, you need to create a buffer
>> -object TTM to provide a pool for buffer object allocation by clients and
>> -the kernel itself. The type of this object should be
>> -TTM_GLOBAL_TTM_BO, and its size should be sizeof(struct
>> -ttm_bo_global). Again, driver-specific init and release functions may
>> -be provided, likely eventually calling ttm_bo_global_ref_init() and
>> -ttm_bo_global_ref_release(), respectively. Also, like the previous
>> -object, ttm_global_item_ref() is used to create an initial reference
>> -count for the TTM, which will call your initialization function.
>> -
>> -See the radeon_ttm.c file for an example of usage.
>> -
>>   The Graphics Execution Manager (GEM)
>>   ====================================
>>
>> --
>> 2.25.1
>>


      reply	other threads:[~2021-09-07  6:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 12:31 [PATCH 1/5] drm/ttm: remove the outdated kerneldoc section Christian König
2021-09-03 12:31 ` [PATCH 2/5] drm/ttm: enable TTM device object kerneldoc Christian König
2021-09-03 13:16   ` Matthew Auld
2021-09-07  6:41     ` Christian König
2021-09-03 12:31 ` [PATCH 3/5] drm/ttm: enable TTM resource " Christian König
2021-09-03 13:48   ` Matthew Auld
2021-09-07  6:42     ` Christian König
2021-09-03 12:31 ` [PATCH 4/5] drm/ttm: enable TTM placement kerneldoc Christian König
2021-09-03 12:31 ` [PATCH 5/5] drm/ttm: enable TTM TT object kerneldoc Christian König
2021-09-03 14:22 ` [PATCH 1/5] drm/ttm: remove the outdated kerneldoc section Matthew Auld
2021-09-07  6:46   ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcdd369c-bef3-4b39-40a9-a5dc3fc85147@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=matthew.william.auld@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox