nouveau: Don't expose backlight control in presence of ACPI
Subsystems (3)
PATCH 1/1 nouveau: Don't expose backlight control in presence of ACPI
From: Aaron Sowry <[email protected]>
Avoid confusing userspace by not publishing backlight controls if ACPI equivalents are available.
Signed-off-by Aaron Sowry <[email protected]>
---
drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-03 10:46:27.765829000 +0100 renamed from drivers/gpu/drm/nouveau/nouveau_state.c.orig 2010-11-03 09:56:29.502828966 +0100 +9 -3
@@ -23,6 +23,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include <linux/acpi.h> #include <linux/swab.h> #include <linux/slab.h> #include "drmP.h"
@@ -648,9 +649,14 @@ nouveau_card_init(struct drm_device *dev goto out_fence; } - ret = nouveau_backlight_init(dev); - if (ret) - NV_ERROR(dev, "Error %d registering backlight\n", ret); + if (acpi_video_backlight_support()) + NV_INFO(dev, "Detected ACPI backlight support, " + "not registering interface\n"); + else { + ret = nouveau_backlight_init(dev); + if (ret) + NV_ERROR(dev, "Error %d registering backlight\n", ret); + } nouveau_fbcon_init(dev); drm_kms_helper_poll_init(dev);
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 4 lines · Aaron Sowry
From: Aaron Sowry <[email protected]>
Avoid confusing userspace by not publishing backlight controls if ACPI equivalents are available.
Signed-off-by Aaron Sowry <[email protected]>
Thanks,
I've pushed an equivalent change into nouveau git.
Ben.
Quoted 33 lines
---
drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-03 10:46:27.765829000 +0100 renamed from drivers/gpu/drm/nouveau/nouveau_state.c.orig 2010-11-03 09:56:29.502828966 +0100 +9
-3@@ -23,6 +23,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include <linux/acpi.h> #include <linux/swab.h> #include <linux/slab.h> #include "drmP.h"@@ -648,9 +649,14 @@ nouveau_card_init(struct drm_device *dev goto out_fence; } - ret = nouveau_backlight_init(dev); - if (ret) - NV_ERROR(dev, "Error %d registering backlight\n", ret); + if (acpi_video_backlight_support()) + NV_INFO(dev, "Detected ACPI backlight support, " + "not registering interface\n"); + else { + ret = nouveau_backlight_init(dev); + if (ret) + NV_ERROR(dev, "Error %d registering backlight\n", ret); + } nouveau_fbcon_init(dev); drm_kms_helper_poll_init(dev);_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau