regression found by drm: remove VA_DRM_IsRenderNodeFd() helper
- Dominant language
- C
- Stars
- 784
- Forks
- 314
- PR merge metrics
- No merged PRs in 30d
Description
the case is chrome out of process decode case,
after this patch [4d4c5f06519fe4c40d6fe1b2ccff812ff3b3b402](https://github.com/intel/libva/commit/4d4c5f06519fe4c40d6fe1b2ccff812ff3b3b402)
it will break the initialization process, suppose it is because the check in drmGetNodeTypeFromFd is strict than
if (fstat(fd, &st) == 0)
return S_ISCHR(st.st_mode) && (st.st_rdev & 0x80);
ps:
int drmGetNodeTypeFromFd(int fd)
{
struct stat sbuf;
int maj, min, type;
if (fstat(fd, &sbuf))
return -1;
maj = major(sbuf.st_rdev);
min = minor(sbuf.st_rdev);
if (maj != DRM_MAJOR || !S_ISCHR(sbuf.st_mode)) {
errno = EINVAL;
return -1;
}
type = drmGetMinorType(min);
if (type == -1)
errno = ENODEV;
return type;
}
@evelikov-work
Contributor guide
Assessment
This issue has not been assessed yet.