diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-04 09:56:12 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-11-18 14:39:02 +1000 |
commit | 5bead799d3f8f1500c4b59301b8a2732a92f559f (patch) | |
tree | 5bada5e9fdd8be94252f777d2b0dad047e424285 /drivers | |
parent | cac8f05b4294d18cfa940511c286ca03aa6590ad (diff) |
drm/nouveau: don't expose backlight control when available through ACPI
Avoid confusing userspace by not publishing backlight controls if ACPI
equivalents are available.
Reported-by: Aaron Sowry <aaron@aeneby.se>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_backlight.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c index 406228f4a2a..b14c8111057 100644 --- a/drivers/gpu/drm/nouveau/nouveau_backlight.c +++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c @@ -31,6 +31,7 @@ */ #include <linux/backlight.h> +#include <linux/acpi.h> #include "drmP.h" #include "nouveau_drv.h" @@ -136,6 +137,14 @@ int nouveau_backlight_init(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; +#ifdef CONFIG_ACPI + if (acpi_video_backlight_support()) { + NV_INFO(dev, "ACPI backlight interface available, " + "not registering our own\n"); + return 0; + } +#endif + switch (dev_priv->card_type) { case NV_40: return nouveau_nv40_backlight_init(dev); |