Verdin Mini RPMSG-Lite Increase Buffer Size

256kB in comment in virtio_rpmsg_bus.c is totally misleading. Vring size isn’t multiple num_bufs * buf_size.
RPMSG_RING_SIZE is what fits vring size.

“Payload size”, if you meant RPMSG_BUF_SIZE, must using several tiny buffers from total amount of those tiny RPMSG_NUM_BUFS. Else 512*512 couldn’t fit 64k.

Yes, of course you have to change 0x8000. Please forget about misleading wrong number 256kB. It’s

Taking your own settings RPMSG_NUM_BUFS and RPMSG_BUF_SIZE, calculated RPMSG_RING_SIZE has to fit 20x8000=64k. And of course you new settings have to agree with device tree and M4 side settings for VRING starting addresses and VRING sizes.
For more or bigger buffers most likely you need to increase that magic 0x8000. On M4 this magic number is in VRING_SIZE define. Accordingly your adjacent M4 VDENx_VRING_BASE defines should differ by 2
VRING_SIZE.

1 Like