mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Maxime Ripard <mripard@kernel.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/ssd130x: Drop _helper prefix from struct drm_*_helper_funcs callbacks
Date: Thu, 21 Sep 2023 10:44:05 +0200	[thread overview]
Message-ID: <ab551ded-f8f2-4a75-8b51-a8a0fb9e3349@suse.de> (raw)
In-Reply-To: <878r90kk8h.fsf@minerva.mail-host-address-is-not-set>


[-- Attachment #1.1: Type: text/plain, Size: 1812 bytes --]

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)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-09-21 20:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 19:51 Javier Martinez Canillas
2023-09-18  6:51 ` Thomas Zimmermann
2023-09-18  7:19   ` Javier Martinez Canillas
2023-09-21  7:44     ` Maxime Ripard
2023-09-21  7:57       ` Geert Uytterhoeven
2023-09-21  8:12         ` Maxime Ripard
2023-09-21  8:25           ` Javier Martinez Canillas
2023-09-21  8:46           ` Geert Uytterhoeven
2023-09-21  8:51             ` Maxime Ripard
2023-09-21  9:07               ` Geert Uytterhoeven
2023-09-21  8:55             ` Thomas Zimmermann
2023-09-21  8:23         ` Javier Martinez Canillas
2023-09-21  8:44           ` Thomas Zimmermann [this message]
2023-09-21  8:52       ` Thomas Zimmermann
2023-09-21 13:22         ` Maxime Ripard
2023-09-21 14:19 ` Maxime Ripard
2023-09-22  9:50   ` Javier Martinez Canillas

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=ab551ded-f8f2-4a75-8b51-a8a0fb9e3349@suse.de \
    --to=tzimmermann@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=javierm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    /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®