Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X11 DRI2: check if device is a render node #584

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

akarl10
Copy link
Contributor

@akarl10 akarl10 commented Mar 30, 2022

and if so skip drmGetMagic and VA_DRI2Authenticate.

This is essentailly the same as in the pure drm non X11 case

fixes #582

name = drmGetDeviceNameFromFd(fd);
if (name) {
/* drmGetDeviceNameFromFd returns a strdup'ed string */
int r = strncmp(name, "/dev/dri/renderD", 16) == 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only renderDxx return 0, if the fd is from open(/dev/dri/card0) , it return <0 or >0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, the == 0 should make r essentially boolean (0 or 1). For clarification it may be better to put it in ()
This is copied over from drm/drm_utils.c with the only change being a memory leak fix (drmGetDeviceNameFromFd returns a string that according the docs needs to drmFree'd)

Copy link
Contributor

@XinfengZhang XinfengZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, thanks

@XinfengZhang
Copy link
Contributor

hi @akarl10 , I will squash your two commit to one, and keep the description of first commit, is it ok to you?

@akarl10
Copy link
Contributor Author

akarl10 commented Apr 17, 2022

@XinfengZhang of course thats ok 👍

@XinfengZhang
Copy link
Contributor

sorry, I could not apply "squash & merge" , could you help to squash these two commits, the second one looks a part of first commit.

@XinfengZhang
Copy link
Contributor

image

and if so skip drmGetMagic and VA_DRI2Authenticate.

This is essentailly the same as in the pure drm non X11 case
@akarl10
Copy link
Contributor Author

akarl10 commented Apr 18, 2022

image

I think I have enabled everything..
image

But nevertheless now there is only one commit in this commit

@XinfengZhang XinfengZhang merged commit aeba585 into intel:master Apr 18, 2022
@akarl10 akarl10 deleted the rendernode-no-auth branch April 19, 2022 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

automatic backend driver loading does not work in xorgxrdp
2 participants