From: Pierre Moreau Date: Wed, 7 Dec 2016 23:57:09 +0000 (+0100) Subject: drm/nouveau/bl: Do not register interface if Apple GMUX detected X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b53ac1ee12a330dea59243e240aef398e951ff32;p=linux-beck.git 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 Reviewed-by: Lukas Wunner Signed-off-by: Ben Skeggs --- 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 #include #include @@ -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) {