From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@bugzilla.kernel.org Subject: [Bug 75401] New: vgaswtitcheroo doesn't work for AMD Radeon 8870m (possibly due to "wrong" PCI class) Date: Sat, 03 May 2014 17:26:49 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by gabe.freedesktop.org (Postfix) with ESMTP id 086C96E239 for ; Sat, 3 May 2014 10:26:52 -0700 (PDT) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 305CA202E6 for ; Sat, 3 May 2014 17:26:51 +0000 (UTC) Received: from bugzilla1.web.kernel.org (bugzilla1.web.kernel.org [172.20.200.51]) by mail.kernel.org (Postfix) with ESMTP id 385BA202A7 for ; Sat, 3 May 2014 17:26:50 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org https://bugzilla.kernel.org/show_bug.cgi?id=75401 Bug ID: 75401 Summary: vgaswtitcheroo doesn't work for AMD Radeon 8870m (possibly due to "wrong" PCI class) Product: Drivers Version: 2.5 Kernel Version: 3.11.10 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: low Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: drill87@gmail.com Regression: No I've got Samsung 870Z5E notebook equipped with AMD Radeon 8870m video card (and Intel HD 4000 graphics). I always failed to use vgaswitcheroo to disable the discrete card -- there wasn't even its entry in debugfs. After a little investigetion of radeon module's source code I found, that the problem happens, possibly, due to "unusual" PCI class of my Radeon 8870m. According to command "lspci -nn" Radeon 8870m has PCI class id 0380, which is corresponds to PCI_CLASS_DISPLAY_OTHER (in pci_ids.h). On the other hand, when radeon module check number of videocards, it excepts them to have class PCI_CLASS_DISPLAY_VGA (0300). Thus module concludes that I have only 1 videocard (Intel HD, which has 0300 class id) and decides, that there's no need for vgaswitcheroo to be initialized. I tried to edit radeon kernel module by adding additional checks for PCI_CLASS_DISPLAY_OTHER class id (in 2 places). After that vgaswitcheroo started to work -- the entry appeared in debugfs and I could disable the discrete graphics card. Though I'm not sure if everything went right because I failed to use radeon card for actual rendering through DRI PRIME even in the newest kernel stable version (3.14.2) -- X server crashes even if I try to issues glxinfo command. -- You are receiving this mail because: You are watching the assignee of the bug.