mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-29 06:50:13 +01:00
modetest: set atomic cap, _only_ when needed
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
This commit is contained in:
parent
69f25d6a29
commit
900ed60848
1 changed files with 7 additions and 5 deletions
|
|
@ -2022,11 +2022,13 @@ int main(int argc, char **argv)
|
|||
if (dev.fd < 0)
|
||||
return -1;
|
||||
|
||||
ret = drmSetClientCap(dev.fd, DRM_CLIENT_CAP_ATOMIC, 1);
|
||||
if (ret && use_atomic) {
|
||||
fprintf(stderr, "no atomic modesetting support: %s\n", strerror(errno));
|
||||
drmClose(dev.fd);
|
||||
return -1;
|
||||
if (use_atomic) {
|
||||
ret = drmSetClientCap(dev.fd, DRM_CLIENT_CAP_ATOMIC, 1);
|
||||
if (ret) {
|
||||
fprintf(stderr, "no atomic modesetting support: %s\n", strerror(errno));
|
||||
drmClose(dev.fd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
dev.use_atomic = use_atomic;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue