mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: "Adrián Martínez Larumbe" <adrian.larumbe@collabora.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
	Steven Price <steven.price@arm.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	kernel@collabora.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	Mihail Atanassov <mihail.atanassov@arm.com>
Subject: Re: [PATCH v5 2/2] Documentation/gpu: Add fdinfo meanings of drm-*-internal memory tags
Date: Fri, 3 Jan 2025 10:49:43 +0000	[thread overview]
Message-ID: <c76881d9-e7e4-48b3-904c-439ab28d9782@ursulin.net> (raw)
In-Reply-To: <2sb72aco2lc5hlvwn7hpc5k27naep7u2s64lc6qzk4ruy6jkhd@c2dfhvhe76yt>


On 02/01/2025 22:18, Adrián Martínez Larumbe wrote:
> On 02.01.2025 21:59, Tvrtko Ursulin wrote:
>>
>> On 18/12/2024 18:18, Adrián Martínez Larumbe wrote:
>>> From: Adrián Larumbe <adrian.larumbe@collabora.com>
>>>
>>> A previous commit enabled display of driver-internal kernel BO sizes
>>> through the device file's fdinfo interface.
>>>
>>> Expand the description of the relevant driver-specific key:value pairs
>>> with the definitions of the new drm-*-internal ones.
>>>
>>> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
>>> Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
>>> ---
>>>    Documentation/gpu/panthor.rst | 14 ++++++++++++++
>>>    1 file changed, 14 insertions(+)
>>>
>>> diff --git a/Documentation/gpu/panthor.rst b/Documentation/gpu/panthor.rst
>>> index 3f8979fa2b86..23aa3d67c9d2 100644
>>> --- a/Documentation/gpu/panthor.rst
>>> +++ b/Documentation/gpu/panthor.rst
>>> @@ -26,6 +26,10 @@ the currently possible format options:
>>>         drm-cycles-panthor:     94439687187
>>>         drm-maxfreq-panthor:    1000000000 Hz
>>>         drm-curfreq-panthor:    1000000000 Hz
>>> +     drm-total-internal:     10396 KiB
>>> +     drm-shared-internal:    0
>>> +     drm-active-internal:    10396 KiB
>>> +     drm-resident-internal:  10396 KiB
>>>         drm-total-memory:       16480 KiB
>>>         drm-shared-memory:      0
>>>         drm-active-memory:      16200 KiB
>>> @@ -44,3 +48,13 @@ driver by writing into the appropriate sysfs node::
>>>    Where `N` is a bit mask where cycle and timestamp sampling are respectively
>>>    enabled by the first and second bits.
>>> +
>>> +Possible `drm-*-internal` keys are: `total`, `active`, `resident` and `shared`.
>>> +These values convey the sizes of the internal driver-owned shmem BO's that
>>> +aren't exposed to user-space through a DRM handle, like queue ring buffers,
>>> +sync object arrays and heap chunks. Because they are all allocated and pinned
>>> +at creation time, `drm-resident-internal` and `drm-total-internal` should always
>>> +be equal. `drm-active-internal` shows the size of kernel BO's associated with
>>> +VM's and groups currently being scheduled for execution by the GPU.
>>> +`drm-shared-internal` is unused at present, but in the future it might stand for
>>> +the size of executable FW regions, since they do not belong to an open file context.
>>
>> The description is way too specific, too tied to some of the implementations.
> 
> These are panthor-specific key:value pairs. I was in the belief that drivers
> could define their own when it suits their interest beyond the DRM-wide ones
> defined in the drm-fdinfo spec.
> 
>> I also don't remember that you ever explained why totting up the internal
>> objects into existing regions isn't good enough. I keep asking, you keep not
>> explaining. Or I missed your emails somehow.
> 
> It's not that it's not good enough, but rather that it cannot be done in the
> current state of affairs. drm_show_memory_stats() defines its own
> drm_memory_stats struct as an automatic variable so we don't have access to it
> from anywhere else in the driver. In a previous revision of the patch series I
> had come up with a workaround that would let drivers pass a function pointer to
> drm_show_memory_stats() which would gather those numbers in a driver-specific
> way, but it didn't seem to get any traction.

Side note - i915 and amdgpu manage to do it so it is not that it is not 
possible.

>> And you keep not copying me on the thread. Copying people who expressed
>> interest, gave past feedback, etc should be the norm.
> 
> I did not CC you on this series because these are all panthor-specific changes
> which do not touch on any DRM fdinfo-wide code, and also because I didn't think
> that driver-specific key:value pairs needed the approval of the drm-fdinfo core
> maintainers.

Ah my bad.. sorry! I saw drm-internal-* and did not spot it is actually 
*in* panthor.rst. So I think you just need to rename those to panthor- 
prefix. Same as amdgpu has its own private keys amd-evicted-vram etc.

Regards,

Tvrtko

>> Until we can clarify the above points I don't think this can go in.
>>
>> Regards,
>>
>> Tvrtko
> 
> Adrian Larumbe

  reply	other threads:[~2025-01-03 10:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 18:18 [PATCH v5 0/2] drm/panthor: Display size of internal kernel BOs through fdinfo Adrián Martínez Larumbe
2024-12-18 18:18 ` [PATCH v5 1/2] drm/panthor: Expose size of driver internal BO's over fdinfo Adrián Martínez Larumbe
2024-12-18 19:14   ` Adrián Larumbe
2024-12-20 11:12     ` Steven Price
2024-12-19 16:30   ` Mihail Atanassov
2024-12-20 11:08     ` Steven Price
2024-12-20 11:14       ` Mihail Atanassov
2025-01-02 20:35     ` Adrián Martínez Larumbe
2024-12-20 21:06   ` kernel test robot
2024-12-18 18:18 ` [PATCH v5 2/2] Documentation/gpu: Add fdinfo meanings of drm-*-internal memory tags Adrián Martínez Larumbe
2024-12-19 13:06   ` Liviu Dudau
2024-12-20 11:13   ` Steven Price
2025-01-02 21:59   ` Tvrtko Ursulin
2025-01-02 22:18     ` Adrián Martínez Larumbe
2025-01-03 10:49       ` Tvrtko Ursulin [this message]
2025-01-06 16:53         ` Adrián Martínez Larumbe
2025-01-07 10:43           ` Tvrtko Ursulin

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=c76881d9-e7e4-48b3-904c-439ab28d9782@ursulin.net \
    --to=tursulin@ursulin.net \
    --cc=adrian.larumbe@collabora.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mihail.atanassov@arm.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®