Skip to content

Commit b1d36e7

Browse files
committed
drm/i915: Don't register backlight when another backlight should be used (v2)
Before this commit when we want userspace to use the acpi_video backlight device we register both the GPU's native backlight device and acpi_video's firmware acpi_video# backlight device. This relies on userspace preferring firmware type backlight devices over native ones. Registering 2 backlight devices for a single display really is undesirable, don't register the GPU's native backlight device when another backlight device should be used. Changes in v2: - Use drm_info(drm_dev, ...) for log messages Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 2600bfa commit b1d36e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/i915/display/intel_backlight.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <linux/pwm.h>
99
#include <linux/string_helpers.h>
1010

11+
#include <acpi/video.h>
12+
1113
#include "intel_backlight.h"
1214
#include "intel_connector.h"
1315
#include "intel_de.h"
@@ -950,6 +952,11 @@ int intel_backlight_device_register(struct intel_connector *connector)
950952

951953
WARN_ON(panel->backlight.max == 0);
952954

955+
if (!acpi_video_backlight_use_native()) {
956+
drm_info(&i915->drm, "Skipping intel_backlight registration\n");
957+
return 0;
958+
}
959+
953960
memset(&props, 0, sizeof(props));
954961
props.type = BACKLIGHT_RAW;
955962

0 commit comments

Comments
 (0)