VMP400 display calibration

When using the VMP400 touchscreen for the Raspberry Pi, any calibration config saved in /etc/X11/xorg.conf.d/99-calibration.conf may not be applied at all. Here’s the fix.
I’ve yet to find out how to output boot messages/kernel ring buffer to the display.

Test environment:
HW: Raspberry Pi 3 model B
OS: Raspbian 9 (stretch)
Kernel: 4.9.80-v7+
LCD-show v1.7-20180320
xinput-calibrator v0.7.5

Method used (from manual):
# git clone https://github.com/goodtft/LCD-show.git
# chmod -R 755 LCD-show
# cd LCD-show/
# ./LCD35-show

Rotate screen if required:
$ sed -i.bak -e '/dtoverlay=tft35a$/c\dtoverlay=tft35a:rotate=90' /boot/config.txt

Install xserver-xorg-input-evdev (to fix calibration not being applied properly):
$ sudo apt-get install xserver-xorg-input-evdev
$ sudo cp -r /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
$ sudo reboot
Note that this config should be loaded after libinput; 10-evdev.conf doesn’t do anything.

Finally, calibrate the display. It’s easier to do this via SSH because copying output on such a small display is a hassle.
$ DISPLAY=:0.0 xinput_calibrator

Do as xinput_calibrator tells in the terminal and copy its config to /etc/X11/xorg.conf.d/99-calibration.conf:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3967 247 187 3864"
Option "SwapAxes" "1"

I need SPI command for VMP400 display ( also SPI protocol-command for touchscreen ).
I will try to use that display for another application.

sincerely mico