All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi: allow non-optimus setups to load vbios from acpi
@ 2014-03-26 23:37 Ilia Mirkin
  2014-03-27  0:03 ` Ben Skeggs
  2014-03-27 10:54 ` Patrick Clara
  0 siblings, 2 replies; 6+ messages in thread
From: Ilia Mirkin @ 2014-03-26 23:37 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Ben Skeggs
  Cc: patrick.clara-Re5JQEeQqe8AvxtiuMwx3w,
	cllorenz-KiJTPfjSHVUubQSw3dWLiw

There appear to be a crop of new hardware where the vbios is not
available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
The data read from PCIROM almost invariably contains invalid
instructions (still has the x86 opcodes), which makes this a low-risk
way to try to obtain a valid vbios image.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v2.6.35+
---

Not sure if the stable CC is warranted... it's technically not a
regression. But it's a simple change that enables hardware to work.

Patrick/Claas -- please test this out (if you're applying this to a linux
tree, you'll have to do it manually, but it should be fairly obvious where
this should apply).

 drm/nouveau_acpi.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
index 83face3..2792069 100644
--- a/drm/nouveau_acpi.c
+++ b/drm/nouveau_acpi.c
@@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
 	acpi_status status;
 	acpi_handle dhandle, rom_handle;
 
-	if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
-		return false;
-
 	dhandle = ACPI_HANDLE(&pdev->dev);
 	if (!dhandle)
 		return false;
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi: allow non-optimus setups to load vbios from acpi
  2014-03-26 23:37 [PATCH] acpi: allow non-optimus setups to load vbios from acpi Ilia Mirkin
@ 2014-03-27  0:03 ` Ben Skeggs
  2014-03-27 10:54 ` Patrick Clara
  1 sibling, 0 replies; 6+ messages in thread
From: Ben Skeggs @ 2014-03-27  0:03 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: cllorenz, nouveau@lists.freedesktop.org, Ben Skeggs,
	dri-devel@lists.freedesktop.org, patrick.clara

On Thu, Mar 27, 2014 at 9:37 AM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> There appear to be a crop of new hardware where the vbios is not
> available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
> The data read from PCIROM almost invariably contains invalid
> instructions (still has the x86 opcodes), which makes this a low-risk
> way to try to obtain a valid vbios image.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Cc: <stable@vger.kernel.org> # v2.6.35+
Got it, thanks!

> ---
>
> Not sure if the stable CC is warranted... it's technically not a
> regression. But it's a simple change that enables hardware to work.
>
> Patrick/Claas -- please test this out (if you're applying this to a linux
> tree, you'll have to do it manually, but it should be fairly obvious where
> this should apply).
>
>  drm/nouveau_acpi.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
> index 83face3..2792069 100644
> --- a/drm/nouveau_acpi.c
> +++ b/drm/nouveau_acpi.c
> @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
>         acpi_status status;
>         acpi_handle dhandle, rom_handle;
>
> -       if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
> -               return false;
> -
>         dhandle = ACPI_HANDLE(&pdev->dev);
>         if (!dhandle)
>                 return false;
> --
> 1.8.3.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi: allow non-optimus setups to load vbios from acpi
  2014-03-26 23:37 [PATCH] acpi: allow non-optimus setups to load vbios from acpi Ilia Mirkin
  2014-03-27  0:03 ` Ben Skeggs
@ 2014-03-27 10:54 ` Patrick Clara
       [not found]   ` <CAA_k4TPf4kVMCiTnUEM6KmROwt3e7MTDq2p3eLwDUjswKx0kLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Patrick Clara @ 2014-03-27 10:54 UTC (permalink / raw)
  To: Ilia Mirkin; +Cc: cllorenz, nouveau, Ben Skeggs, dri-devel

I have tested this patch. I can confirm that now nouveau loads
correctly without errors.
Thank you

2014-03-27 0:37 GMT+01:00 Ilia Mirkin <imirkin@alum.mit.edu>:
> There appear to be a crop of new hardware where the vbios is not
> available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
> The data read from PCIROM almost invariably contains invalid
> instructions (still has the x86 opcodes), which makes this a low-risk
> way to try to obtain a valid vbios image.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Cc: <stable@vger.kernel.org> # v2.6.35+
> ---
>
> Not sure if the stable CC is warranted... it's technically not a
> regression. But it's a simple change that enables hardware to work.
>
> Patrick/Claas -- please test this out (if you're applying this to a linux
> tree, you'll have to do it manually, but it should be fairly obvious where
> this should apply).
>
>  drm/nouveau_acpi.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
> index 83face3..2792069 100644
> --- a/drm/nouveau_acpi.c
> +++ b/drm/nouveau_acpi.c
> @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
>         acpi_status status;
>         acpi_handle dhandle, rom_handle;
>
> -       if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
> -               return false;
> -
>         dhandle = ACPI_HANDLE(&pdev->dev);
>         if (!dhandle)
>                 return false;
> --
> 1.8.3.2
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi: allow non-optimus setups to load vbios from acpi
       [not found]   ` <CAA_k4TPf4kVMCiTnUEM6KmROwt3e7MTDq2p3eLwDUjswKx0kLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-05 11:53     ` Claas Lorenz
       [not found]       ` <533FEEB8.2080605-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Claas Lorenz @ 2014-04-05 11:53 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: Patrick Clara, Ben Skeggs,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hi, same for me. The screen does not freeze anymore and the boot
