m
This commit is contained in:
parent
ad6154021e
commit
eb8bcbad8b
1 changed files with 18 additions and 7 deletions
25
server.c
25
server.c
|
@ -422,9 +422,24 @@ int main(int argc, const char **argv)
|
||||||
mmap_size = open_arg.size;
|
mmap_size = open_arg.size;
|
||||||
mmap_offset = mmap_arg.out.addr_ptr;
|
mmap_offset = mmap_arg.out.addr_ptr;
|
||||||
}
|
}
|
||||||
else if (strcmp(drm_ver->name, "nvidia-drm") == 0) {
|
else {
|
||||||
convert_func = &convert_nv_stripe;
|
if (strcmp(drm_ver->name, "nvidia-drm") == 0) {
|
||||||
vblank_func = &drm_wait_vblank_noop;
|
// quirky
|
||||||
|
convert_func = &convert_nv_stripe;
|
||||||
|
vblank_func = &drm_wait_vblank_noop;
|
||||||
|
}
|
||||||
|
else if (strcmp(drm_ver->name, "vmwgfx") == 0) {
|
||||||
|
}
|
||||||
|
else if (strcmp(drm_ver->name, "vboxvideo") == 0) {
|
||||||
|
vblank_func = &drm_wait_vblank_noop;
|
||||||
|
}
|
||||||
|
else if (strcmp(drm_ver->name, "virtio_gpu") == 0) {
|
||||||
|
// virgl does not work
|
||||||
|
vblank_func = &drm_wait_vblank_noop;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fprintf(stderr, "Untested drm driver, use at your own risk!\n");
|
||||||
|
}
|
||||||
|
|
||||||
struct drm_mode_map_dumb mreq;
|
struct drm_mode_map_dumb mreq;
|
||||||
memset(&mreq, 0, sizeof(mreq));
|
memset(&mreq, 0, sizeof(mreq));
|
||||||
|
@ -436,10 +451,6 @@ int main(int argc, const char **argv)
|
||||||
mmap_size = open_arg.size;
|
mmap_size = open_arg.size;
|
||||||
mmap_offset = mreq.offset;
|
mmap_offset = mreq.offset;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
fprintf(stderr, "Unimplemented drm driver\n");
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
if (!mapped) {
|
if (!mapped) {
|
||||||
printf("mapping with size = %d, offset = %d, drmfd = %d\n", mmap_size, mmap_offset, drmfd);
|
printf("mapping with size = %d, offset = %d, drmfd = %d\n", mmap_size, mmap_offset, drmfd);
|
||||||
mapped = mmap(NULL, mmap_size, PROT_READ, MAP_SHARED, drmfd, mmap_offset);
|
mapped = mmap(NULL, mmap_size, PROT_READ, MAP_SHARED, drmfd, mmap_offset);
|
||||||
|
|
Loading…
Reference in a new issue