aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-05-21 09:39:53 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-26 19:29:00 -0400
commitbee564430feec1175ee64bcfd4913cacc519f817 (patch)
tree6201c5d4bf7f1cb0744addc07cf64443cd0fd8c9
parent2d8fe6757e1d857d8b266b25c553923695409e01 (diff)
nouveau: Don't check acpi_video_backlight_support() before registering backlight
acpi_video_backlight_support() is supposed to be called by other (vendor specific) firmware backlight controls, not by native / raw backlight controls like nv_backlight. Userspace will normally prefer firmware interfaces over raw interfaces, so if acpi_video backlight support is present it will use that even if nv_backlight is registered as well. Except when video.use_native_backlight is present on the kernel cmdline (or enabled through a dmi based quirk). As the name indicates the goal here is to make only the raw interface available to userspace so that it will use that (it only does this when it sees a win8 compliant bios). This is done by: 1) Not registering any acpi_video# backlight devices; and 2) Making acpi_video_backlight_support() return true so that other firmware drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their own vender specific interfaces. Currently nouveau breaks this setup, as when acpi_video_backlight_support() returns true, it does not register itself, resulting in no backlight control at all. This is esp. going to be a problem with 3.16 which will default to video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios will get no backlight control at all. This also likely explains why the previous attempt to make video.use_native_backlight=1 the default was not a success, as without this patch having a default of video.use_native_backlight=1 will cause regressions. Note this effectively reverts commit 5bead799d3f8 (drm/nouveau: don't expose backlight control when available through ACPI). References: https://bugzilla.redhat.com/show_bug.cgi?id=1093171 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_backlight.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 630f6e84fc01..2c1e4aad7da3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -31,7 +31,6 @@
31 */ 31 */
32 32
33#include <linux/backlight.h> 33#include <linux/backlight.h>
34#include <linux/acpi.h>
35 34
36#include "nouveau_drm.h" 35#include "nouveau_drm.h"
37#include "nouveau_reg.h" 36#include "nouveau_reg.h"
@@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev)
222 struct nouveau_device *device = nv_device(drm->device); 221 struct nouveau_device *device = nv_device(drm->device);
223 struct drm_connector *connector; 222 struct drm_connector *connector;
224 223
225#ifdef CONFIG_ACPI
226 if (acpi_video_backlight_support()) {
227 NV_INFO(drm, "ACPI backlight interface available, "
228 "not registering our own\n");
229 return 0;
230 }
231#endif
232
233 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 224 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
234 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && 225 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
235 connector->connector_type != DRM_MODE_CONNECTOR_eDP) 226 connector->connector_type != DRM_MODE_CONNECTOR_eDP)