From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Aaron Lu <aaron.lu@intel.com>, Jingoo Han <jg1.han@samsung.com>,
Bryan Wu <cooloney@gmail.com>, Lee Jones <lee.jones@linaro.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>
Cc: Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH resend 1/4] nouveau: Don't check acpi_video_backlight_support() before registering backlight
Date: Wed, 21 May 2014 13:39:53 +0000 [thread overview]
Message-ID: <1400679596-19663-2-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1400679596-19663-1-git-send-email-hdegoede@redhat.com>
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 5bead799
Also see: https://bugzilla.redhat.com/show_bug.cgi?id\x1093171
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_backlight.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 630f6e8..2c1e4aa 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -31,7 +31,6 @@
*/
#include <linux/backlight.h>
-#include <linux/acpi.h>
#include "nouveau_drm.h"
#include "nouveau_reg.h"
@@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev)
struct nouveau_device *device = nv_device(drm->device);
struct drm_connector *connector;
-#ifdef CONFIG_ACPI
- if (acpi_video_backlight_support()) {
- NV_INFO(drm, "ACPI backlight interface available, "
- "not registering our own\n");
- return 0;
- }
-#endif
-
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
connector->connector_type != DRM_MODE_CONNECTOR_eDP)
--
1.9.0
next prev parent reply other threads:[~2014-05-21 13:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 13:39 [PATCH resend 0/4] Make video.use_native_backlight=1 work properly with nouveau Hans de Goede
2014-05-21 13:39 ` Hans de Goede [this message]
2014-05-21 23:30 ` [PATCH resend 1/4] nouveau: Don't check acpi_video_backlight_support() before registering backli Rafael J. Wysocki
2014-05-22 8:41 ` Hans de Goede
2014-05-23 4:13 ` Ben Skeggs
2014-05-21 13:39 ` [PATCH resend 2/4] backlight: Add backlight device (un)registration notification Hans de Goede
2014-05-21 23:31 ` Rafael J. Wysocki
2014-05-22 8:44 ` Hans de Goede
2014-05-22 9:02 ` Lee Jones
2014-05-26 3:03 ` Jingoo Han
2014-05-26 10:46 ` Rafael J. Wysocki
2014-05-26 11:21 ` Hans de Goede
2014-05-27 9:20 ` Lee Jones
2014-05-31 22:46 ` Rafael J. Wysocki
2014-06-02 7:33 ` Lee Jones
2014-05-21 13:39 ` [PATCH resend 3/4] acpi-video: Unregister the backlight device if a raw one shows up later Hans de Goede
2014-05-21 13:39 ` [PATCH resend 4/4] acpi-video: Add use native backlight quirk for the ThinkPad W530 Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400679596-19663-2-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=aaron.lu@intel.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=cooloney@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).