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>
This commit is contained in:
parent
cac8f05b42
commit
5bead799d3
1 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/backlight.h>
|
#include <linux/backlight.h>
|
||||||
|
#include <linux/acpi.h>
|
||||||
|
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
#include "nouveau_drv.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;
|
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) {
|
switch (dev_priv->card_type) {
|
||||||
case NV_40:
|
case NV_40:
|
||||||
return nouveau_nv40_backlight_init(dev);
|
return nouveau_nv40_backlight_init(dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue