NvBufferTransform() on NvDrmFB

NvDrmRenderer* r = NvDrmRenderer::createDrmRenderer(...);
NvDrmFB ui_fb[2];  
uint32_t w = 1920;
uint32_t h = 1080;
r->createDumbFB(w, h, DRM_FORMAT_ARGB8888, &ui_fb[0]);
r->createDumbFB(w, h, DRM_FORMAT_ARGB8888, &ui_fb[1]);
NvBufferTransformParams transform_params;
// Setup params...

int ret = NvBufferTransform(ui_fb[0].bo->bo_handle, ui_fb[1].bo->bo_handle, &params);

I.e. I would like to do a transform on frame buffers created by NvDrmRenderer::createDumbFB(). When running the above code I get the error:

dmabuf_fd 4000 mapped entry not found

I guess that the frame buffer must be mapped for DMA, but I cannot find any example on how to map a NvDrmFB and from other examples, such as;

ret = NvBufferCreateEx(&source_dmabuf_fd, &input_params);

it is not clear to me how to do this for a NvDrmFB. How do I setup NvDrmFB for use with NvBufferTransform()?

Hi,
This function calls are not supported. Please create NvBuffer, call NvBufferTransform(), and render NvBuffer.

How do I render the transformed NvBuffer to a plane?

I have been using:

NvDrmRenderer::setPlane(uint32_t pl_index, uint32_t fb_id, ...);

But with a NvBuffer I do not have a fb_id. I am using it to provide an overlay on top of other graphics and do not want to render to plane 0.

Looking at NvDrmRenderer.cpp I find the private method:

NvDrmRenderer::renderInternal(int fd){ ... }

and perhaps adding a public method:

NvDrmRenderer::render(int fd, int plane){ ... }

would facilitate this use-case?