broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.
Fixes black display in DRI due to storing to 0x00000000.
This commit is contained in:
parent
314e9ee6c4
commit
e5a81ac704
|
@ -348,6 +348,18 @@ vc5_bo_open_handle(struct vc5_screen *screen,
|
||||||
bo->name = "winsys";
|
bo->name = "winsys";
|
||||||
bo->private = false;
|
bo->private = false;
|
||||||
|
|
||||||
|
struct drm_vc5_get_bo_offset get = {
|
||||||
|
.handle = handle,
|
||||||
|
};
|
||||||
|
int ret = vc5_ioctl(screen->fd, DRM_IOCTL_VC5_GET_BO_OFFSET, &get);
|
||||||
|
if (ret) {
|
||||||
|
fprintf(stderr, "Failed to get BO offset: %s\n",
|
||||||
|
strerror(errno));
|
||||||
|
free(bo);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
bo->offset = get.offset;
|
||||||
|
|
||||||
#ifdef USE_VC5_SIMULATOR
|
#ifdef USE_VC5_SIMULATOR
|
||||||
vc5_simulator_open_from_handle(screen->fd, winsys_stride,
|
vc5_simulator_open_from_handle(screen->fd, winsys_stride,
|
||||||
bo->handle, bo->size);
|
bo->handle, bo->size);
|
||||||
|
|
Loading…
Reference in New Issue