Skip to content

Commit

Permalink
drm/nouveau/bl: Do not register interface if Apple GMUX detected
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Moreau authored and Ben Skeggs committed Dec 13, 2016
1 parent db1a0ae commit b53ac1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b53ac1e

Please sign in to comment.