search for: nouveau_backlight_exit

Displaying 20 results from an estimated 23 matches for "nouveau_backlight_exit".

2018 Aug 29
5
[PATCH v2 0/5] drm/nouveau: Backlight fixes and cleanup
...ersion of https://patchwork.freedesktop.org/series/48596/ . Made some important changes to the refactoring patch, but everything else is the same. Lyude Paul (5): drm/nouveau: Check backlight IDs are >= 0, not > 0 drm/nouveau: Move backlight device into nouveau_connector drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ drm/nouveau: Cleanup indenting in nouveau_backlight.c drm/nouveau: Refactor nvXX_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 218 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 ++ drivers/gpu/drm/nouveau/nouveau_connector.h |...
2018 Aug 23
6
[PATCH 0/5] drm/nouveau: Backlight fixes and cleanup
...cally on systems with nouveau handling the backlight of one of the displays. While we're at it, let's cleanup nouveau_backlight.c as well Lyude Paul (5): drm/nouveau: Check backlight IDs are >= 0, not > 0 drm/nouveau: Move backlight device into nouveau_connector drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ drm/nouveau: Cleanup indenting in nouveau_backlight.c drm/nouveau: Refactor nvXX_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 193 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 ++ drivers/gpu/drm/nouveau/nouveau_connector.h |...
2018 Aug 29
5
[PATCH v3 0/5] drm/nouveau: Backlight fixes and cleanup
.... Added NV_INFO_ONCE and made "Move backlight device into nouveau_connector" use that instead so we don't print the GMUX warning more then once. Lyude Paul (5): drm/nouveau: Add NV_PRINTK_ONCE and variants drm/nouveau: Move backlight device into nouveau_connector drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ drm/nouveau: Cleanup indenting in nouveau_backlight.c drm/nouveau: Refactor nvXX_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 220 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 ++ drivers/gpu/drm/nouveau/nouveau_connector.h |...
2018 Aug 29
6
[PATCH RESEND v3 0/6] drm/nouveau: Backlight fixes and cleanup
...ne now, whoops! No actual changes, next version of https://patchwork.freedesktop.org/series/48596/ Lyude Paul (6): drm/nouveau: Check backlight IDs are >= 0, not > 0 drm/nouveau: Add NV_PRINTK_ONCE and variants drm/nouveau: Move backlight device into nouveau_connector drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ drm/nouveau: Cleanup indenting in nouveau_backlight.c drm/nouveau: Refactor nvXX_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 220 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 ++ drivers/gpu/drm/nouveau/nouveau_connector.h |...
2018 Sep 06
7
[PATCH v4 0/6] Backlight fixes and cleanup
...to his tree. Next version of https://patchwork.freedesktop.org/series/48596/ No changes otherwise. Lyude Paul (6): drm/nouveau: Check backlight IDs are >= 0, not > 0 drm/nouveau: Add NV_PRINTK_ONCE and variants drm/nouveau: Move backlight device into nouveau_connector drm/nouveau: s/nouveau_backlight_exit/nouveau_backlight_fini/ drm/nouveau: Cleanup indenting in nouveau_backlight.c drm/nouveau: Refactor nvXX_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 220 ++++++++++---------- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 ++ drivers/gpu/drm/nouveau/nouveau_connector.h |...
2018 Feb 17
3
[PATCH] drm/nouveau/bl: Fix oops on driver unbind
Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate over the bl_connectors list in nouveau_backlight_exit() but skipped initializing it in nouveau_backlight_init(). Stacktrace for posterity: BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: nouveau_backlight_exit+0x2b/0x70 [nouveau] nouveau_display_destroy+0x29/0x80 [nouveau] nouveau_drm_unload+0x65/0xe0 [n...
2016 Apr 15
11
[PATCH 1/2] nouveau/bl: Assign different names to interfaces
...au_get_backlight_name(); + bd = backlight_device_register(backlight_name, connector->kdev, nv_encoder, ops, &props); + + // backlight_device_register() makes a copy + kfree(backlight_name); + backlight_name = NULL; + if (IS_ERR(bd)) return PTR_ERR(bd); @@ -252,3 +270,16 @@ nouveau_backlight_exit(struct drm_device *dev) drm->backlight = NULL; } } + +static char* +nouveau_get_backlight_name(void) +{ + // 12 chars for "nv_backlight" + 2 for two digits number + 1 for '\0' + char* backlight_name = (char*)kmalloc(sizeof(char[15]), GFP_KERNEL); + const int nb = atomic_i...
2016 Nov 13
1
[PATCH v3 1/2] nouveau/bl: Assign different names to interfaces
...or; + INIT_LIST_HEAD(&drm->bl_connectors); + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && connector->connector_type != DRM_MODE_CONNECTOR_eDP) @@ -247,9 +286,27 @@ void nouveau_backlight_exit(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); + struct backlight_connector *connector; + + list_for_each_entry(connector, &drm->bl_connectors, head) { + if (connector->id >= 0) + ida_simple_remove(&bl_ida, connector->id); + } if (drm->backlig...
2018 Jul 05
4
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...the module: sysfs group 'power' not found for kobject 'nv_backlight' WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80 RIP: 0010:sysfs_remove_group+0x76/0x80 Call Trace: device_del+0x56/0x350 ? down_write+0xe/0x40 device_unregister+0x16/0x60 nouveau_backlight_exit+0x4a/0x60 [nouveau] nouveau_display_destroy+0x29/0x80 [nouveau] nouveau_drm_unload+0x61/0xd0 [nouveau] drm_dev_unregister+0x3f/0xe0 [drm] drm_put_dev+0x27/0x50 [drm] nouveau_drm_device_remove+0x47/0x70 [nouveau] pci_device_remove+0x3b/0xb0 device_release_driver_internal+0x180/0x250...
2016 Apr 17
0
[PATCH v2 1/2] nouveau/bl: Assign different names to interfaces
...or; + INIT_LIST_HEAD(&drm->bl_connectors); + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && connector->connector_type != DRM_MODE_CONNECTOR_eDP) @@ -246,9 +284,27 @@ void nouveau_backlight_exit(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); + struct backlight_connector *connector; + + list_for_each_entry(connector, &drm->bl_connectors, head) { + if (connector->id >= 0) + ida_simple_remove(&bl_ida, connector->id); + } if (drm->backlig...
2016 Dec 07
0
[PATCH v4 1/2] nouveau/bl: Assign different names to interfaces
...or; + INIT_LIST_HEAD(&drm->bl_connectors); + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && connector->connector_type != DRM_MODE_CONNECTOR_eDP) @@ -247,9 +295,27 @@ void nouveau_backlight_exit(struct drm_device *dev) { struct nouveau_drm *drm = nouveau_drm(dev); + struct backlight_connector *connector; + + list_for_each_entry(connector, &drm->bl_connectors, head) { + if (connector->id >= 0) + ida_simple_remove(&bl_ida, connector->id); + } if (drm->backlig...
2016 Nov 14
0
[PATCH v3 1/2] nouveau/bl: Assign different names to interfaces
...m->bl_connectors); > + > list_for_each_entry(connector, &dev->mode_config.connector_list, head) { > if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && > connector->connector_type != DRM_MODE_CONNECTOR_eDP) > @@ -247,9 +286,27 @@ void > nouveau_backlight_exit(struct drm_device *dev) > { > struct nouveau_drm *drm = nouveau_drm(dev); > + struct backlight_connector *connector; > + > + list_for_each_entry(connector, &drm->bl_connectors, head) { > + if (connector->id >= 0) > + ida_simple_remove(&bl_ida, connector-&...
2018 Feb 19
0
[PATCH] drm/nouveau/bl: Fix oops on driver unbind
...ume, but not unbinding. Shouldn’t that happen on shutdown as well, as the driver gets unloaded? I don’t remember seeing that issue there though. On 2018-02-17 — 13:40, Lukas Wunner wrote: > Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate > over the bl_connectors list in nouveau_backlight_exit() but skipped > initializing it in nouveau_backlight_init(). Stacktrace for posterity: > > BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 > IP: nouveau_backlight_exit+0x2b/0x70 [nouveau] > nouveau_display_destroy+0x29/0x80 [nouveau] > n...
2013 Sep 01
0
[PATCH] drm/nv50: Fix backlight not working when PWM_DIV is uninitialised
...s/gpu/drm/nouveau/nouveau_display.h @@ -75,6 +75,7 @@ void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *); #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT extern int nouveau_backlight_init(struct drm_device *); +extern int nouveau_backlight_config(struct nouveau_drm *); extern void nouveau_backlight_exit(struct drm_device *); #else static inline int @@ -83,6 +84,12 @@ nouveau_backlight_init(struct drm_device *dev) return 0; } +static inline int +nouveau_backlight_config(struct nouveau_drm *drm) +{ + return 0; +} + static inline void nouveau_backlight_exit(struct drm_device *dev) { } -- 1...
2009 Feb 18
1
[PATCH] Add in-kernel backlight control support
...ct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + + switch (dev_priv->card_type) { + case NV_40: + case NV_44: + return nouveau_nv40_backlight_init(dev); + break; + case NV_50: + return nouveau_nv50_backlight_init(dev); + break; + } + return 0; +} + +void nouveau_backlight_exit(struct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + + if (dev_priv->backlight) + backlight_device_unregister(dev_priv->backlight); +} diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index 158d6fd..1cd10bf 100644 --- a/shared-core/nou...
2018 Mar 14
1
[PATCH] drm/nouveau/bl: Fix oops on driver unbind
On Mon, Feb 19, 2018 at 10:38:04AM +0100, Pierre Moreau wrote: > On 2018-02-17 13:40, Lukas Wunner wrote: > > Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate > > over the bl_connectors list in nouveau_backlight_exit() but skipped > > initializing it in nouveau_backlight_init(). > > --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c > > +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c > > @@ -268,13 +268,13 @@ nouveau_backlight_init(struct drm_device *dev) > > struct nvif_device...
2018 Jul 17
2
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...'nv_backlight' >> WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80 >> RIP: 0010:sysfs_remove_group+0x76/0x80 >> Call Trace: >> device_del+0x56/0x350 >> ? down_write+0xe/0x40 >> device_unregister+0x16/0x60 >> nouveau_backlight_exit+0x4a/0x60 [nouveau] >> nouveau_display_destroy+0x29/0x80 [nouveau] >> nouveau_drm_unload+0x61/0xd0 [nouveau] >> drm_dev_unregister+0x3f/0xe0 [drm] >> drm_put_dev+0x27/0x50 [drm] >> nouveau_drm_device_remove+0x47/0x70 [nouveau] >> pci_device_remove+0x3...
2016 Nov 09
2
[PATCH] drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBE
...ster_acpi_notifier(&drm->acpi_nb); +#endif + return 0; vblank_err: @@ -552,6 +610,9 @@ nouveau_display_destroy(struct drm_device *dev) { struct nouveau_display *disp = nouveau_display(dev); +#ifdef CONFIG_ACPI + unregister_acpi_notifier(&nouveau_drm(dev)->acpi_nb); +#endif nouveau_backlight_exit(dev); nouveau_display_vblank_fini(dev); diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 822a021..71d4532 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -37,6 +37,8 @@ * - implemented limit...
2018 Jul 17
0
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
...r' not found for kobject 'nv_backlight' > WARNING: CPU: 2 PID: 1434 at fs/sysfs/group.c:235 sysfs_remove_group+0x76/0x80 > RIP: 0010:sysfs_remove_group+0x76/0x80 > Call Trace: > device_del+0x56/0x350 > ? down_write+0xe/0x40 > device_unregister+0x16/0x60 > nouveau_backlight_exit+0x4a/0x60 [nouveau] > nouveau_display_destroy+0x29/0x80 [nouveau] > nouveau_drm_unload+0x61/0xd0 [nouveau] > drm_dev_unregister+0x3f/0xe0 [drm] > drm_put_dev+0x27/0x50 [drm] > nouveau_drm_device_remove+0x47/0x70 [nouveau] > pci_device_remove+0x3b/0xb0 > device_rel...
2016 Apr 15
0
[PATCH 1/2] nouveau/bl: Assign different names to interfaces
...nv_encoder, ops, &props); > + > + // backlight_device_register() makes a copy > + kfree(backlight_name); > + backlight_name = NULL; > + > if (IS_ERR(bd)) > return PTR_ERR(bd); > > @@ -252,3 +270,16 @@ nouveau_backlight_exit(struct drm_device *dev) > drm->backlight = NULL; > } > } > + > +static char* > +nouveau_get_backlight_name(void) > +{ > + // 12 chars for "nv_backlight" + 2 for two digits number + 1 for '\0' > + char* backlight_na...