Double rendering - no. Magic Lantern menus worked fine on my own layer on HDMI output of EOS R.
Maybe your buffers overlap or something?
Part of layer definition structure in XimrContext contains offsets that are cut off from full buffer (not rendered) and layer offset (move "0,0" somewhere else on screen). See
XimrSetLayerDimensions:
src_x, src_y, src_w, src_h is region from buffer that will be rendered. Everything outside this region is just not visible (not rendered / transparent). This will "crop" potential junk that you don't want to be visible.
dst_x, dst_y is offset in output buffer where 0,0 from input layer will be rendered. With that you can move output horizontally and vertically.
Additionally, somewhere in XimrContext structure there is scaling ratio (or really two ratios - horizontal and vertical) set. Those apply to all layers and are used to up/downscale from layers to output buffer. This is set once per XimrContext, so it applies to all layers at once - thus as long as you alter Canon generated XimrContext this should be fine.
All those params change for each output type. They are different for LCD, HDMI, EVF (or in general per output YUV resolution). So when switched to HDMI, you would need to update both crop region and offsets to probably something like (0,0, buf_w, buf_h),(0,0) to both properly start buffer from 0,0 and tell Zico to render whole buffer content.
For horizontal shift there maybe an issue with buffer memory alignment - i touched that topic in my writeup, I had to memory-align buffers on Digic 7 to 256 blocks - see my PoC from chapter 1.2
But if this would be the issue, you would get a random shift on every boot / buffer allocation unless your method of malloc returns the same address every time
