* [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled
@ 2015-03-01 10:41 Chris Wilson
2015-03-01 10:41 ` [PATCH 2/2] acpi/video: Propagate the error code for acpi_video_register Chris Wilson
2015-03-04 1:55 ` [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Aaron Lu
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2015-03-01 10:41 UTC (permalink / raw)
To: intel-gfx
Cc: Chris Wilson, Daniel Vetter, Jani Nikula, Zhang Rui,
Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel, stable
i915.ko depends upon the acpi/video.ko module and so refuses to load if
ACPI is disabled at runtime if for example the BIOS is broken beyond
repair. acpi/video provides an optional service for i915.ko and so we
should just allow the modules to load, but do no nothing in order to let
the machines boot correctly.
Reported-by: Bill Augur <bill-auger@programmer.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
---
drivers/acpi/video.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index debd30917010..3b76aef79a1c 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -2176,6 +2176,16 @@ EXPORT_SYMBOL(acpi_video_unregister_backlight);
static int __init acpi_video_init(void)
{
+ /* Let the module load even if ACPI is disabled (e.g. due to
+ * a broken BIOS) so that i915.ko can still be loaded on such
+ * old systems without an AcpiOpRegion.
+ *
+ * acpi_video_register() will report -ENODEV later as well due
+ * to acpi_disabled when i915.ko tries to register itself afterwards.
+ */
+ if (acpi_disabled)
+ return 0;
+
dmi_check_system(video_dmi_table);
if (intel_opregion_present())
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] acpi/video: Propagate the error code for acpi_video_register
2015-03-01 10:41 [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Chris Wilson
@ 2015-03-01 10:41 ` Chris Wilson
2015-03-04 1:55 ` [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Aaron Lu
1 sibling, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2015-03-01 10:41 UTC (permalink / raw)
To: intel-gfx
Cc: Chris Wilson, Daniel Vetter, Zhang Rui, Rafael J. Wysocki,
Len Brown, linux-acpi, linux-kernel
Report the actual error code from acpi_bus_register_driver(), it may
help future debugging (typically ENODEV as previously reported, but the
unusual cases are where it may help most).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/acpi/video.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 3b76aef79a1c..c9d5d060b970 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -2110,7 +2110,8 @@ static int __init intel_opregion_present(void)
int acpi_video_register(void)
{
- int result = 0;
+ int ret;
+
if (register_count) {
/*
* if the function of acpi_video_register is already called,
@@ -2122,9 +2123,9 @@ int acpi_video_register(void)
mutex_init(&video_list_lock);
INIT_LIST_HEAD(&video_bus_head);
- result = acpi_bus_register_driver(&acpi_video_bus);
- if (result < 0)
- return -ENODEV;
+ ret = acpi_bus_register_driver(&acpi_video_bus);
+ if (ret)
+ return ret;
/*
* When the acpi_video_bus is loaded successfully, increase
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled
2015-03-01 10:41 [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Chris Wilson
2015-03-01 10:41 ` [PATCH 2/2] acpi/video: Propagate the error code for acpi_video_register Chris Wilson
@ 2015-03-04 1:55 ` Aaron Lu
2015-03-04 14:39 ` Rafael J. Wysocki
1 sibling, 1 reply; 4+ messages in thread
From: Aaron Lu @ 2015-03-04 1:55 UTC (permalink / raw)
To: Chris Wilson
Cc: intel-gfx, Daniel Vetter, Jani Nikula, Zhang Rui,
Rafael J. Wysocki, Len Brown, linux-acpi, linux-kernel, stable
On Sun, Mar 01, 2015 at 10:41:37AM +0000, Chris Wilson wrote:
> i915.ko depends upon the acpi/video.ko module and so refuses to load if
> ACPI is disabled at runtime if for example the BIOS is broken beyond
> repair. acpi/video provides an optional service for i915.ko and so we
> should just allow the modules to load, but do no nothing in order to let
> the machines boot correctly.
>
> Reported-by: Bill Augur <bill-auger@programmer.net>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: linux-acpi@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: stable@vger.kernel.org
For both patches:
Acked-by: Aaron Lu <aaron.lu@intel.com>
Thanks,
Aaron
> ---
> drivers/acpi/video.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index debd30917010..3b76aef79a1c 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -2176,6 +2176,16 @@ EXPORT_SYMBOL(acpi_video_unregister_backlight);
>
> static int __init acpi_video_init(void)
> {
> + /* Let the module load even if ACPI is disabled (e.g. due to
> + * a broken BIOS) so that i915.ko can still be loaded on such
> + * old systems without an AcpiOpRegion.
> + *
> + * acpi_video_register() will report -ENODEV later as well due
> + * to acpi_disabled when i915.ko tries to register itself afterwards.
> + */
> + if (acpi_disabled)
> + return 0;
> +
> dmi_check_system(video_dmi_table);
>
> if (intel_opregion_present())
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled
2015-03-04 1:55 ` [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Aaron Lu
@ 2015-03-04 14:39 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2015-03-04 14:39 UTC (permalink / raw)
To: Aaron Lu
Cc: Chris Wilson, intel-gfx, Daniel Vetter, Jani Nikula, Zhang Rui,
Len Brown, linux-acpi, linux-kernel, stable
On Wednesday, March 04, 2015 09:55:55 AM Aaron Lu wrote:
> On Sun, Mar 01, 2015 at 10:41:37AM +0000, Chris Wilson wrote:
> > i915.ko depends upon the acpi/video.ko module and so refuses to load if
> > ACPI is disabled at runtime if for example the BIOS is broken beyond
> > repair. acpi/video provides an optional service for i915.ko and so we
> > should just allow the modules to load, but do no nothing in order to let
> > the machines boot correctly.
> >
> > Reported-by: Bill Augur <bill-auger@programmer.net>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Len Brown <lenb@kernel.org>
> > Cc: linux-acpi@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: stable@vger.kernel.org
>
> For both patches:
> Acked-by: Aaron Lu <aaron.lu@intel.com>
Both applied, thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-04 14:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-01 10:41 [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Chris Wilson
2015-03-01 10:41 ` [PATCH 2/2] acpi/video: Propagate the error code for acpi_video_register Chris Wilson
2015-03-04 1:55 ` [PATCH 1/2] acpi/video: Load the module even if ACPI is disabled Aaron Lu
2015-03-04 14:39 ` Rafael J. Wysocki
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).