• Suman Anna's avatar
    rpmsg: use less buffers when vrings are small · b1b98914
    Suman Anna authored
    Adjust the number of rpmsg buffers to rely on the size of the
    vring, instead of using the hard coded value of 512 (256 per
    direction).
    
    This is needed when small vrings are being used, where 256
    buffers are too much to fit in a vring.
    
    While considering the vring size, keep using the 512 hard coded
    value as an upper limit to avoid wacky resource tables consuming
    unreasonable amount of memory.
    
    NOTE: The number of buffers is already assumed to be symmetrical
    in each direction, and that logic is unchanged.
    Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
    [edit commit message, small code and comment simplification]
    Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
    b1b98914
virtio_rpmsg_bus.c 31.4 KB