[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab551ded-f8f2-4a75-8b51-a8a0fb9e3349@suse.de>
Date: Thu, 21 Sep 2023 10:44:05 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Javier Martinez Canillas <javierm@...hat.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Maxime Ripard <mripard@...nel.org>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/ssd130x: Drop _helper prefix from struct
drm_*_helper_funcs callbacks
Hi
Am 21.09.23 um 10:23 schrieb Javier Martinez Canillas:
[...]
>
> Both options have cons and pros (e.g: quickly figuring out to what struct
> callback is associated as you said), but the reason I posted this patch is
> to attempt making the driver more consistent with the rest of the drivers.
>
>> Perhaps the real question is whether the structures should have "helper"
>> in their name in the first place?
>>
>
> Indeed. I never fully understood why the DRM/KMS objects callbacks are
> split in drm_$object_funcs and drm_$object_helper_funcs structs. AFAIU
> is because the former is the minimum required and the latter is to add
> additional custom behavior ?
The drm_<object>_funcs is an interface that is being called from DRM
userspace/clients/ioctls. It's the interface that we present to the
outside world. Implement them in each hardware's driver.
But most graphics hardware is similar to each other. The differences are
in the way how things are done, but not so much what is being done.
Hence, a good number of drm_$object_funcs can be provided in
hardware-independent helpers. drm_object_helper_funcs are callback for
these helpers. In the places where the helpers need the driver to do
something with the hardware, they refer to _helper_funcs.
IIRC, there are a few outliers, but that's the overall idea.
Best regards
Thomas
>
> I read this section of the documentation but still isn't clear to me:
>
> https://dri.freedesktop.org/docs/drm/gpu/drm-kms-helpers.html
>
>> Just my 2€c as a DRM novice...
>>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists