Changing HDMI resolution on M2-ZERO-V1.0

I am using BPI M2-zero with the latest raspbian os available for bpi-M2-zero . I need to connect it to a 3.5 inch display using hdmi cable for which I need a resolution of 480x320 . Also in BPI-M2 I found only one image file under /usr/lib/u-boot/bananapi/bpi-m2z which is BPI-M2Z-720P-linux4.4-8k.img.gz. How can I get other image files to achieve different resolutions on a raspbian os.

Thank you .

refer to this commit

https://github.com/BPI-SINOVOIP/BPI-M2P-bsp-4.4/commit/32517b7d9b7ad2b93d93942a3e0214505bd93e23

and porting your hdmi display

Hello August,

Thank you for your reply.

I tried to look for the file disp_display.c under /lib/modules/4.4.55-BPI-M2Z-Kernel but I could not find any folder for video .

Am I supposed to create these .c or .h files on my Bpi or else how am I supposed to build it . Also should I look into other kernel versions available for raspbian os to solve this issue .

source code https://github.com/BPI-SINOVOIP/BPI-M2P-bsp-4.4/