From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 101837] libdrm fails to get bus id Date: Thu, 20 Jul 2017 11:16:37 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2093066135==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id C6B096E683 for ; Thu, 20 Jul 2017 11:16:36 +0000 (UTC) In-Reply-To: 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 --===============2093066135== Content-Type: multipart/alternative; boundary="15005493961.DAD5AdB.19460"; charset="UTF-8" --15005493961.DAD5AdB.19460 Date: Thu, 20 Jul 2017 11:16:36 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D101837 --- Comment #3 from Emil Velikov --- DanielP an orthogonal solution is to simply not use drmOpen. While it works, sometimes, there's a lot of hidden gotchas. Simply replace the pciaccess + drmOpen with drmDevice2 - see libdrm/tests/drmdevice.c. Notes: * radeon-top does _not_ need to open the card node, hence no need for auth - directly or via xcb * using pciaccess, or drmDevice2 with DRM_DEVICE_GET_PCI_REVISION will wake= up your discrete GPU, even if you're looking for the stats of you APU - you wa= nt to avoid that if possible. * do not forget to close the fd - currently it's leaked. --=20 You are receiving this mail because: You are the assignee for the bug.= --15005493961.DAD5AdB.19460 Date: Thu, 20 Jul 2017 11:16:36 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 10183= 7 from Emil Velikov
DanielP an orthogonal solution is to simply not use drmOpen. W=
hile it works,
sometimes, there's a lot of hidden gotchas.

Simply replace the pciaccess + drmOpen with drmDevice2 - see
libdrm/tests/drmdevice.c.

Notes:
* radeon-top does _not_ need to open the card node, hence no need for auth -
directly or via xcb
* using pciaccess, or drmDevice2 with DRM_DEVICE_GET_PCI_REVISION will wake=
 up
your discrete GPU, even if you're looking for the stats of you APU - you wa=
nt
to avoid that if possible.
* do not forget to close the fd - currently it's leaked.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15005493961.DAD5AdB.19460-- --===============2093066135== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2093066135==--