Re: [PATCH v4 0/6] Cleanups for the nomodeset kernel command line parameter logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux