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

Skip to wait nvidia-drm for nvidia-340 #72

Merged
merged 1 commit into from Jul 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions share/hybrid/gpu-manager.c
Expand Up @@ -2529,6 +2529,8 @@ int main(int argc, char *argv[]) {
/* Device information (discrete) */
struct device discrete_device = { 0 };

/* Get nvidia driver version */
int major, minor, extra;

while (1) {
static struct option long_options[] =
Expand Down Expand Up @@ -3047,6 +3049,13 @@ int main(int argc, char *argv[]) {
for (i = 0; i < 500; i++, usleep(20000)) {
if (is_file(UDEV_NVIDIA_COMPLETED))
break;
/* Get nvidia driver version inside loop because sometime nvidia
* driver take longer time to load.
*/
if (get_nvidia_driver_version(&major, &minor, &extra) &&
major < 390) {
break;
}
}
fprintf(log_handle, "Takes %dms to wait for nvidia udev rules completed.\n", i * 20);
}
Expand Down