Skip to content

Commit

Permalink
drm/nouveau: don't expose backlight control when available through ACPI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Skeggs committed Nov 18, 2010
1 parent cac8f05 commit 5bead79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*/

#include <linux/backlight.h>
#include <linux/acpi.h>

#include "drmP.h"
#include "nouveau_drv.h"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5bead79

Please sign in to comment.