mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 03:46:00 +01:00
drm: properly check master node after 05219d5287
(#17)
[LOG] [AQ] reopenDRMNode: drmModeCreateLease failed, falling back to open [LOG] [AQ] reopenDRMNode: opening node /dev/dri/renderD128 [ERR] [AQ] reopenDRMNode: drmGetMagic failed: Permission denied
This commit is contained in:
parent
1dd44c85e7
commit
d6791cc5ce
1 changed files with 2 additions and 2 deletions
|
@ -311,7 +311,7 @@ int Aquamarine::CBackend::reopenDRMNode(int drmFD, bool allowRenderNode) {
|
|||
free(name);
|
||||
|
||||
// We need to authenticate if we are using a DRM primary node and are the master
|
||||
if (drmIsMaster(drmFD) && drmGetNodeTypeFromFd(drmFD) == DRM_NODE_PRIMARY) {
|
||||
if (drmIsMaster(drmFD) && drmGetNodeTypeFromFd(newFD) == DRM_NODE_PRIMARY) {
|
||||
drm_magic_t magic;
|
||||
if (int ret = drmGetMagic(newFD, &magic); ret < 0) {
|
||||
log(AQ_LOG_ERROR, std::format("reopenDRMNode: drmGetMagic failed: {}", strerror(-ret)));
|
||||
|
@ -319,7 +319,7 @@ int Aquamarine::CBackend::reopenDRMNode(int drmFD, bool allowRenderNode) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (int ret = drmAuthMagic(newFD, magic); ret < 0) {
|
||||
if (int ret = drmAuthMagic(drmFD, magic); ret < 0) {
|
||||
log(AQ_LOG_ERROR, std::format("reopenDRMNode: drmAuthMagic failed: {}", strerror(-ret)));
|
||||
close(newFD);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue