[Spice-devel] [RESEND PATCH 3/5] drm: Rename vgacon_text_force() function to drm_modeset_disabled()
Javier Martinez Canillas
javierm at redhat.com
Wed Nov 3 14:28:35 UTC 2021
On 11/3/21 13:57, Thomas Zimmermann wrote:
[snip]
>>
>> - if (vgacon_text_force()) {
>> + if (drm_modeset_disabled()) {
>> DRM_ERROR("amdgpu kernel modesetting disabled.\n");
>
> Please remove all such error messages from drivers.
> drm_modeset_disabled() should print a unified message instead.
>
Agreed.
>> -static bool vgacon_text_mode_force;
>> +static bool drm_nomodeset;
>>
>> -bool vgacon_text_force(void)
>> +bool drm_modeset_disabled(void)
>
> I suggest to rename this function to drm_check_modeset() and have it
> return a negative errno code on failure. This gives maximum flexibility
> and reduces errors in drivers. Right now the drivers return something
> like -EINVAL, which seems wrong. Returning -ENODEV seems more appropriate.
>
Good idea. I'll do it in v2 as well.
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
More information about the Spice-devel
mailing list