succeeds. But now I have this kernel message during boot (for the second
card):

[   24.382045] pci_pm_runtime_suspend():
nouveau_pmops_runtime_suspend+0x0/0xe0 [nouveau] returns -22

Do you want to have the complete dmesg log? I think this is a new bug.
Your patch works for the previous one, so you can close it.

Yours,
Claas


On 27.03.2014 11:54, Patrick Clara wrote:
> I have tested this patch. I can confirm that now nouveau loads
> correctly without errors.
> Thank you
>
> 2014-03-27 0:37 GMT+01:00 Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>:
>> There appear to be a crop of new hardware where the vbios is not
>> available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
>> The data read from PCIROM almost invariably contains invalid
>> instructions (still has the x86 opcodes), which makes this a low-risk
>> way to try to obtain a valid vbios image.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
>> Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
>> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v2.6.35+
>> ---
>>
>> Not sure if the stable CC is warranted... it's technically not a
>> regression. But it's a simple change that enables hardware to work.
>>
>> Patrick/Claas -- please test this out (if you're applying this to a linux
>> tree, you'll have to do it manually, but it should be fairly obvious where
>> this should apply).
>>
>>  drm/nouveau_acpi.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
>> index 83face3..2792069 100644
>> --- a/drm/nouveau_acpi.c
>> +++ b/drm/nouveau_acpi.c
>> @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
>>         acpi_status status;
>>         acpi_handle dhandle, rom_handle;
>>
>> -       if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
>> -               return false;
>> -
>>         dhandle = ACPI_HANDLE(&pdev->dev);
>>         if (!dhandle)
>>                 return false;
>> --
>> 1.8.3.2
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi: allow non-optimus setups to load vbios from acpi
       [not found]       ` <533FEEB8.2080605-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org>
@ 2014-04-05 16:18         ` Ilia Mirkin
       [not found]           ` <CAKb7UvgmBOjfRdoX2A_eBb9YO7OZROHiRUOaMUEbPppc_1UQ-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ilia Mirkin @ 2014-04-05 16:18 UTC (permalink / raw)
  To: Claas Lorenz
  Cc: Patrick Clara, Ben Skeggs,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

On Sat, Apr 5, 2014 at 7:53 AM, Claas Lorenz <cllorenz-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org> wrote:
> Hi, same for me. The screen does not freeze anymore and the boot

Great! And that's without the nouveau.config=NvBios= stuff that you
added as a workaround, right?

> succeeds. But now I have this kernel message during boot (for the second
> card):
>
> [   24.382045] pci_pm_runtime_suspend():
> nouveau_pmops_runtime_suspend+0x0/0xe0 [nouveau] returns -22
>
> Do you want to have the complete dmesg log? I think this is a new bug.

New to you, perhaps :) Try
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=adbbdbac04f093c0abf946b1e93e4e5291808491.
Or you can try forcing runpm=1 and seeing what happens. Ideally it'll
be able to suspend your second GPU, but... who knows. That logic is
really designed around optimus.

> Your patch works for the previous one, so you can close it.
>
> Yours,
> Claas
>
>
> On 27.03.2014 11:54, Patrick Clara wrote:
>> I have tested this patch. I can confirm that now nouveau loads
>> correctly without errors.
>> Thank you
>>
>> 2014-03-27 0:37 GMT+01:00 Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>:
>>> There appear to be a crop of new hardware where the vbios is not
>>> available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
>>> The data read from PCIROM almost invariably contains invalid
>>> instructions (still has the x86 opcodes), which makes this a low-risk
>>> way to try to obtain a valid vbios image.
>>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
>>> Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
>>> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v2.6.35+
>>> ---
>>>
>>> Not sure if the stable CC is warranted... it's technically not a
>>> regression. But it's a simple change that enables hardware to work.
>>>
>>> Patrick/Claas -- please test this out (if you're applying this to a linux
>>> tree, you'll have to do it manually, but it should be fairly obvious where
>>> this should apply).
>>>
>>>  drm/nouveau_acpi.c | 3 ---
>>>  1 file changed, 3 deletions(-)
>>>
>>> diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
>>> index 83face3..2792069 100644
>>> --- a/drm/nouveau_acpi.c
>>> +++ b/drm/nouveau_acpi.c
>>> @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
>>>         acpi_status status;
>>>         acpi_handle dhandle, rom_handle;
>>>
>>> -       if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
>>> -               return false;
>>> -
>>>         dhandle = ACPI_HANDLE(&pdev->dev);
>>>         if (!dhandle)
>>>                 return false;
>>> --
>>> 1.8.3.2
>>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] acpi: allow non-optimus setups to load vbios from acpi
       [not found]           ` <CAKb7UvgmBOjfRdoX2A_eBb9YO7OZROHiRUOaMUEbPppc_1UQ-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-06  8:12             ` Claas Lorenz
  0 siblings, 0 replies; 6+ messages in thread
From: Claas Lorenz @ 2014-04-06  8:12 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: Patrick Clara, Ben Skeggs,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org

Yes, it works without the workaround... and thanks for the suspend patch
which works fine as well :-)

On 05.04.2014 18:18, Ilia Mirkin wrote:
> On Sat, Apr 5, 2014 at 7:53 AM, Claas Lorenz <cllorenz-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org> wrote:
>> Hi, same for me. The screen does not freeze anymore and the boot
> Great! And that's without the nouveau.config=NvBios= stuff that you
> added as a workaround, right?
>
>> succeeds. But now I have this kernel message during boot (for the second
>> card):
>>
>> [   24.382045] pci_pm_runtime_suspend():
>> nouveau_pmops_runtime_suspend+0x0/0xe0 [nouveau] returns -22
>>
>> Do you want to have the complete dmesg log? I think this is a new bug.
> New to you, perhaps :) Try
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=adbbdbac04f093c0abf946b1e93e4e5291808491.
> Or you can try forcing runpm=1 and seeing what happens. Ideally it'll
> be able to suspend your second GPU, but... who knows. That logic is
> really designed around optimus.
>
>> Your patch works for the previous one, so you can close it.
>>
>> Yours,
>> Claas
>>
>>
>> On 27.03.2014 11:54, Patrick Clara wrote:
>>> I have tested this patch. I can confirm that now nouveau loads
>>> correctly without errors.
>>> Thank you
>>>
>>> 2014-03-27 0:37 GMT+01:00 Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>:
>>>> There appear to be a crop of new hardware where the vbios is not
>>>> available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
>>>> The data read from PCIROM almost invariably contains invalid
>>>> instructions (still has the x86 opcodes), which makes this a low-risk
>>>> way to try to obtain a valid vbios image.
>>>>
>>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
>>>> Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
>>>> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v2.6.35+
>>>> ---
>>>>
>>>> Not sure if the stable CC is warranted... it's technically not a
>>>> regression. But it's a simple change that enables hardware to work.
>>>>
>>>> Patrick/Claas -- please test this out (if you're applying this to a linux
>>>> tree, you'll have to do it manually, but it should be fairly obvious where
>>>> this should apply).
>>>>
>>>>  drm/nouveau_acpi.c | 3 ---
>>>>  1 file changed, 3 deletions(-)
>>>>
>>>> diff --git a/drm/nouveau_acpi.c b/drm/nouveau_acpi.c
>>>> index 83face3..2792069 100644
>>>> --- a/drm/nouveau_acpi.c
>>>> +++ b/drm/nouveau_acpi.c
>>>> @@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
>>>>         acpi_status status;
>>>>         acpi_handle dhandle, rom_handle;
>>>>
>>>> -       if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
>>>> -               return false;
>>>> -
>>>>         dhandle = ACPI_HANDLE(&pdev->dev);
>>>>         if (!dhandle)
>>>>                 return false;
>>>> --
>>>> 1.8.3.2
>>>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-06  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26 23:37 [PATCH] acpi: allow non-optimus setups to load vbios from acpi Ilia Mirkin
2014-03-27  0:03 ` Ben Skeggs
2014-03-27 10:54 ` Patrick Clara
     [not found]   ` <CAA_k4TPf4kVMCiTnUEM6KmROwt3e7MTDq2p3eLwDUjswKx0kLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-05 11:53     ` Claas Lorenz
     [not found]       ` <533FEEB8.2080605-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org>
2014-04-05 16:18         ` Ilia Mirkin
     [not found]           ` <CAKb7UvgmBOjfRdoX2A_eBb9YO7OZROHiRUOaMUEbPppc_1UQ-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-06  8:12             ` Claas Lorenz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.