RE: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Deucher, Alexander
> -Original Message-
> From: Lukas Wunner [mailto:lu...@wunner.de]
> Sent: Monday, May 22, 2017 11:51 PM
> To: Michel Dänzer
> Cc: Nicolai Stange; Sean Paul; Deucher, Alexander; dri-
> de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org; Koenig,
> Christian
> Subject: Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress
> laptops
> 
> On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
> > On 22/05/17 11:04 PM, Lukas Wunner wrote:
> > > On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> > >> On Thu, May 18 2017, Lukas Wunner wrote:
> > > [snip]
> > >>> Reported-by: Nicolai Stange <nicsta...@gmail.com>
> > >>> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU
> with vga_switcheroo")
> > >>> Signed-off-by: Lukas Wunner <lu...@wunner.de>
> > >>> ---
> > >>>
> > >>> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> > >>> needs to be fixed, so sending out with a proper commit message now.
> > >>> The bug was only introduced to radeon, not amdgpu.
> > >>
> > >> Tested-by: Nicolai Stange <nicsta...@gmail.com>
> > >>
> > >> Thanks for the quick fix!
> > >>
> > >>> @Alex Deucher: I could push this to drm-misc-fixes but then it
> wouldn't
> > >>> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> > >>> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> > >>> take it yourself?  Whichever you prefer.  Thanks & sorry for the
> breakage!
> > >
> > > I've learned this morning that Alex is on vacation.
> >
> > Christian König is standing in for Alex.
> 
> By his own account, he already has "all hands full replacing him [Alex]",
> explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
> this reason and lacks permission to update branches in Alex' repo on fdo:
> 
> "One lesson learned from the past week is that Alex needs to stop using
> his personal repository on fdo.
> We were asked a couple of times if I couldn't update a branch there from
> different directions, which we obviously can't do."
> 
> https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
> https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html
> 

What tree we use for pull requests is irrelevant.  We need to follow the proper 
protocol.  In the future patches like this should have an ack or rb and should 
flow through the radeon tree.

> 
> > > I've pushed the patch to drm-misc-fixes so that the issue is fixed in
> > > 4.12-rc3.
> >
> > I don't think there was any particular need to bypass the normal radeon
> > tree for this. There was plenty of time for the fix to get into 4.12
> > final, even after Alex is back.
> 
> Well, it wouldn't be nice towards users affected by the same issue
> who may waste time with bisecting to just sit on a fix twiddling thumbs.

We also need to try and avoid regressions and try and flow changes through 
proper trees.  There is always going to be some delay in getting changes 
upstream.

Alex

