All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: "David Airlie" <airlied-cv59FeDIM0c@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"amd-gfx mailing list"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	"Ilia Mirkin" <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Subject: Re: [PATCH 2/2] drm/amdgpu: Add modeset module option
Date: Tue, 3 Apr 2018 17:06:03 +0300	[thread overview]
Message-ID: <20180403140603.GA5453@intel.com> (raw)
In-Reply-To: <957f79ce-80e9-d240-3632-e8b346708646-otUistvHUpPR7s880joybQ@public.gmane.org>

On Tue, Apr 03, 2018 at 03:47:57PM +0200, Michel Dänzer wrote:
> On 2018-04-03 03:39 PM, Ilia Mirkin wrote:
> > On Tue, Apr 3, 2018 at 9:32 AM, Michel Dänzer <michel@daenzer.net> wrote:
> >> On 2018-04-03 03:26 PM, Ilia Mirkin wrote:
> >>> On Tue, Apr 3, 2018 at 5:29 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> >>>> On Sun, Apr 01, 2018 at 10:12:10PM +0200, Christian König wrote:
> >>>>> Am 01.04.2018 um 20:21 schrieb Takashi Iwai:
> >>>>>> On Sun, 01 Apr 2018 19:58:11 +0200,
> >>>>>> Christian K6nig wrote:
> >>>>>>> Am 01.04.2018 um 19:45 schrieb Ilia Mirkin:
> >>>>>>>> On Sun, Apr 1, 2018 at 1:39 PM, Christian König
> >>>>>>>> <christian.koenig@amd.com> wrote:
> >>>>>>>>> Am 30.03.2018 um 22:45 schrieb Takashi Iwai:
> >>>>>>>>>> amdgpu driver lacks of modeset module option other drm drivers provide
> >>>>>>>>>> for enforcing or disabling the driver load.  Interestingly, the
> >>>>>>>>>> amdgpu_mode variable declaration is already found in the header file,
> >>>>>>>>>> but the actual implementation seems to have been forgotten.
> >>>>>>>>>>
> >>>>>>>>>> This patch adds the missing piece.
> >>>>>>>>> NAK, modesetting is mandatory for amdgpu and we should probably remove the
> >>>>>>>>> option to disable it from other DRM drivers without UMS support as well
> >>>>>>>>> (pretty much all of them now).
> >>>>>>>>>
> >>>>>>>>> If you want to prevent a driver from loading I think the correct way to do
> >>>>>>>>> so is to give modprobe.blacklist=amdgpu on the kernel commandline.
> >>>>>>>>>
> >>>>>>>>> That would remove the possibility to prevent the driver from loading when it
> >>>>>>>>> is compiled in, but I don't see much of a problem with that.
> >>>>>>>> Having a way to kill the graphics driver is a very useful debugging
> >>>>>>>> tool, and also a quick and easy way to get out of an unpleasant
> >>>>>>>> situation where graphics are messed up / system hangs / etc. The
> >>>>>>>> modprobe blacklist kernel arg only works in certain environments (and
> >>>>>>>> only if it's a module).
> >>>>>>>>
> >>>>>>>> Every other DRM driver has this and this is a well-documented
> >>>>>>>> workaround for "graphics are messed up when I install linux", why not
> >>>>>>>> allow a uniform experience for the end users who are just trying to
> >>>>>>>> get their systems up and running?
> >>>>>>> Because it is not well documented and repeated over and over again in
> >>>>>>> drivers.
> >>>>>>>
> >>>>>>> The problem is that people don't realized that the driver isn't loaded
> >>>>>>> at all without the modeset=0 module option and demand fixing the
> >>>>>>> resulting bad performance without modesetting.
> >>>>>> Hm, I don't get it.  What this options has to do with performance for
> >>>>>> a KMS-only driver...?
> >>>>>
> >>>>> Well exactly that's the point, nothing.
> >>>>>
> >>>>> The problem is that the option name is confusing to the end user because the
> >>>>> expectation is that "nomodeset" just means that they only can't change the
> >>>>> display mode.
> >>>>>
> >>>>> Some (unfortunately quite a lot) people don't realize that for KMS drivers
> >>>>> this means that the driver isn't even loaded and they also don't get any
> >>>>> acceleration.
> >>>>>
> >>>>> We had to explain that numerous times now. I think it would be best to give
> >>>>> the option a more meaningful name.
> >>>>
> >>>> Yeah, agreed with Christian. If we want a generic "pls disable all gfx
> >>>> accel" knob then probably best to put that into the drm core. And just
> >>>> outright fail loading the drm core if that happens, which will prevent all
> >>>> gfx drivers from loading.
> >>>>
> >>>> That likely means a hole bunch of stuff won't work (usually sound keels
> >>>> over too), but that's what you get for this. Only disabling modesetting
> >>>> without disabling the entire driver doesn't work (never has, except for
> >>>> this UMS+GEM combo only i915 support, and not for long).
> >>>>
> >>>> And once we have that knob, probably best to phase out all the per-driver
> >>>> options.
> >>>
> >>> Another use-case that the per-driver disables enable is "i915 works
> >>> but nouveau is broken due to crazy ACPI / PCIe PM / whatever". It
> >>> seems likely this could happen with amdgpu as well.
> >>
> >> modprobe.blacklist=amdgpu
> >>
> >> works as well as the modeset parameter for this.
> > 
> > People who build their own kernels run into trouble too.
> 
> There have always been various more or less serious issues with building
> amdgpu (and radeon) into the kernel. People who do so get to keep all
> pieces when it breaks.
> 
> 
> > Also does this work uniformly across all systems where it is a module?
> 
> AFAIK yes.

