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

minor fixes for driver name rework #731

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions va/drm/va_drm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,9 @@ VA_DRM_GetDriverNames(VADriverContextP ctx, char **drivers, unsigned *num_driver
for (unsigned i = 0; i < ARRAY_SIZE(map); i++) {
if (strcmp(map[i].drm_driver, drm_driver) == 0) {
const char * const *va_drivers = map[i].va_driver;
for (; count < MAX_NAMES && va_drivers[count] && count < *num_drivers; count++)
drivers[count] = strdup(va_drivers[count]);

while (va_drivers[count]) {
if (count < MAX_NAMES && count < *num_drivers)
drivers[count] = strdup(va_drivers[count]);
count++;
}
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions va/va.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ static VAStatus va_new_opendriver(VADisplay dpy)
if (vaStatus != VA_STATUS_SUCCESS) {
/* Print and error yet continue, as per the above ordering note */
va_errorMessage(dpy, "vaGetDriverNames() failed with %s\n", vaErrorStr(vaStatus));
num_drivers = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit: let's prefix the commit message with va: .

} else if (num_drivers > ARRAY_SIZE(drivers)) {
va_errorMessage(dpy, "DRIVER BUG: vaGetDriverNames() provides too many drivers\n");
num_drivers = ARRAY_SIZE(drivers);
Expand Down