All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 101837] libdrm fails to get bus id
@ 2017-07-19  7:57 bugzilla-daemon
  2017-07-19 11:01 ` bugzilla-daemon
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-19  7:57 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 7027 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

            Bug ID: 101837
           Summary: libdrm fails to get bus id
           Product: DRI
           Version: DRI git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: libdrm
          Assignee: dri-devel@lists.freedesktop.org
          Reporter: me@danielpower.ca

radeontop is unable to display VRAM information because openDRM() returns -1

Graphics card: R9 270X
Distribution: Archlinux
Kernel Version: 4.11.9
libdrm version: 2.4.81 (also tested latest from git)
kernel driver: radeon

Output of radeontop with LIBGL_DEBUG=verbose enabled:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: Interface 1.4 failed, trying 1.1
drmOpenByBusid: drmGetBusid reports 
drmOpenDevice: node name is /dev/dri/card1
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card2
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card3
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card4
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card5
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card6
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card7
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card8
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card9
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card10
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card11
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card12
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card13
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card14
drmOpenByBusid: drmOpenMinor returns -1
drmOpenDevice: node name is /dev/dri/card15
drmOpenByBusid: drmOpenMinor returns -1
Failed to open DRM node, no VRAM support.
Collecting data, please wait....

Output of lspci -vnn:

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] (prog-if 00 [VGA
controller])
        Subsystem: Hightech Information System Ltd. Device 2336
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 49
        NUMA node: 0
        Region 0: Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Region 2: Memory at fea00000 (64-bit, non-prefetchable) [size=256K]
        Region 4: I/O ports at e000 [size=256]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1+,D2+,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [58] Express (v2) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1
unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
                        RlxdOrd- ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr-
TransPend-
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit
Latency L0s <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s, Width x16, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-,
OBFF Not Supported
                AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-,
OBFF Disabled
                AtomicOpsCtl: ReqEn-
                LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB,
EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-,
LinkEqualizationRequest-
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee00000  Data: 0000
        Capabilities: [100 v1] Vendor Specific Information: ID=0001 Rev=1
Len=010 <?>
        Capabilities: [150 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [200 v1] #15
        Capabilities: [270 v1] #19
        Capabilities: [2b0 v1] Address Translation Service (ATS)
                ATSCap: Invalidate Queue Depth: 00
                ATSCtl: Enable+, Smallest Translation Unit: 00
        Capabilities: [2c0 v1] Page Request Interface (PRI)
                PRICtl: Enable- Reset-
                PRISta: RF- UPRGI- Stopped+
                Page Request Capacity: 00000020, Page Request Allocation:
00000000
        Capabilities: [2d0 v1] Process Address Space ID (PASID)
                PASIDCap: Exec+ Priv+, Max PASID Width: 10
                PASIDCtl: Enable- Exec- Priv-
        Kernel driver in use: radeon
        Kernel modules: radeon, amdgpu


Original issue posted on radeontop github:
https://github.com/clbr/radeontop/issues/48

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 8395 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
@ 2017-07-19 11:01 ` bugzilla-daemon
  2017-07-20  2:46 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-19 11:01 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 259 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #1 from Michel Dänzer <michel@daenzer.net> ---
Please attach the corresponding dmesg output and Xorg log file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 997 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
  2017-07-19 11:01 ` bugzilla-daemon
@ 2017-07-20  2:46 ` bugzilla-daemon
  2017-07-20 11:16 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-20  2:46 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 266 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #2 from Daniel Power <me@danielpower.ca> ---
dmesg: https://pastebin.com/fcz5mEb0
xorg: https://pastebin.com/2dacJqTe

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1089 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
  2017-07-19 11:01 ` bugzilla-daemon
  2017-07-20  2:46 ` bugzilla-daemon
@ 2017-07-20 11:16 ` bugzilla-daemon
  2017-07-21  6:30 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-20 11:16 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 766 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #3 from Emil Velikov <emil.l.velikov@gmail.com> ---
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 want
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.

[-- Attachment #1.2: Type: text/html, Size: 1508 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (2 preceding siblings ...)
  2017-07-20 11:16 ` bugzilla-daemon
@ 2017-07-21  6:30 ` bugzilla-daemon
  2017-07-21 12:32 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-21  6:30 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 374 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #4 from Lauri Kasanen <cand@gmx.com> ---
The DRM node must be opened (and kept open for the lifetime of the app) to make
the VRAM queries, or to make the register queries on kernels that prohibit
direct access (e.g. Ubuntu).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1105 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (3 preceding siblings ...)
  2017-07-21  6:30 ` bugzilla-daemon
@ 2017-07-21 12:32 ` bugzilla-daemon
  2017-07-21 13:10 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-21 12:32 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #5 from Emil Velikov <emil.l.velikov@gmail.com> ---
(In reply to Lauri Kasanen from comment #4)
> The DRM node must be opened (and kept open for the lifetime of the app) to
> make the VRAM queries, or to make the register queries on kernels that
> prohibit direct access (e.g. Ubuntu).

Right - the fd is required for the queries. Yet the app does not seem to close
it upon exit ;-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1355 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (4 preceding siblings ...)
  2017-07-21 12:32 ` bugzilla-daemon
@ 2017-07-21 13:10 ` bugzilla-daemon
  2017-07-21 14:56 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-21 13:10 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 290 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #6 from Lauri Kasanen <cand@gmx.com> ---
Yes. That is done by the OS. This is standard practice in the embedded world,
saving pointless code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1021 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (5 preceding siblings ...)
  2017-07-21 13:10 ` bugzilla-daemon
@ 2017-07-21 14:56 ` bugzilla-daemon
  2017-07-22  6:34 ` bugzilla-daemon
  2019-09-24 17:09 ` bugzilla-daemon
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-21 14:56 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 591 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #7 from Emil Velikov <emil.l.velikov@gmail.com> ---
(In reply to Lauri Kasanen from comment #6)
> Yes. That is done by the OS. This is standard practice in the embedded
> world, saving pointless code.
This is getting really off-topic. We might want to spend that time on more
productive things;-) AFAICT the app is _not_ made for the embedded world, plus
"pointless" is fairly subjective. That said, if you don't want to do it, so be
it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1417 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (6 preceding siblings ...)
  2017-07-21 14:56 ` bugzilla-daemon
@ 2017-07-22  6:34 ` bugzilla-daemon
  2019-09-24 17:09 ` bugzilla-daemon
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2017-07-22  6:34 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 714 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

--- Comment #8 from Daniel Power <me@danielpower.ca> ---
I appreciate your suggestions to make changes to radeontop. I have made note of
that in my bug report to radeontop. However, I am not a C developer, and don't
know how to make the changes myself.

I created this bug report at the suggestion of the radeontop developer, since
the openDrm functionality works for other users, but fails on my system. So he
believes it is a bug in libdrm.

If this is not a bug with lidrm, I will pass it along to the radeontop
developer, and hopefully he can do something about it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1449 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 101837] libdrm fails to get bus id
  2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
                   ` (7 preceding siblings ...)
  2017-07-22  6:34 ` bugzilla-daemon
@ 2019-09-24 17:09 ` bugzilla-daemon
  8 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2019-09-24 17:09 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 839 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=101837

GitLab Migration User <gitlab-migration@fdo.invalid> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #9 from GitLab Migration User <gitlab-migration@fdo.invalid> ---
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this link
to our GitLab instance: https://gitlab.freedesktop.org/mesa/drm/issues/18.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2370 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-09-24 17:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19  7:57 [Bug 101837] libdrm fails to get bus id bugzilla-daemon
2017-07-19 11:01 ` bugzilla-daemon
2017-07-20  2:46 ` bugzilla-daemon
2017-07-20 11:16 ` bugzilla-daemon
2017-07-21  6:30 ` bugzilla-daemon
2017-07-21 12:32 ` bugzilla-daemon
2017-07-21 13:10 ` bugzilla-daemon
2017-07-21 14:56 ` bugzilla-daemon
2017-07-22  6:34 ` bugzilla-daemon
2019-09-24 17:09 ` bugzilla-daemon

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.