Sadly modprobe.blacklist doesn't prevent X/whatever from loading the
module anyway.

I use modprobe.blacklist myself all the time for i915 development,
but I also have all GUI junk disabled as well so that I can load the
module myself when I'm actually ready for it (typically after I've
enabled netconsole).

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-04-03 14:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-30 20:45 [PATCH 1/2] drm/amdgpu: Fix memory leaks at amdgpu_init() error path Takashi Iwai
     [not found] ` <20180330204512.16863-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-03-30 20:45   ` [PATCH 2/2] drm/amdgpu: Add modeset module option Takashi Iwai
     [not found]     ` <20180330204512.16863-2-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-04-01 17:39       ` Christian König
     [not found]         ` <c95f9e61-c921-42de-9e03-851d785ab5fc-5C7GfCeVMHo@public.gmane.org>
2018-04-01 17:45           ` Ilia Mirkin
2018-04-01 17:58             ` Christian König
     [not found]               ` <706f4d0d-4583-2c8a-447d-f6cdd3429ad5-5C7GfCeVMHo@public.gmane.org>
2018-04-01 18:21                 ` Takashi Iwai
     [not found]                   ` <s5ho9j24wk9.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-04-01 20:12                     ` Christian König
     [not found]                       ` <0ecce204-6af8-2395-ac40-391e3b655bed-5C7GfCeVMHo@public.gmane.org>
2018-04-03  9:29                         ` Daniel Vetter
     [not found]                           ` <20180403092948.GQ3881-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-03 11:30                             ` Christian König
2018-04-03 13:26                           ` Ilia Mirkin
     [not found]                             ` <CAKb7UvhG5nO9q1M=6fu6mnChObsskxFzgGXQPUJQCk1Q+E9ffQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-03 13:32                               ` Michel Dänzer
     [not found]                                 ` <ea3e89e9-0a31-604f-c3f4-2693a0f9ca92-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-03 13:39                                   ` Ilia Mirkin
     [not found]                                     ` <CAKb7UvibPPu9O0HKbGBz7Zd9av-1YR905zH5VypiYeMRbGasGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-03 13:47                                       ` Michel Dänzer
     [not found]                                         ` <957f79ce-80e9-d240-3632-e8b346708646-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-03 14:06                                           ` Ville Syrjälä [this message]
     [not found]                                             ` <20180403140603.GA5453-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-04-03 15:02                                               ` Daniel Vetter
     [not found]                                                 ` <20180403150235.GV3881-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-04-03 16:54                                                   ` Ville Syrjälä
2018-04-03 15:09                                             ` Michel Dänzer
     [not found]             ` <CAKb7Uvh_CxE=Zg_F0tentwXK64_baxs0TCQ-K9Mh_Mjf+NV_DA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-03  8:36               ` Michel Dänzer
2018-04-03  8:57                 ` Christian König
     [not found]                   ` <781c3a0b-e199-c637-410a-521fe5fd5170-5C7GfCeVMHo@public.gmane.org>
2018-04-03  9:02                     ` Takashi Iwai
     [not found]                       ` <s5hpo3g1x4m.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-04-03  9:18                         ` Michel Dänzer
2018-04-03  9:44                           ` Takashi Iwai
     [not found]                             ` <s5h1sfwk4ja.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2018-04-03 13:01                               ` Michel Dänzer
     [not found]                           ` <e4933491-65be-4b31-95de-cf1147dd312c-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-03  9:53                             ` Jani Nikula
2019-09-25  8:07       ` Dave Airlie
2019-09-25  9:04         ` Koenig, Christian
2018-04-02 17:36   ` [PATCH 1/2] drm/amdgpu: Fix memory leaks at amdgpu_init() error path Alex Deucher

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=20180403140603.GA5453@intel.com \
    --to=ville.syrjala-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.