Summary: | libdrm fails to get bus id | ||
---|---|---|---|
Product: | DRI | Reporter: | Daniel Power <me> |
Component: | libdrm | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | cand |
Version: | DRI git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Daniel Power
2017-07-19 07:57:12 UTC
Please attach the corresponding dmesg output and Xorg log file. 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. 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). (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 ;-) Yes. That is done by the OS. This is standard practice in the embedded world, saving pointless code. (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. 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. -- 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. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.