Commit e5a81ac7 authored by Eric Anholt's avatar Eric Anholt

broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.

Fixes black display in DRI due to storing to 0x00000000.
parent 314e9ee6
......@@ -348,6 +348,18 @@ vc5_bo_open_handle(struct vc5_screen *screen,
bo->name = "winsys";
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",
return NULL;
bo->offset = get.offset;
vc5_simulator_open_from_handle(screen->fd, winsys_stride,
bo->handle, bo->size);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment