summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Moreau <pierre.morrow@free.fr>2016-12-08 00:57:09 +0100
committerBen Skeggs <bskeggs@redhat.com>2016-12-13 11:40:17 +1000
commitb53ac1ee12a330dea59243e240aef398e951ff32 (patch)
tree9313c3a507324a81850eb9721be41c6579f8d597
parentdb1a0ae21461afa4bc435651a6dd55e0e6ef4a8b (diff)
downloadlinux-stable-b53ac1ee12a330dea59243e240aef398e951ff32.tar.gz
linux-stable-b53ac1ee12a330dea59243e240aef398e951ff32.tar.bz2
linux-stable-b53ac1ee12a330dea59243e240aef398e951ff32.zip
drm/nouveau/bl: Do not register interface if Apple GMUX detected
The Apple GMUX is the one managing the backlight, so there is no need for Nouveau to register its own backlight interface. v2: Do not split information message on two lines as it prevents from grepping it, as pointed out by Lukas Wunner v3: Add a missing end-of-line character to the printed message Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_backlight.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index a34cd35d4965..8b1ca4add2ed 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -30,6 +30,7 @@
* Register locations derived from NVClock by Roderick Colenbrander
*/
+#include <linux/apple-gmux.h>
#include <linux/backlight.h>
#include <linux/idr.h>
@@ -267,6 +268,11 @@ nouveau_backlight_init(struct drm_device *dev)
struct nvif_device *device = &drm->device;
struct drm_connector *connector;
+ if (apple_gmux_present()) {
+ NV_INFO(drm, "Apple GMUX detected: not registering Nouveau backlight interface\n");
+ return 0;
+ }
+
INIT_LIST_HEAD(&drm->bl_connectors);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {