npu is a separate layer, but it needs RGB888 buf.
Here is the relevant code you can test.
Pass a dma buf to be converted to buf.
src: DRM_FORMAT_NV12_10 / DRM_FORMAT_NV15 and DRM_FORMAT_NV16 (aka YCbCr_420_SP_10B and YCbCr_422_SP)
dst: RK_FORMAT_RGB_888
make this work and we are good to go with H265 and 10bit
static int drm_rga_buf(int src_Width, int src_Height, int src_fd, int src_format, int dst_Width, int dst_Height, int dst_format, int frameSize, char *buf)
{
rga_info_t src;
rga_info_t dst;
int ret;
int hStride = (src_Height + 15) & (~15);
int wStride = (src_Width + 15) & (~15);
//int dhStride = (dst_Height + 15) & (~15);
//int dwStride = (dst_Width + 15) & (~15);
memset(&src, 0, sizeof(rga_info_t));
src.fd = src_fd;
src.mmuFlag = 1;
memset(&dst, 0, sizeof(rga_info_t));
dst.fd = -1;
dst.virAddr = buf;
dst.mmuFlag = 1;
rga_set_rect(&src.rect, 0, 0, src_Width, src_Height, wStride, hStride, src_format);
rga_set_rect(&dst.rect, 0, 0, dst_Width, dst_Height, dst_Width, dst_Height, dst_format);
ret = c_RkRgaBlit(&src, &dst, NULL);
return ret;
}