From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>, linux-kernel@vger.kernel.org
Cc: "David Airlie" <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Dave Airlie" <airlied@redhat.com>,
amd-gfx@lists.freedesktop.org,
"VMware Graphics" <linux-graphics-maintainer@vmware.com>,
"Ben Skeggs" <bskeggs@redhat.com>,
"Neal Gompa" <ngompa13@gmail.com>,
spice-devel@lists.freedesktop.org,
"Michel Dänzer" <michel@daenzer.net>,
"Peter Robinson" <pbrobinson@gmail.com>,
intel-gfx@lists.freedesktop.org,
"Hans de Goede" <hdegoede@redhat.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
nouveau@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
"Pekka Paalanen" <pekka.paalanen@collabora.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [Nouveau] [RESEND PATCH 3/5] drm: Rename vgacon_text_force() function to drm_modeset_disabled()
Date: Wed, 3 Nov 2021 15:28:35 +0100 [thread overview]
Message-ID: <5b4e4534-4786-d231-e331-78fdb5d8496a@redhat.com> (raw)
In-Reply-To: <eddc2967-8355-b64a-79d8-6c1cda1bc732@suse.de>
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
next prev parent reply other threads:[~2021-11-05 14:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 12:28 [Nouveau] [RESEND PATCH 0/5] Cleanups for the nomodeset kernel command line parameter logic Javier Martinez Canillas
2021-11-03 12:28 ` [Nouveau] [RESEND PATCH 2/5] drm: Move nomodeset kernel parameter handler to the DRM subsystem Javier Martinez Canillas
2021-11-03 12:41 ` Thomas Zimmermann
2021-11-03 13:06 ` Javier Martinez Canillas
2021-11-03 12:56 ` Jani Nikula
2021-11-03 13:09 ` Javier Martinez Canillas
2021-11-03 12:28 ` [Nouveau] [RESEND PATCH 3/5] drm: Rename vgacon_text_force() function to drm_modeset_disabled() Javier Martinez Canillas
2021-11-03 12:57 ` Thomas Zimmermann
2021-11-03 14:28 ` Javier Martinez Canillas [this message]
2021-11-03 13:01 ` [Nouveau] [RESEND PATCH 0/5] Cleanups for the nomodeset kernel command line parameter logic Thomas Zimmermann
2021-11-03 15:00 ` 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=5b4e4534-4786-d231-e331-78fdb5d8496a@redhat.com \
--to=javierm@redhat.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michel@daenzer.net \
--cc=ngompa13@gmail.com \
--cc=nouveau@lists.freedesktop.org \
--cc=pbrobinson@gmail.com \
--cc=pekka.paalanen@collabora.com \
--cc=rodrigo.vivi@intel.com \
--cc=spice-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).