RK3566/RK3568 jpeg encoding + rga2 versioning issue

I am trying to use the integrated jpeg encoder on the rockchip. I have everything setup using the kernel from the debian build guide provided by Radxa.

gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! video/x-raw, format=NV12, width=640, height=480, framerate=15/1 ! mppjpegenc ! fakesink

From this rga2 complains about data being formatted incorrectly. In dmesg I have

[ 1.988980] rga2: Driver loaded successfully ver:3.2.63318
[ 1.992711] rga2: Module initialized.
[ 30.713193] rga2: unknown ioctl cmd!
[ 30.713590] rga2: req argument is inval

The last two entries there are from when I try and run this pipeline. Looking further into the driver it shows that the w,h of the destination is not initialized. Has anyone delt with this before? Maybe it is some problem with librga2?

If it helps I also had similar issues with the h264 encoder.