All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
To: Nicolai Stange <nicstange-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [REGRESSION] drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo
Date: Thu, 18 May 2017 10:05:01 +0200	[thread overview]
Message-ID: <20170518080501.GA31002@wunner.de> (raw)
In-Reply-To: <87h90jkx88.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Wed, May 17, 2017 at 11:08:23PM +0200, Nicolai Stange wrote:
> I'm experiencing a boot failure on next-20170515:
> 
>   BUG: unable to handle kernel NULL pointer dereference at 00000000000007cb
>   IP: radeon_driver_load_kms+0xeb/0x230 [radeon]
[snip]
> Bisection lead to commit 7ffb0ce31cf9 ("drm/radeon: Don't register
> Thunderbolt eGPU with vga_switcheroo"). Reverting this commit on top of
> next-20170515 fixes the issue for me.
> 
> My box is a Dell laptop which most certainly hasn't got any Thunderbolt
> circuitry.

Thanks a lot Nicolai for reporting this, my apologies for the breakage
which turns out to be a dereference of rdev->pdev before it's set. :-(

14:   e8 e7 c0 0e 00          callq  0xec100	      	 ; radeon_has_atpx()
19:   84 c0                   test   %al,%al
1b:   74 9a                   je     0xffffffffffffffb7
1d:   41 f7 c5 00 00 02 00    test   $0x20000,%r13d	 ; flags & RADEON_IS_IGP
24:   75 91                   jne    0xffffffffffffffb7
26:   49 8b 44 24 10          mov    0x10(%r12),%rax	 ; rax = rdev
2b:*  0f b6 90 cb 07 00 00    movzbl 0x7cb(%rax),%edx         <-- trapping instruction

Could you verify if the patch below fixes the issue for you?

Thanks!

Lukas

-- >8 --

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index e3e7cb1..4761f27 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

  parent reply	other threads:[~2017-05-18  8:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 21:08 [REGRESSION] drm/radeon: Don't register Thunderbolt eGPU with vga_switcheroo Nicolai Stange
     [not found] ` <87h90jkx88.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-18  8:05   ` Lukas Wunner [this message]
     [not found]     ` <20170518080501.GA31002-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-18 19:33       ` [PATCH] drm/radeon: Fix oops upon driver load on PowerXpress laptops Lukas Wunner
2017-05-21  7:31         ` Nicolai Stange
2017-05-22 14:04           ` Lukas Wunner
2017-05-22 19:35             ` Sean Paul
2017-05-23  9:40               ` Lukas Wunner
     [not found]             ` <20170522140407.GA7973-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-23  3:09               ` Michel Dänzer
     [not found]                 ` <ee3f8e5b-8deb-b5a3-6d07-f43c27ebf84f-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-23  3:50                   ` Lukas Wunner
     [not found]                     ` <20170523035053.GB3610-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-23  3:55                       ` Michel Dänzer
     [not found]                         ` <b6d95951-d28d-f709-adcd-1068aeaa0e0f-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-05-23  7:32                           ` Christian König
     [not found]                             ` <b84f80fd-0cd1-86cf-4e81-cb4547ea6fff-5C7GfCeVMHo@public.gmane.org>
2017-05-23  7:36                               ` Daniel Vetter
2017-05-23  7:43                                 ` Christian König
2017-05-23  7:43                                 ` Daniel Vetter
2017-05-23 10:14                             ` Lukas Wunner
     [not found]                               ` <20170523101414.GC31451-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2017-05-23 10:32                                 ` Christian König
2017-05-23 18:47                       ` Deucher, Alexander
     [not found]                         ` <BN6PR12MB165207FE821EFFFBE14E1676F7F90-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-05-23 20:23                           ` Alex Deucher
2017-05-22 19:24         ` Daniel Vetter
     [not found]           ` <20170522192434.wotowwbpdl7zqki2-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-05-23 10:00             ` Lukas Wunner
2017-05-23 12:58               ` Daniel Vetter

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=20170518080501.GA31002@wunner.de \
    --to=lukas-jfq808j9c/izqb+pc5nmwq@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nicstange-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 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.