Remove obsolete code
Extract register macros
Support RGB/BGR panel