Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@gmail.com, daniel@ffwll.ch, lucas.demarchi@intel.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com
Cc: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/xe: Support 'nomodeset' kernel command-line option
Date: Wed, 21 Aug 2024 17:29:05 +0300	[thread overview]
Message-ID: <87plq23q6m.fsf@intel.com> (raw)
In-Reply-To: <172424976000.2071.18125280900868355577@gjsousa-mobl2>

On Wed, 21 Aug 2024, Gustavo Sousa <gustavo.sousa@intel.com> wrote:
> Quoting Thomas Zimmermann (2024-08-21 10:56:59-03:00)
>>Setting 'nomodeset' on the kernel command line disables all graphics
>>drivers with modesetting capabilities; leaving only firmware drivers,
>>such as simpledrm or efifb.
>>
>>Most DRM drivers automatically support 'nomodeset' via DRM's module
>>helper macros. In xe, which uses regular module_init(), manually call
>>drm_firmware_drivers_only() to test for 'nomodeset'. Do not register
>>the driver if set.
>>
>>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>---
>> drivers/gpu/drm/xe/xe_module.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>>diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
>>index 923460119cec..60fb7dd26903 100644
>>--- a/drivers/gpu/drm/xe/xe_module.c
>>+++ b/drivers/gpu/drm/xe/xe_module.c
>>@@ -8,6 +8,8 @@
>> #include <linux/init.h>
>> #include <linux/module.h>
>> 
>>+#include <drm/drm_module.h>
>>+
>> #include "xe_drv.h"
>> #include "xe_hw_fence.h"
>> #include "xe_pci.h"
>>@@ -92,6 +94,9 @@ static int __init xe_init(void)
>> {
>>         int err, i;
>> 
>>+        if (drm_firmware_drivers_only())
>>+                return -ENODEV;
>>+
>
> Hm... But what if xe is to be used only for compute or render? Shouldn't
> we handle this somewhere else?

The question becomes, what does "nomodeset" really mean here?

See what i915 does in i915_module.c.

Cc: Sima.

BR,
Jani.



>
> Taking a quick look, xe_display_probe() might be a good candidate?
>
> --
> Gustavo Sousa
>
>>         for (i = 0; i < ARRAY_SIZE(init_funcs); i++) {
>>                 err = init_funcs[i].init();
>>                 if (err) {
>>-- 
>>2.46.0
>>

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-08-21 14:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 13:56 [PATCH] drm/xe: Support 'nomodeset' kernel command-line option Thomas Zimmermann
2024-08-21 14:03 ` ✓ CI.Patch_applied: success for " Patchwork
2024-08-21 14:03 ` ✓ CI.checkpatch: " Patchwork
2024-08-21 14:04 ` ✓ CI.KUnit: " Patchwork
2024-08-21 14:16 ` [PATCH] " Gustavo Sousa
2024-08-21 14:29   ` Jani Nikula [this message]
2024-08-21 14:48     ` Thomas Zimmermann
2024-08-27  3:59       ` Lucas De Marchi
2024-08-27  6:54         ` Thomas Zimmermann
2024-08-21 14:31   ` Thomas Zimmermann
2024-08-21 14:16 ` ✓ CI.Build: success for " Patchwork
2024-08-21 14:18 ` ✓ CI.Hooks: " Patchwork
2024-08-21 14:19 ` ✓ CI.checksparse: " Patchwork
2024-08-21 14:24 ` [PATCH] " Lucas De Marchi
2024-08-21 14:34   ` Thomas Zimmermann
2024-08-21 14:39 ` ✓ CI.BAT: success for " Patchwork
2024-08-21 15:47 ` ✗ CI.FULL: failure " Patchwork

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=87plq23q6m.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=tzimmermann@suse.de \
    /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