search for: nouveau_led_init

Displaying 20 results from an estimated 24 matches for "nouveau_led_init".

2016 Nov 08
2
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
...LEDS_CLASS" everywhere. > > > > Another option is to use the IS_REACHABLE() macro instead of IS_ENABLED() > > in the header file, to stub out the calls into the new file, but > > that can be a bit confusing. > > Why don't you just add empty inline stubs for nouveau_led_init / _fini / > _suspend / _resume? > That's what I was suggesting: diff --git a/drivers/gpu/drm/nouveau/nouveau_led.h b/drivers/gpu/drm/nouveau/nouveau_led.h index 9c9bb6ac938e..bc5f47cb516b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_led.h +++ b/drivers/gpu/drm/nouveau/nouveau_led.h @@...
2017 Jan 12
0
nouveau_drm.c: undefined reference to `nouveau_led_init'
On 12/01/17 09:55, George Spelvin wrote: > If CONFIG_DRM_NOUVEAU=y and CONFIG_LEDS_CLASS=m, then nouveau_led.o is > neither stubbed out nor compiled in and the compile fails with undefined > symbols in nouveau_drm.c. > > I'm guessing it's commit 8d021d71b324. (Thanks for the cool hack, BTW, > even if I don't have such a card and am complaining about the patch.) >
2017 Jan 12
1
nouveau_drm.c: undefined reference to `nouveau_led_init'
If CONFIG_DRM_NOUVEAU=y and CONFIG_LEDS_CLASS=m, then nouveau_led.o is neither stubbed out nor compiled in and the compile fails with undefined symbols in nouveau_drm.c. I'm guessing it's commit 8d021d71b324. (Thanks for the cool hack, BTW, even if I don't have such a card and am complaining about the patch.) Worked around by setting CONFIG_NEW_LEDS=n (it had been forced on by
2016 Nov 08
0
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
...ywhere. >> > >> > Another option is to use the IS_REACHABLE() macro instead of IS_ENABLED() >> > in the header file, to stub out the calls into the new file, but >> > that can be a bit confusing. >> >> Why don't you just add empty inline stubs for nouveau_led_init / _fini / >> _suspend / _resume? >> > > That's what I was suggesting: > > diff --git a/drivers/gpu/drm/nouveau/nouveau_led.h b/drivers/gpu/drm/nouveau/nouveau_led.h > index 9c9bb6ac938e..bc5f47cb516b 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_led.h > +++ b/d...
2016 Nov 08
2
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
On Tuesday, November 8, 2016 10:46:07 AM CET Ilia Mirkin wrote: > > diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig > > index 78631fb61adf..715cd6f4dc31 100644 > > --- a/drivers/gpu/drm/nouveau/Kconfig > > +++ b/drivers/gpu/drm/nouveau/Kconfig > > @@ -46,6 +46,14 @@ config NOUVEAU_DEBUG > > The paranoia and spam levels
2016 Aug 22
10
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...ot;nouveau_led.h" #include "nouveau_hwmon.h" #include "nouveau_acpi.h" #include "nouveau_bios.h" @@ -468,6 +469,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) nouveau_hwmon_init(dev); nouveau_accel_init(drm); nouveau_fbcon_init(dev); + nouveau_led_init(dev); if (nouveau_runtime_pm != 0) { pm_runtime_use_autosuspend(dev->dev); @@ -499,6 +501,7 @@ nouveau_drm_unload(struct drm_device *dev) struct nouveau_drm *drm = nouveau_drm(dev); pm_runtime_get_sync(dev->dev); + nouveau_led_fini(dev); nouveau_fbcon_fini(dev); nouveau_accel...
2016 Sep 16
7
[PATCH 1/3] drm/nouveau/led: don't access led subdev if it wasn't initialized
From: Karol Herbst <karolherbst at gmail.com> Fixes a kernel crash on suspend/resume. --- drm/nouveau/nouveau_led.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 9eed5a6..5e28b5f 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -107,7 +107,8 @@ nouveau_led_suspend(struct
2016 Aug 22
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...ot;nouveau_led.h" #include "nouveau_hwmon.h" #include "nouveau_acpi.h" #include "nouveau_bios.h" @@ -475,6 +476,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) nouveau_hwmon_init(dev); nouveau_accel_init(drm); nouveau_fbcon_init(dev); + nouveau_led_init(dev); if (nouveau_runtime_pm != 0) { pm_runtime_use_autosuspend(dev->dev); @@ -510,6 +512,7 @@ nouveau_drm_unload(struct drm_device *dev) pm_runtime_forbid(dev->dev); } + nouveau_led_fini(dev); nouveau_fbcon_fini(dev); nouveau_accel_fini(drm); nouveau_hwmon_fini(dev); @@ -...
2016 Nov 08
4
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
...9; drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_drm_unload': tvnv17.c:(.text.nouveau_drm_unload+0x34): undefined reference to `nouveau_led_fini' drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_drm_load': tvnv17.c:(.text.nouveau_drm_load+0x7d0): undefined reference to `nouveau_led_init' This adds a separate Kconfig symbol for the LED support that correctly tracks the dependencies. Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo") Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/gpu/drm/nouveau/Kbuild | 2...
2016 May 03
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
...; > #include "nouveau_acpi.h" > #include "nouveau_bios.h" > @@ -468,6 +469,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) > nouveau_hwmon_init(dev); > nouveau_accel_init(drm); > nouveau_fbcon_init(dev); > + nouveau_led_init(dev); > > if (nouveau_runtime_pm != 0) { > pm_runtime_use_autosuspend(dev->dev); > @@ -499,6 +501,7 @@ nouveau_drm_unload(struct drm_device *dev) > struct nouveau_drm *drm = nouveau_drm(dev); > > pm_runtime_get_sync(dev->dev); >...
2016 Aug 23
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...; > #include "nouveau_acpi.h" > #include "nouveau_bios.h" > @@ -468,6 +469,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) > nouveau_hwmon_init(dev); > nouveau_accel_init(drm); > nouveau_fbcon_init(dev); > + nouveau_led_init(dev); > > if (nouveau_runtime_pm != 0) { > pm_runtime_use_autosuspend(dev->dev); > @@ -499,6 +501,7 @@ nouveau_drm_unload(struct drm_device *dev) > struct nouveau_drm *drm = nouveau_drm(dev); > > pm_runtime_get_sync(dev->dev); >...
2016 May 07
0
[PATCH] drm/nouveau: add a LED driver for the NVIDIA logo
...; > #include "nouveau_acpi.h" > #include "nouveau_bios.h" > @@ -468,6 +469,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) > nouveau_hwmon_init(dev); > nouveau_accel_init(drm); > nouveau_fbcon_init(dev); > + nouveau_led_init(dev); > > if (nouveau_runtime_pm != 0) { > pm_runtime_use_autosuspend(dev->dev); > @@ -499,6 +501,7 @@ nouveau_drm_unload(struct drm_device *dev) > struct nouveau_drm *drm = nouveau_drm(dev); > > pm_runtime_get_sync(dev->dev); >...
2016 Aug 23
4
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
On 23 August 2016 at 00:42, Martin Peres <martin.peres at free.fr> wrote: > v2: > - guard LED framework calls with ifdef CONFIG_LEDS_CLASS > IIRC kernel has the tendency of using static inlines in the headers when CONFIG_foo is not set. Worth using that and removing the ifdef from the source file ? -Emil
2016 Dec 07
3
[PATCH] nouveau/led: introduce CONFIG_DRM_NOUVEAU_LEDS
This fixes the auto-magic detection of LEDS_CLASS by fixing the case where nouveau would be built-in and the LEDS_CLASS would be built as as module. Cc: <stable at vger.kernel.org> # 4.9.x- Reported-by: Intel's 0-DAY Signed-off-by: Martin Peres <martin.peres at free.fr> --- drivers/gpu/drm/nouveau/Kbuild | 2 +- drivers/gpu/drm/nouveau/Kconfig | 9 +++++++++ 2 files changed, 10
2016 Sep 16
0
[PATCH 3/3] drm/nouveau/led: abort early if the device does not have GPIOs
...y: Martin Peres <martin.peres at free.fr> --- drm/nouveau/nouveau_led.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 1f731da..3e2f1b6 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -82,6 +82,9 @@ nouveau_led_init(struct drm_device *dev) struct dcb_gpio_func logo_led; int ret; + if (!gpio) + return 0; + /* check that there is a GPIO controlling the logo LED */ if (nvkm_gpio_find(gpio, 0, DCB_GPIO_LOGO_LED_PWM, 0xff, &logo_led)) return 0; -- 2.8.0
2016 Nov 08
0
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
..., > or use "depends on LEDS_CLASS" everywhere. > > Another option is to use the IS_REACHABLE() macro instead of IS_ENABLED() > in the header file, to stub out the calls into the new file, but > that can be a bit confusing. Why don't you just add empty inline stubs for nouveau_led_init / _fini / _suspend / _resume? Thanks, Lukas
2016 Dec 07
0
[PATCH] nouveau/led: prevent compiling the led-code if nouveau=y and leds=m
...m/nouveau/nouveau_led.h index 187ecdb..21a5775 100644 --- a/drivers/gpu/drm/nouveau/nouveau_led.h +++ b/drivers/gpu/drm/nouveau/nouveau_led.h @@ -42,7 +42,7 @@ nouveau_led(struct drm_device *dev) } /* nouveau_led.c */ -#if IS_ENABLED(CONFIG_LEDS_CLASS) +#if IS_REACHABLE(CONFIG_LEDS_CLASS) int nouveau_led_init(struct drm_device *dev); void nouveau_led_suspend(struct drm_device *dev); void nouveau_led_resume(struct drm_device *dev); -- 2.10.2
2017 Jan 18
0
[PATCH] drm/nouveau/led: prevent a possible use-after-free
...LED before, I don't want to add another one! drm/nouveau/nouveau_led.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drm/nouveau/nouveau_led.c b/drm/nouveau/nouveau_led.c index 72456b16..2c5e0628 100644 --- a/drm/nouveau/nouveau_led.c +++ b/drm/nouveau/nouveau_led.c @@ -102,6 +102,7 @@ nouveau_led_init(struct drm_device *dev) ret = led_classdev_register(dev->dev, &drm->led->led); if (ret) { kfree(drm->led); + drm->led = NULL; return ret; } -- 2.11.0
2016 Nov 08
0
[PATCH] drm/nouveau: fix LEDS_CLASS=m configuration
...drm/nouveau/nouveau.o: In function `nouveau_drm_unload': > tvnv17.c:(.text.nouveau_drm_unload+0x34): undefined reference to `nouveau_led_fini' > drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_drm_load': > tvnv17.c:(.text.nouveau_drm_load+0x7d0): undefined reference to `nouveau_led_init' > > This adds a separate Kconfig symbol for the LED support that > correctly tracks the dependencies. > > Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo") > Signed-off-by: Arnd Bergmann <arnd at arndb.de> > --- > dri...
2019 May 07
0
[PATCH v2 1/4] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...id) { return false; } #endif #endif diff --git a/drm/nouveau/nouveau_drm.c b/drm/nouveau/nouveau_drm.c index 5020265b..09e68e61 100644 --- a/drm/nouveau/nouveau_drm.c +++ b/drm/nouveau/nouveau_drm.c @@ -556,6 +556,7 @@ nouveau_drm_device_init(struct drm_device *dev) nouveau_fbcon_init(dev); nouveau_led_init(dev); + drm->runpm_dsm = nouveau_runpm_calls_dsm(); if (nouveau_pmops_runtime()) { pm_runtime_use_autosuspend(dev->dev); pm_runtime_set_autosuspend_delay(dev->dev, 5000); @@ -903,6 +904,7 @@ nouveau_pmops_runtime_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(...