[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1cbe6b4-0c86-b7a5-c2df-0ac3052dec6a@redhat.com>
Date: Fri, 12 Nov 2021 11:35:19 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Pekka Paalanen <ppaalanen@...il.com>,
Thomas Zimmermann <tzimmermann@...e.de>
Cc: Jani Nikula <jani.nikula@...el.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Michel Dänzer <michel@...nzer.net>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Peter Robinson <pbrobinson@...il.com>
Subject: Re: [PATCH v4 0/6] Cleanups for the nomodeset kernel command line
parameter logic
On 11/12/21 11:22, Pekka Paalanen wrote:
[snip]
>>>
>>>> As this is just returning bool without changing anything, the usual
>>>> word to use is "is". Since this function is also used at most once per
>>>> driver, which is rarely, it could have a long and descriptive name.
>>>>
>>>> For example:
>>>>
>>>> bool drm_is_modeset_driver_allowed(void);
>>
>> I'd nominate
>>
>> bool drm_native_drivers_enabled()
>>
>> This is what HW-specific drivers want to query in their init/probing
>> code. The actual semantics of this decision is hidden from the driver.
>> It's also easier to read than the other name IMHO
>
> Ok, but what is a "native driver"? Or a "non-native driver"?
> Is that established kernel terminology?
>
For me the term "native" is also vague. I would prefer to call it platform
specific driver or non-generic driver instead. A problem is that "platform
driver" has a very specific meaning in the kernel, which are drivers for
devices in the "platform" bus (which is also a very overloaded term).
> I'd think a non-native driver is something that e.g. ndiswrapper is
Yeah, that's why I think that "generic" and "non-generic" is a better way
to describe the drivers that could be used for any platform as long as the
hardware was already initialized and a struct screen_info filled with data.
> loading. Is simpledrm like ndiswrapper in a sense? IIRC, simpledrm is
> the driver that would not consult this function, right?
>
Correct.
Or maybe just 'bool drm_modeset_enabled()' ? After all, that's really what
the "nomodeset" kernel param disables. The fact that DRM drivers abuse that
boolean semantics to also prevent the drivers to load is a different topic.
>
> Thanks,
> pq
>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists