From patchwork Wed Jul 24 21:23:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 2833053 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BB55C0319 for ; Wed, 24 Jul 2013 21:13:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6817C204D5 for ; Wed, 24 Jul 2013 21:13:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2C28F204D1 for ; Wed, 24 Jul 2013 21:13:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E145E674E for ; Wed, 24 Jul 2013 14:13:24 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from hydra.sisk.pl (hydra.sisk.pl [212.160.235.94]) by gabe.freedesktop.org (Postfix) with ESMTP id EA7F4E5C28 for ; Wed, 24 Jul 2013 14:13:13 -0700 (PDT) Received: from vostro.rjw.lan (afde219.neoplus.adsl.tpnet.pl [95.49.82.219]) by hydra.sisk.pl (Postfix) with ESMTPSA id B4AA6E3DB9; Wed, 24 Jul 2013 23:08:36 +0200 (CEST) From: "Rafael J. Wysocki" To: Linus Torvalds Date: Wed, 24 Jul 2013 23:23:16 +0200 Message-ID: <6051153.b6TE1dlrel@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0+; KDE/4.9.5; x86_64; ; ) In-Reply-To: References: <20130724210200.GY5939@phenom.ffwll.local> MIME-Version: 1.0 Cc: Aaron Lu , Matthew Garrett , * =?ISO-8859-1?Q?SAM=CD?= * , intel-gfx , LKML , ACPI Devel Maling List , Igor Gnatenko Subject: Re: [Intel-gfx] Linux 3.11-rc2 [backlight] [ASUS N56VZ] X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday, July 24, 2013 02:05:15 PM Linus Torvalds wrote: > On Wed, Jul 24, 2013 at 2:02 PM, Daniel Vetter wrote: > > > > I think a i915 module option should be doable, otoh people seem to have a > > viable workaround by setting a different acpi os version already. > > At least the original claim was that if you set a non-windows8 acpi os > version, you hit other bugs.. > > But yeah, if we just do a plain revert, that may be the only option > for the people for whom the current (to-be-reverted) patches made > things work. Well, I wonder what about the appended (untested) patch? It should restore the previous behavior while leaving an option to use the new stuff if need be. Rafael --- drivers/gpu/drm/i915/i915_dma.c | 2 +- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ drivers/gpu/drm/i915/i915_drv.h | 1 + include/acpi/video.h | 16 ++++++---------- 4 files changed, 13 insertions(+), 11 deletions(-) Index: linux-pm/drivers/gpu/drm/i915/i915_dma.c =================================================================== --- linux-pm.orig/drivers/gpu/drm/i915/i915_dma.c +++ linux-pm/drivers/gpu/drm/i915/i915_dma.c @@ -1648,7 +1648,7 @@ int i915_driver_load(struct drm_device * if (INTEL_INFO(dev)->num_pipes) { /* Must be done after probing outputs */ intel_opregion_init(dev); - acpi_video_register_with_quirks(); + __acpi_video_register(i915_take_over_backlight); } if (IS_GEN5(dev)) Index: linux-pm/drivers/gpu/drm/i915/i915_drv.c =================================================================== --- linux-pm.orig/drivers/gpu/drm/i915/i915_drv.c +++ linux-pm/drivers/gpu/drm/i915/i915_drv.c @@ -132,6 +132,11 @@ int i915_enable_ips __read_mostly = 1; module_param_named(enable_ips, i915_enable_ips, int, 0600); MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)"); +bool i915_take_over_backlight __read_mostly = false; +module_param_named(take_over_backlight, i915_take_over_backlight, bool, 0644); +MODULE_PARM_DESC(take_over_backlight, + "Prevent ACPI backlight from being used (default: false)"); + static struct drm_driver driver; extern int intel_agp_enabled; Index: linux-pm/drivers/gpu/drm/i915/i915_drv.h =================================================================== --- linux-pm.orig/drivers/gpu/drm/i915/i915_drv.h +++ linux-pm/drivers/gpu/drm/i915/i915_drv.h @@ -1542,6 +1542,7 @@ extern int i915_enable_ppgtt __read_most extern unsigned int i915_preliminary_hw_support __read_mostly; extern int i915_disable_power_well __read_mostly; extern int i915_enable_ips __read_mostly; +extern bool i915_take_over_backlight __read_mostly; extern int i915_suspend(struct drm_device *dev, pm_message_t state); extern int i915_resume(struct drm_device *dev); Index: linux-pm/include/acpi/video.h =================================================================== --- linux-pm.orig/include/acpi/video.h +++ linux-pm/include/acpi/video.h @@ -18,20 +18,11 @@ struct acpi_device; #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) extern int __acpi_video_register(bool backlight_quirks); -static inline int acpi_video_register(void) -{ - return __acpi_video_register(false); -} -static inline int acpi_video_register_with_quirks(void) -{ - return __acpi_video_register(true); -} extern void acpi_video_unregister(void); extern int acpi_video_get_edid(struct acpi_device *device, int type, int device_id, void **edid); #else -static inline int acpi_video_register(void) { return 0; } -static inline int acpi_video_register_with_quirks(void) { return 0; } +static inline int __acpi_video_register(bool backlight_quirks) { return 0; } static inline void acpi_video_unregister(void) { return; } static inline int acpi_video_get_edid(struct acpi_device *device, int type, int device_id, void **edid) @@ -40,4 +31,9 @@ static inline int acpi_video_get_edid(st } #endif +static inline int acpi_video_register(void) +{ + return __acpi_video_register(false); +} + #endif