> 
> Thanks,
> 
> Lukas
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Daniel Vetter
On Tue, May 23, 2017 at 12:00:16PM +0200, Lukas Wunner wrote:
> On Mon, May 22, 2017 at 09:24:34PM +0200, Daniel Vetter wrote:
> > On Thu, May 18, 2017 at 09:33:44PM +0200, Lukas Wunner wrote:
> > > Nicolai Stange reports the following oops which is caused by
> > > dereferencing rdev->pdev before it's subsequently set by
> > > radeon_device_init().  Fix it.
> > > 
> > >   BUG: unable to handle kernel NULL pointer dereference at 
> > > 07cb
> > >   IP: radeon_driver_load_kms+0xeb/0x230 [radeon]
> > >   PGD 0
> > >   P4D 0
> > > 
> > >   Oops:  [#1] SMP
> > >   Modules linked in: amdkfd amd_iommu_v2 i915(+) radeon(+) i2c_algo_bit 
> > > drm_kms_helper ttm e1000e drm sdhci_pci sdhci_acpi ptp sdhci crc32c_intel 
> > > serio_raw mmc_core pps_core video i2c_hid hid_plantronics
> > >   CPU: 4 PID: 389 Comm: systemd-udevd Not tainted 
> > > 4.12.0-rc1-next-20170515+ #1
> > >   Hardware name: Dell Inc. Latitude E6540/0725FP, BIOS A10 06/26/2014
> > >   task: 97d62c8f task.stack: b96f01478000
> > >   RIP: 0010:radeon_driver_load_kms+0xeb/0x230 [radeon]
> > >   RSP: 0018:b96f0147b9d0 EFLAGS: 00010246
> > >   RAX:  RBX: 97d620085000 RCX: 00610037
> > >   RDX:  RSI: 002b RDI: 
> > >   RBP: b96f0147b9e8 R08: 0002 R09: b96f0147b924
> > >   R10:  R11: 97d62edd2ec0 R12: 97d628d5c000
> > >   R13: 00610037 R14: c0698280 R15: 
> > >   FS:  7f496363d8c0() GS:97d62eb0() 
> > > knlGS:
> > >   CS:  0010 DS:  ES:  CR0: 80050033
> > >   CR2: 07cb CR3: 00022c14c000 CR4: 001406e0
> > >   Call Trace:
> > >drm_dev_register+0x146/0x1d0 [drm]
> > >drm_get_pci_dev+0x9a/0x180 [drm]
> > >radeon_pci_probe+0xb8/0xe0 [radeon]
> > >local_pci_probe+0x45/0xa0
> > >pci_device_probe+0x14f/0x1a0
> > >driver_probe_device+0x29c/0x450
> > >__driver_attach+0xdf/0xf0
> > >? driver_probe_device+0x450/0x450
> > >bus_for_each_dev+0x6c/0xc0
> > >driver_attach+0x1e/0x20
> > >bus_add_driver+0x170/0x270
> > >driver_register+0x60/0xe0
> > >? 0xc0508000
> > >__pci_register_driver+0x4c/0x50
> > >drm_pci_init+0xeb/0x100 [drm]
> > >? vga_switcheroo_register_handler+0x6a/0x90
> > >? 0xc0508000
> > >radeon_init+0x98/0xb6 [radeon]
> > >do_one_initcall+0x52/0x1a0
> > >? __vunmap+0x81/0xb0
> > >? kmem_cache_alloc_trace+0x159/0x1b0
> > >? do_init_module+0x27/0x1f8
> > >do_init_module+0x5f/0x1f8
> > >load_module+0x27ce/0x2be0
> > >SYSC_finit_module+0xdf/0x110
> > >? SYSC_finit_module+0xdf/0x110
> > >SyS_finit_module+0xe/0x10
> > >do_syscall_64+0x67/0x150
> > >entry_SYSCALL64_slow_path+0x25/0x25
> > >   RIP: 0033:0x7f4962295679
> > >   RSP: 002b:7ffdd8c4f878 EFLAGS: 0246 ORIG_RAX: 0139
> > >   RAX: ffda RBX: 55c014ed8200 RCX: 7f4962295679
> > >   RDX:  RSI: 7f4962dd19c5 RDI: 0010
> > >   RBP: 7f4962dd19c5 R08:  R09: 7ffdd8c4f990
> > >   R10: 0010 R11: 0246 R12: 
> > >   R13: 55c014ed81a0 R14: 0002 R15: 55c0149d1fca
> > >   Code: 5d 5d c3 8b 05 a7 05 14 00 49 81 cd 00 00 08 00 85 c0 74 a3 e8 e7 
> > > c0 0e 00 84 c0 74 9a 41 f7 c5 00 00 02 00 75 91 49 8b 44 24 10 <0f> b6 90 
> > > cb 07 00 00 f6 c2 20 74 1e e9 7b ff ff ff 48 8b 40 38
> > >   RIP: radeon_driver_load_kms+0xeb/0x230 [radeon] RSP: b96f0147b9d0
> > >   CR2: 07cb
> > >   ---[ end trace 89cc4ba7e569c65c ]---
> > > 
> > > Reported-by: Nicolai Stange 
> > > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> > > vga_switcheroo")
> > > Signed-off-by: Lukas Wunner 
> > > ---
> > > 
> > > Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> > > needs to be fixed, so sending out with a proper commit message now.
> > > The bug was only introduced to radeon, not amdgpu.
> > > 
> > > @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> > > land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> > > I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> > > take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
> > 
> > Just noticed that this has landed already in drm-misc-fixes, without any
> > r-b or at least an ack from radeon driver folks. That's breaking the
> > drm-misc rules, we need at least an ack for small drivers (which radeon
> > really isn't) and a full reviewed-by tag on everything else.
> > 
> > Patch doesn't look wrong, so not much harm, but please follow the ground
> > rules and especially don't ever push your own patches without any peer
> > feedback.
> 
> I was aware of that rule and that the available 

Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Christian König

Am 23.05.2017 um 12:14 schrieb Lukas Wunner:

On Tue, May 23, 2017 at 09:32:38AM +0200, Christian König wrote:

Am 23.05.2017 um 05:55 schrieb Michel Dänzer:

On 23/05/17 12:50 PM, Lukas Wunner wrote:

On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:

On 22/05/17 11:04 PM, Lukas Wunner wrote:

On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:

On Thu, May 18 2017, Lukas Wunner wrote:

[snip]

Reported-by: Nicolai Stange 
Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
vga_switcheroo")
Signed-off-by: Lukas Wunner 
---

Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
needs to be fixed, so sending out with a proper commit message now.
The bug was only introduced to radeon, not amdgpu.

Tested-by: Nicolai Stange 

Thanks for the quick fix!


@Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
land before -rc3 because Sean Paul has already sent out the -rc2 pull.
I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

I've learned this morning that Alex is on vacation.

Christian König is standing in for Alex.

By his own account, he already has "all hands full replacing him [Alex]",
explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
this reason and lacks permission to update branches in Alex' repo on fdo:

"One lesson learned from the past week is that Alex needs to stop using
his personal repository on fdo.
We were asked a couple of times if I couldn't update a branch there from
different directions, which we obviously can't do."

https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html

The important point being that Christian reviewed that patch and
explicitly asked Daniel to pick it up.

Wow, wait a second. I'm just catching up on this thread.

Lukas didn't committed the patch to drm-misc without a review, didn't you?

I was intentionally holding back a rb because that isn't my field of
expertise and I was only briefly involved in the original patch.

It would have been helpful if you had communicated that, I explicitly
asked Alex which tree he'd prefer merging through.  If you're his
stand-in then why didn't you reply?


Alex will be back before the weekend and probably sending another fixes 
pull for the rc.


PowerXpress is not my field of expertise, but Alex is deeply into so 
I've ignore that issue for now.



I was already wondering why you took the time to reply to Daniel's patch
(which went into drm-misc-next, so queued for 4.13), but didn't reply
at all to my patch (which affects 4.12, so arguably has higher priority).

I'd dispute that the issue at hand requires specific domain knowlege,
it's a trivial dereference of a pointer before it's set.


After taking the time this morning to take a look at the patch and the 
original code I can confirm that it is indeed completely trivial.



Alex should
be back by the end of the week, so no need for a rush like that.

End of the week means the patch would miss another rc cycle, and the
DRM subsystem is getting enough criticism for causing regressions as
it is, isn't it? :-(


Yeah, but in this case just ping me and not commit without any peer review.

For stuff like this we will get even more criticism from Linus than 
causing regressions.


Anyway no harm done, let's just merge this one through drm-misc-fixes 
and everything is fine.


Regards,
Christian.



Thanks,

Lukas



___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Lukas Wunner
On Tue, May 23, 2017 at 09:32:38AM +0200, Christian König wrote:
> Am 23.05.2017 um 05:55 schrieb Michel Dänzer:
> >On 23/05/17 12:50 PM, Lukas Wunner wrote:
> >>On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
> >>>On 22/05/17 11:04 PM, Lukas Wunner wrote:
> On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> >On Thu, May 18 2017, Lukas Wunner wrote:
> [snip]
> >>Reported-by: Nicolai Stange 
> >>Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> >>vga_switcheroo")
> >>Signed-off-by: Lukas Wunner 
> >>---
> >>
> >>Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> >>needs to be fixed, so sending out with a proper commit message now.
> >>The bug was only introduced to radeon, not amdgpu.
> >Tested-by: Nicolai Stange 
> >
> >Thanks for the quick fix!
> >
> >>@Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> >>land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> >>I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> >>take it yourself?  Whichever you prefer.  Thanks & sorry for the 
> >>breakage!
> I've learned this morning that Alex is on vacation.
> >>>Christian König is standing in for Alex.
> >>By his own account, he already has "all hands full replacing him [Alex]",
> >>explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
> >>this reason and lacks permission to update branches in Alex' repo on fdo:
> >>
> >>"One lesson learned from the past week is that Alex needs to stop using
> >>his personal repository on fdo.
> >>We were asked a couple of times if I couldn't update a branch there from
> >>different directions, which we obviously can't do."
> >>
> >>https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
> >>https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html
> >The important point being that Christian reviewed that patch and
> >explicitly asked Daniel to pick it up.
> 
> Wow, wait a second. I'm just catching up on this thread.
> 
> Lukas didn't committed the patch to drm-misc without a review, didn't you?
> 
> I was intentionally holding back a rb because that isn't my field of
> expertise and I was only briefly involved in the original patch.

It would have been helpful if you had communicated that, I explicitly
asked Alex which tree he'd prefer merging through.  If you're his
stand-in then why didn't you reply?

I was already wondering why you took the time to reply to Daniel's patch
(which went into drm-misc-next, so queued for 4.13), but didn't reply
at all to my patch (which affects 4.12, so arguably has higher priority).

I'd dispute that the issue at hand requires specific domain knowlege,
it's a trivial dereference of a pointer before it's set.


> Alex should
> be back by the end of the week, so no need for a rush like that.

End of the week means the patch would miss another rc cycle, and the
DRM subsystem is getting enough criticism for causing regressions as
it is, isn't it? :-(

Thanks,

Lukas
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Lukas Wunner
On Mon, May 22, 2017 at 03:35:48PM -0400, Sean Paul wrote:
> On Mon, May 22, 2017 at 04:04:07PM +0200, Lukas Wunner wrote:
> > On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> > > On Thu, May 18 2017, Lukas Wunner wrote:
> > [snip]
> > > > Reported-by: Nicolai Stange 
> > > > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> > > > vga_switcheroo")
> > > > Signed-off-by: Lukas Wunner 
> > > > ---
> > > >
> > > > Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> > > > needs to be fixed, so sending out with a proper commit message now.
> > > > The bug was only introduced to radeon, not amdgpu.
> > > 
> > > Tested-by: Nicolai Stange 
> > > 
> > > Thanks for the quick fix!
> > >
> > > > @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> > > > land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> > > > I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> > > > take it yourself?  Whichever you prefer.  Thanks & sorry for the 
> > > > breakage!
> > 
> > I've learned this morning that Alex is on vacation.  I've pushed
> > the patch to drm-misc-fixes so that the issue is fixed in 4.12-rc3.
> > 
> > @Sean Paul: I've fast-forwarded to 4.12-rc2 before pushing, please
> > shout if I've done anything wrong.  First time I'm doing this.
> 
> No shouting, but a heads-up on IRC is probably warranted for both pushing a
> patch without R-b and fast-forwarding one of the branches.

Thanks, noted.  I'm not paid for work on the DRM subsystem, so I have to
do this during breaks at $DAYJOB where I have no access to IRC, but I will
ask via e-mail in the future before going out on a limb.

Not being able to dedicate my full attention to this all the time is also
the reason why it's hard for me to get the timing perfect:  I had already
submitted a fix before you sent out your -rc2 pull and I would have hated
missing another rc cycle, yet wasn't sure when exactly you were going to
send out your -rc3 pull this week and whether I would be able to carve out
enough time to push the patch before that date without hurriedly making
major mistakes.

Kind regards,

Lukas
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Christian König

Am 23.05.2017 um 09:36 schrieb Daniel Vetter:

On Tue, May 23, 2017 at 09:32:38AM +0200, Christian König wrote:

Am 23.05.2017 um 05:55 schrieb Michel Dänzer:

On 23/05/17 12:50 PM, Lukas Wunner wrote:

On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:

On 22/05/17 11:04 PM, Lukas Wunner wrote:

On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:

On Thu, May 18 2017, Lukas Wunner wrote:

[snip]

Reported-by: Nicolai Stange 
Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
vga_switcheroo")
Signed-off-by: Lukas Wunner 
---

Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
needs to be fixed, so sending out with a proper commit message now.
The bug was only introduced to radeon, not amdgpu.

Tested-by: Nicolai Stange 

Thanks for the quick fix!


@Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
land before -rc3 because Sean Paul has already sent out the -rc2 pull.
I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

I've learned this morning that Alex is on vacation.

Christian König is standing in for Alex.

By his own account, he already has "all hands full replacing him [Alex]",
explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
this reason and lacks permission to update branches in Alex' repo on fdo:

"One lesson learned from the past week is that Alex needs to stop using
his personal repository on fdo.
We were asked a couple of times if I couldn't update a branch there from
different directions, which we obviously can't do."

https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html

The important point being that Christian reviewed that patch and
explicitly asked Daniel to pick it up.

Wow, wait a second. I'm just catching up on this thread.

Lukas didn't committed the patch to drm-misc without a review, didn't you?

I was intentionally holding back a rb because that isn't my field of
expertise and I was only briefly involved in the original patch. Alex should
be back by the end of the week, so no need for a rush like that.

Daniels patch was a global cleanup of include path done by search and
replace a complete different story.

Want me to drop the patch until Alex is back? We're generally trying
really hard to refrain from rebasing drm-misc branches, but for -fixes
it's doable (since much less patch traffic there).


No, that would probably hurt more than it helps.

The patch is trivial and I just double checked the code and it should be 
fine.


Christian.

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Daniel Vetter
On Tue, May 23, 2017 at 09:36:44AM +0200, Daniel Vetter wrote:
> On Tue, May 23, 2017 at 09:32:38AM +0200, Christian König wrote:
> > Am 23.05.2017 um 05:55 schrieb Michel Dänzer:
> > > On 23/05/17 12:50 PM, Lukas Wunner wrote:
> > > > On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
> > > > > On 22/05/17 11:04 PM, Lukas Wunner wrote:
> > > > > > On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> > > > > > > On Thu, May 18 2017, Lukas Wunner wrote:
> > > > > > [snip]
> > > > > > > > Reported-by: Nicolai Stange 
> > > > > > > > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt 
> > > > > > > > eGPU with vga_switcheroo")
> > > > > > > > Signed-off-by: Lukas Wunner 
> > > > > > > > ---
> > > > > > > > 
> > > > > > > > Awaiting a Tested-by: from Nicolai, but it's clear this is a 
> > > > > > > > bug and
> > > > > > > > needs to be fixed, so sending out with a proper commit message 
> > > > > > > > now.
> > > > > > > > The bug was only introduced to radeon, not amdgpu.
> > > > > > > Tested-by: Nicolai Stange 
> > > > > > > 
> > > > > > > Thanks for the quick fix!
> > > > > > > 
> > > > > > > > @Alex Deucher: I could push this to drm-misc-fixes but then it 
> > > > > > > > wouldn't
> > > > > > > > land before -rc3 because Sean Paul has already sent out the 
> > > > > > > > -rc2 pull.
> > > > > > > > I notice you haven't sent out a pull for -rc2 yet, so maybe you 
> > > > > > > > want to
> > > > > > > > take it yourself?  Whichever you prefer.  Thanks & sorry for 
> > > > > > > > the breakage!
> > > > > > I've learned this morning that Alex is on vacation.
> > > > > Christian König is standing in for Alex.
> > > > By his own account, he already has "all hands full replacing him 
> > > > [Alex]",
> > > > explicitly asked Daniel to merge an amdgpu patch through drm-misc-next 
> > > > for
> > > > this reason and lacks permission to update branches in Alex' repo on 
> > > > fdo:
> > > > 
> > > > "One lesson learned from the past week is that Alex needs to stop using
> > > > his personal repository on fdo.
> > > > We were asked a couple of times if I couldn't update a branch there from
> > > > different directions, which we obviously can't do."
> > > > 
> > > > https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
> > > > https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html
> > > The important point being that Christian reviewed that patch and
> > > explicitly asked Daniel to pick it up.
> > 
> > Wow, wait a second. I'm just catching up on this thread.
> > 
> > Lukas didn't committed the patch to drm-misc without a review, didn't you?
> > 
> > I was intentionally holding back a rb because that isn't my field of
> > expertise and I was only briefly involved in the original patch. Alex should
> > be back by the end of the week, so no need for a rush like that.
> > 
> > Daniels patch was a global cleanup of include path done by search and
> > replace a complete different story.
> 
> Want me to drop the patch until Alex is back? We're generally trying
> really hard to refrain from rebasing drm-misc branches, but for -fixes
> it's doable (since much less patch traffic there).

Also, I guess putting this as requirement number one in the drm-misc docs
wasn't visible enough:

"Patch is properly reviewed or at least Ack, i.e. don't just push your own
stuff directly."

It would be nice if we could check this somehow using scripting, but since
we add the r-b/a-b tags only after they're applied that's a bit hard to
pull off. Maybe a sanity check when pushing that all the new patches
authored by the committer have an r-b/a-b would be useful ... Lukas, can
you pls look into that?

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Daniel Vetter
On Tue, May 23, 2017 at 09:32:38AM +0200, Christian König wrote:
> Am 23.05.2017 um 05:55 schrieb Michel Dänzer:
> > On 23/05/17 12:50 PM, Lukas Wunner wrote:
> > > On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
> > > > On 22/05/17 11:04 PM, Lukas Wunner wrote:
> > > > > On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> > > > > > On Thu, May 18 2017, Lukas Wunner wrote:
> > > > > [snip]
> > > > > > > Reported-by: Nicolai Stange 
> > > > > > > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU 
> > > > > > > with vga_switcheroo")
> > > > > > > Signed-off-by: Lukas Wunner 
> > > > > > > ---
> > > > > > > 
> > > > > > > Awaiting a Tested-by: from Nicolai, but it's clear this is a bug 
> > > > > > > and
> > > > > > > needs to be fixed, so sending out with a proper commit message 
> > > > > > > now.
> > > > > > > The bug was only introduced to radeon, not amdgpu.
> > > > > > Tested-by: Nicolai Stange 
> > > > > > 
> > > > > > Thanks for the quick fix!
> > > > > > 
> > > > > > > @Alex Deucher: I could push this to drm-misc-fixes but then it 
> > > > > > > wouldn't
> > > > > > > land before -rc3 because Sean Paul has already sent out the -rc2 
> > > > > > > pull.
> > > > > > > I notice you haven't sent out a pull for -rc2 yet, so maybe you 
> > > > > > > want to
> > > > > > > take it yourself?  Whichever you prefer.  Thanks & sorry for the 
> > > > > > > breakage!
> > > > > I've learned this morning that Alex is on vacation.
> > > > Christian König is standing in for Alex.
> > > By his own account, he already has "all hands full replacing him [Alex]",
> > > explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
> > > this reason and lacks permission to update branches in Alex' repo on fdo:
> > > 
> > > "One lesson learned from the past week is that Alex needs to stop using
> > > his personal repository on fdo.
> > > We were asked a couple of times if I couldn't update a branch there from
> > > different directions, which we obviously can't do."
> > > 
> > > https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
> > > https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html
> > The important point being that Christian reviewed that patch and
> > explicitly asked Daniel to pick it up.
> 
> Wow, wait a second. I'm just catching up on this thread.
> 
> Lukas didn't committed the patch to drm-misc without a review, didn't you?
> 
> I was intentionally holding back a rb because that isn't my field of
> expertise and I was only briefly involved in the original patch. Alex should
> be back by the end of the week, so no need for a rush like that.
> 
> Daniels patch was a global cleanup of include path done by search and
> replace a complete different story.

Want me to drop the patch until Alex is back? We're generally trying
really hard to refrain from rebasing drm-misc branches, but for -fixes
it's doable (since much less patch traffic there).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-23 Thread Christian König

Am 23.05.2017 um 05:55 schrieb Michel Dänzer:

On 23/05/17 12:50 PM, Lukas Wunner wrote:

On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:

On 22/05/17 11:04 PM, Lukas Wunner wrote:

On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:

On Thu, May 18 2017, Lukas Wunner wrote:

[snip]

Reported-by: Nicolai Stange 
Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
vga_switcheroo")
Signed-off-by: Lukas Wunner 
---

Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
needs to be fixed, so sending out with a proper commit message now.
The bug was only introduced to radeon, not amdgpu.

Tested-by: Nicolai Stange 

Thanks for the quick fix!


@Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
land before -rc3 because Sean Paul has already sent out the -rc2 pull.
I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

I've learned this morning that Alex is on vacation.

Christian König is standing in for Alex.

By his own account, he already has "all hands full replacing him [Alex]",
explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
this reason and lacks permission to update branches in Alex' repo on fdo:

"One lesson learned from the past week is that Alex needs to stop using
his personal repository on fdo.
We were asked a couple of times if I couldn't update a branch there from
different directions, which we obviously can't do."

https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html

The important point being that Christian reviewed that patch and
explicitly asked Daniel to pick it up.


Wow, wait a second. I'm just catching up on this thread.

Lukas didn't committed the patch to drm-misc without a review, didn't you?

I was intentionally holding back a rb because that isn't my field of 
expertise and I was only briefly involved in the original patch. Alex 
should be back by the end of the week, so no need for a rush like that.


Daniels patch was a global cleanup of include path done by search and 
replace a complete different story.


Regards,
Christian.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Michel Dänzer
On 23/05/17 12:50 PM, Lukas Wunner wrote:
> On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
>> On 22/05/17 11:04 PM, Lukas Wunner wrote:
>>> On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
 On Thu, May 18 2017, Lukas Wunner wrote:
>>> [snip]
> Reported-by: Nicolai Stange 
> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> vga_switcheroo")
> Signed-off-by: Lukas Wunner 
> ---
>
> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> needs to be fixed, so sending out with a proper commit message now.
> The bug was only introduced to radeon, not amdgpu.

 Tested-by: Nicolai Stange 

 Thanks for the quick fix!

> @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
>>>
>>> I've learned this morning that Alex is on vacation.
>>
>> Christian König is standing in for Alex.
> 
> By his own account, he already has "all hands full replacing him [Alex]",
> explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
> this reason and lacks permission to update branches in Alex' repo on fdo:
> 
> "One lesson learned from the past week is that Alex needs to stop using
> his personal repository on fdo.
> We were asked a couple of times if I couldn't update a branch there from 
> different directions, which we obviously can't do."
> 
> https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
> https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html

The important point being that Christian reviewed that patch and
explicitly asked Daniel to pick it up.


>>> I've pushed the patch to drm-misc-fixes so that the issue is fixed in
>>> 4.12-rc3.
>>
>> I don't think there was any particular need to bypass the normal radeon
>> tree for this. There was plenty of time for the fix to get into 4.12
>> final, even after Alex is back.
> 
> Well, it wouldn't be nice towards users affected by the same issue
> who may waste time with bisecting to just sit on a fix twiddling thumbs.

We all tend to think our latest fix is the most important one. :) But I
really don't see this one being special.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Lukas Wunner
On Tue, May 23, 2017 at 12:09:49PM +0900, Michel Dänzer wrote:
> On 22/05/17 11:04 PM, Lukas Wunner wrote:
> > On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> >> On Thu, May 18 2017, Lukas Wunner wrote:
> > [snip]
> >>> Reported-by: Nicolai Stange 
> >>> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> >>> vga_switcheroo")
> >>> Signed-off-by: Lukas Wunner 
> >>> ---
> >>>
> >>> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> >>> needs to be fixed, so sending out with a proper commit message now.
> >>> The bug was only introduced to radeon, not amdgpu.
> >>
> >> Tested-by: Nicolai Stange 
> >>
> >> Thanks for the quick fix!
> >>
> >>> @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> >>> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> >>> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> >>> take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
> > 
> > I've learned this morning that Alex is on vacation.
> 
> Christian König is standing in for Alex.

By his own account, he already has "all hands full replacing him [Alex]",
explicitly asked Daniel to merge an amdgpu patch through drm-misc-next for
this reason and lacks permission to update branches in Alex' repo on fdo:

"One lesson learned from the past week is that Alex needs to stop using
his personal repository on fdo.
We were asked a couple of times if I couldn't update a branch there from 
different directions, which we obviously can't do."

https://lists.freedesktop.org/archives/dri-devel/2017-May/142376.html
https://lists.freedesktop.org/archives/dri-devel/2017-May/142380.html


> > I've pushed the patch to drm-misc-fixes so that the issue is fixed in
> > 4.12-rc3.
> 
> I don't think there was any particular need to bypass the normal radeon
> tree for this. There was plenty of time for the fix to get into 4.12
> final, even after Alex is back.

Well, it wouldn't be nice towards users affected by the same issue
who may waste time with bisecting to just sit on a fix twiddling thumbs.

Thanks,

Lukas
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Michel Dänzer
On 22/05/17 11:04 PM, Lukas Wunner wrote:
> On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
>> On Thu, May 18 2017, Lukas Wunner wrote:
> [snip]
>>> Reported-by: Nicolai Stange 
>>> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
>>> vga_switcheroo")
>>> Signed-off-by: Lukas Wunner 
>>> ---
>>>
>>> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
>>> needs to be fixed, so sending out with a proper commit message now.
>>> The bug was only introduced to radeon, not amdgpu.
>>
>> Tested-by: Nicolai Stange 
>>
>> Thanks for the quick fix!
>>
>>> @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
>>> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
>>> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
>>> take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
> 
> I've learned this morning that Alex is on vacation.

Christian König is standing in for Alex.

> I've pushed the patch to drm-misc-fixes so that the issue is fixed in
> 4.12-rc3.

I don't think there was any particular need to bypass the normal radeon
tree for this. There was plenty of time for the fix to get into 4.12
final, even after Alex is back.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Sean Paul
On Mon, May 22, 2017 at 04:04:07PM +0200, Lukas Wunner wrote:
> On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> > On Thu, May 18 2017, Lukas Wunner wrote:
> [snip]
> > > Reported-by: Nicolai Stange 
> > > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> > > vga_switcheroo")
> > > Signed-off-by: Lukas Wunner 
> > > ---
> > >
> > > Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> > > needs to be fixed, so sending out with a proper commit message now.
> > > The bug was only introduced to radeon, not amdgpu.
> > 
> > Tested-by: Nicolai Stange 
> > 
> > Thanks for the quick fix!
> >
> > > @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> > > land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> > > I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> > > take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
> 
> I've learned this morning that Alex is on vacation.  I've pushed
> the patch to drm-misc-fixes so that the issue is fixed in 4.12-rc3.
> 
> @Sean Paul: I've fast-forwarded to 4.12-rc2 before pushing, please
> shout if I've done anything wrong.  First time I'm doing this.

No shouting, but a heads-up on IRC is probably warranted for both pushing a
patch without R-b and fast-forwarding one of the branches.

Sean

> 
> Thanks,
> 
> Lukas
> 
> > >
> > >  drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
> > > b/drivers/gpu/drm/radeon/radeon_kms.c
> > > index 6a68d440bc44..d0ad03674250 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > > @@ -116,7 +116,7 @@ int radeon_driver_load_kms(struct drm_device *dev, 
> > > unsigned long flags)
> > >   if ((radeon_runtime_pm != 0) &&
> > >   radeon_has_atpx() &&
> > >   ((flags & RADEON_IS_IGP) == 0) &&
> > > - !pci_is_thunderbolt_attached(rdev->pdev))
> > > + !pci_is_thunderbolt_attached(dev->pdev))
> > >   flags |= RADEON_IS_PX;
> > >  
> > >   /* radeon_device_init should report only fatal error

-- 
Sean Paul, Software Engineer, Google / Chromium OS
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Daniel Vetter
On Thu, May 18, 2017 at 09:33:44PM +0200, Lukas Wunner wrote:
> Nicolai Stange reports the following oops which is caused by
> dereferencing rdev->pdev before it's subsequently set by
> radeon_device_init().  Fix it.
> 
>   BUG: unable to handle kernel NULL pointer dereference at 07cb
>   IP: radeon_driver_load_kms+0xeb/0x230 [radeon]
>   PGD 0
>   P4D 0
> 
>   Oops:  [#1] SMP
>   Modules linked in: amdkfd amd_iommu_v2 i915(+) radeon(+) i2c_algo_bit 
> drm_kms_helper ttm e1000e drm sdhci_pci sdhci_acpi ptp sdhci crc32c_intel 
> serio_raw mmc_core pps_core video i2c_hid hid_plantronics
>   CPU: 4 PID: 389 Comm: systemd-udevd Not tainted 4.12.0-rc1-next-20170515+ #1
>   Hardware name: Dell Inc. Latitude E6540/0725FP, BIOS A10 06/26/2014
>   task: 97d62c8f task.stack: b96f01478000
>   RIP: 0010:radeon_driver_load_kms+0xeb/0x230 [radeon]
>   RSP: 0018:b96f0147b9d0 EFLAGS: 00010246
>   RAX:  RBX: 97d620085000 RCX: 00610037
>   RDX:  RSI: 002b RDI: 
>   RBP: b96f0147b9e8 R08: 0002 R09: b96f0147b924
>   R10:  R11: 97d62edd2ec0 R12: 97d628d5c000
>   R13: 00610037 R14: c0698280 R15: 
>   FS:  7f496363d8c0() GS:97d62eb0() knlGS:
>   CS:  0010 DS:  ES:  CR0: 80050033
>   CR2: 07cb CR3: 00022c14c000 CR4: 001406e0
>   Call Trace:
>drm_dev_register+0x146/0x1d0 [drm]
>drm_get_pci_dev+0x9a/0x180 [drm]
>radeon_pci_probe+0xb8/0xe0 [radeon]
>local_pci_probe+0x45/0xa0
>pci_device_probe+0x14f/0x1a0
>driver_probe_device+0x29c/0x450
>__driver_attach+0xdf/0xf0
>? driver_probe_device+0x450/0x450
>bus_for_each_dev+0x6c/0xc0
>driver_attach+0x1e/0x20
>bus_add_driver+0x170/0x270
>driver_register+0x60/0xe0
>? 0xc0508000
>__pci_register_driver+0x4c/0x50
>drm_pci_init+0xeb/0x100 [drm]
>? vga_switcheroo_register_handler+0x6a/0x90
>? 0xc0508000
>radeon_init+0x98/0xb6 [radeon]
>do_one_initcall+0x52/0x1a0
>? __vunmap+0x81/0xb0
>? kmem_cache_alloc_trace+0x159/0x1b0
>? do_init_module+0x27/0x1f8
>do_init_module+0x5f/0x1f8
>load_module+0x27ce/0x2be0
>SYSC_finit_module+0xdf/0x110
>? SYSC_finit_module+0xdf/0x110
>SyS_finit_module+0xe/0x10
>do_syscall_64+0x67/0x150
>entry_SYSCALL64_slow_path+0x25/0x25
>   RIP: 0033:0x7f4962295679
>   RSP: 002b:7ffdd8c4f878 EFLAGS: 0246 ORIG_RAX: 0139
>   RAX: ffda RBX: 55c014ed8200 RCX: 7f4962295679
>   RDX:  RSI: 7f4962dd19c5 RDI: 0010
>   RBP: 7f4962dd19c5 R08:  R09: 7ffdd8c4f990
>   R10: 0010 R11: 0246 R12: 
>   R13: 55c014ed81a0 R14: 0002 R15: 55c0149d1fca
>   Code: 5d 5d c3 8b 05 a7 05 14 00 49 81 cd 00 00 08 00 85 c0 74 a3 e8 e7 c0 
> 0e 00 84 c0 74 9a 41 f7 c5 00 00 02 00 75 91 49 8b 44 24 10 <0f> b6 90 cb 07 
> 00 00 f6 c2 20 74 1e e9 7b ff ff ff 48 8b 40 38
>   RIP: radeon_driver_load_kms+0xeb/0x230 [radeon] RSP: b96f0147b9d0
>   CR2: 07cb
>   ---[ end trace 89cc4ba7e569c65c ]---
> 
> Reported-by: Nicolai Stange 
> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> vga_switcheroo")
> Signed-off-by: Lukas Wunner 
> ---
> 
> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> needs to be fixed, so sending out with a proper commit message now.
> The bug was only introduced to radeon, not amdgpu.
> 
> @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

Just noticed that this has landed already in drm-misc-fixes, without any
r-b or at least an ack from radeon driver folks. That's breaking the
drm-misc rules, we need at least an ack for small drivers (which radeon
really isn't) and a full reviewed-by tag on everything else.

Patch doesn't look wrong, so not much harm, but please follow the ground
rules and especially don't ever push your own patches without any peer
feedback.

Thanks, Daniel

> 
>  drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
> b/drivers/gpu/drm/radeon/radeon_kms.c
> index 6a68d440bc44..d0ad03674250 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -116,7 +116,7 @@ int radeon_driver_load_kms(struct drm_device *dev, 
> unsigned long flags)
>   if ((radeon_runtime_pm != 0) &&
>   radeon_has_atpx() &&
>   ((flags & RADEON_IS_IGP) == 0) &&
> - 

Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-22 Thread Lukas Wunner
On Sun, May 21, 2017 at 09:31:09AM +0200, Nicolai Stange wrote:
> On Thu, May 18 2017, Lukas Wunner wrote:
[snip]
> > Reported-by: Nicolai Stange 
> > Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> > vga_switcheroo")
> > Signed-off-by: Lukas Wunner 
> > ---
> >
> > Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> > needs to be fixed, so sending out with a proper commit message now.
> > The bug was only introduced to radeon, not amdgpu.
> 
> Tested-by: Nicolai Stange 
> 
> Thanks for the quick fix!
>
> > @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> > land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> > I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> > take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

I've learned this morning that Alex is on vacation.  I've pushed
the patch to drm-misc-fixes so that the issue is fixed in 4.12-rc3.

@Sean Paul: I've fast-forwarded to 4.12-rc2 before pushing, please
shout if I've done anything wrong.  First time I'm doing this.

Thanks,

Lukas

> >
> >  drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
> > b/drivers/gpu/drm/radeon/radeon_kms.c
> > index 6a68d440bc44..d0ad03674250 100644
> > --- a/drivers/gpu/drm/radeon/radeon_kms.c
> > +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> > @@ -116,7 +116,7 @@ int radeon_driver_load_kms(struct drm_device *dev, 
> > unsigned long flags)
> > if ((radeon_runtime_pm != 0) &&
> > radeon_has_atpx() &&
> > ((flags & RADEON_IS_IGP) == 0) &&
> > -   !pci_is_thunderbolt_attached(rdev->pdev))
> > +   !pci_is_thunderbolt_attached(dev->pdev))
> > flags |= RADEON_IS_PX;
> >  
> > /* radeon_device_init should report only fatal error
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-21 Thread Nicolai Stange
On Thu, May 18 2017, Lukas Wunner wrote:



> Reported-by: Nicolai Stange 
> Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
> vga_switcheroo")
> Signed-off-by: Lukas Wunner 
> ---
>
> Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
> needs to be fixed, so sending out with a proper commit message now.
> The bug was only introduced to radeon, not amdgpu.

Tested-by: Nicolai Stange 

Thanks for the quick fix!


> @Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
> land before -rc3 because Sean Paul has already sent out the -rc2 pull.
> I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
> take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!
>
>  drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
> b/drivers/gpu/drm/radeon/radeon_kms.c
> index 6a68d440bc44..d0ad03674250 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -116,7 +116,7 @@ int radeon_driver_load_kms(struct drm_device *dev, 
> unsigned long flags)
>   if ((radeon_runtime_pm != 0) &&
>   radeon_has_atpx() &&
>   ((flags & RADEON_IS_IGP) == 0) &&
> - !pci_is_thunderbolt_attached(rdev->pdev))
> + !pci_is_thunderbolt_attached(dev->pdev))
>   flags |= RADEON_IS_PX;
>  
>   /* radeon_device_init should report only fatal error
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops

2017-05-18 Thread Lukas Wunner
Nicolai Stange reports the following oops which is caused by
dereferencing rdev->pdev before it's subsequently set by
radeon_device_init().  Fix it.

  BUG: unable to handle kernel NULL pointer dereference at 07cb
  IP: radeon_driver_load_kms+0xeb/0x230 [radeon]
  PGD 0
  P4D 0

  Oops:  [#1] SMP
  Modules linked in: amdkfd amd_iommu_v2 i915(+) radeon(+) i2c_algo_bit 
drm_kms_helper ttm e1000e drm sdhci_pci sdhci_acpi ptp sdhci crc32c_intel 
serio_raw mmc_core pps_core video i2c_hid hid_plantronics
  CPU: 4 PID: 389 Comm: systemd-udevd Not tainted 4.12.0-rc1-next-20170515+ #1
  Hardware name: Dell Inc. Latitude E6540/0725FP, BIOS A10 06/26/2014
  task: 97d62c8f task.stack: b96f01478000
  RIP: 0010:radeon_driver_load_kms+0xeb/0x230 [radeon]
  RSP: 0018:b96f0147b9d0 EFLAGS: 00010246
  RAX:  RBX: 97d620085000 RCX: 00610037
  RDX:  RSI: 002b RDI: 
  RBP: b96f0147b9e8 R08: 0002 R09: b96f0147b924
  R10:  R11: 97d62edd2ec0 R12: 97d628d5c000
  R13: 00610037 R14: c0698280 R15: 
  FS:  7f496363d8c0() GS:97d62eb0() knlGS:
  CS:  0010 DS:  ES:  CR0: 80050033
  CR2: 07cb CR3: 00022c14c000 CR4: 001406e0
  Call Trace:
   drm_dev_register+0x146/0x1d0 [drm]
   drm_get_pci_dev+0x9a/0x180 [drm]
   radeon_pci_probe+0xb8/0xe0 [radeon]
   local_pci_probe+0x45/0xa0
   pci_device_probe+0x14f/0x1a0
   driver_probe_device+0x29c/0x450
   __driver_attach+0xdf/0xf0
   ? driver_probe_device+0x450/0x450
   bus_for_each_dev+0x6c/0xc0
   driver_attach+0x1e/0x20
   bus_add_driver+0x170/0x270
   driver_register+0x60/0xe0
   ? 0xc0508000
   __pci_register_driver+0x4c/0x50
   drm_pci_init+0xeb/0x100 [drm]
   ? vga_switcheroo_register_handler+0x6a/0x90
   ? 0xc0508000
   radeon_init+0x98/0xb6 [radeon]
   do_one_initcall+0x52/0x1a0
   ? __vunmap+0x81/0xb0
   ? kmem_cache_alloc_trace+0x159/0x1b0
   ? do_init_module+0x27/0x1f8
   do_init_module+0x5f/0x1f8
   load_module+0x27ce/0x2be0
   SYSC_finit_module+0xdf/0x110
   ? SYSC_finit_module+0xdf/0x110
   SyS_finit_module+0xe/0x10
   do_syscall_64+0x67/0x150
   entry_SYSCALL64_slow_path+0x25/0x25
  RIP: 0033:0x7f4962295679
  RSP: 002b:7ffdd8c4f878 EFLAGS: 0246 ORIG_RAX: 0139
  RAX: ffda RBX: 55c014ed8200 RCX: 7f4962295679
  RDX:  RSI: 7f4962dd19c5 RDI: 0010
  RBP: 7f4962dd19c5 R08:  R09: 7ffdd8c4f990
  R10: 0010 R11: 0246 R12: 
  R13: 55c014ed81a0 R14: 0002 R15: 55c0149d1fca
  Code: 5d 5d c3 8b 05 a7 05 14 00 49 81 cd 00 00 08 00 85 c0 74 a3 e8 e7 c0 0e 
00 84 c0 74 9a 41 f7 c5 00 00 02 00 75 91 49 8b 44 24 10 <0f> b6 90 cb 07 00 00 
f6 c2 20 74 1e e9 7b ff ff ff 48 8b 40 38
  RIP: radeon_driver_load_kms+0xeb/0x230 [radeon] RSP: b96f0147b9d0
  CR2: 07cb
  ---[ end trace 89cc4ba7e569c65c ]---

Reported-by: Nicolai Stange 
Fixes: 7ffb0ce31cf9 ("drm/radeon: Don't register Thunderbolt eGPU with 
vga_switcheroo")
Signed-off-by: Lukas Wunner 
---

Awaiting a Tested-by: from Nicolai, but it's clear this is a bug and
needs to be fixed, so sending out with a proper commit message now.
The bug was only introduced to radeon, not amdgpu.

@Alex Deucher: I could push this to drm-misc-fixes but then it wouldn't
land before -rc3 because Sean Paul has already sent out the -rc2 pull.
I notice you haven't sent out a pull for -rc2 yet, so maybe you want to
take it yourself?  Whichever you prefer.  Thanks & sorry for the breakage!

 drivers/gpu/drm/radeon/radeon_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c 
b/drivers/gpu/drm/radeon/radeon_kms.c
index 6a68d440bc44..d0ad03674250 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -116,7 +116,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned 
long flags)
if ((radeon_runtime_pm != 0) &&
radeon_has_atpx() &&
((flags & RADEON_IS_IGP) == 0) &&
-   !pci_is_thunderbolt_attached(rdev->pdev))
+   !pci_is_thunderbolt_attached(dev->pdev))
flags |= RADEON_IS_PX;
 
/* radeon_device_init should report only fatal error
-- 
2.11.0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx