drm/sun4i: frontend: Add proper definitions for format registers
This introduces proper definitions for the input and output format configuration registers instead of a macro and raw values in the code, with the intent to increase code readability and reduce indirections. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-19-paul.kocialkowski@bootlin.com
此提交包含在:
@@ -26,12 +26,12 @@
|
||||
#define SUN4I_FRONTEND_LINESTRD0_REG 0x040
|
||||
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_REG 0x04c
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_DATA_MOD(mod) ((mod) << 8)
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_DATA_FMT(fmt) ((fmt) << 4)
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_PS(ps) (ps)
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED (1 << 8)
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB (5 << 4)
|
||||
#define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_XRGB 1
|
||||
|
||||
#define SUN4I_FRONTEND_OUTPUT_FMT_REG 0x05c
|
||||
#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT(fmt) (fmt)
|
||||
#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888 2
|
||||
|
||||
#define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100
|
||||
#define SUN4I_FRONTEND_INSIZE(h, w) ((((h) - 1) << 16) | (((w) - 1)))
|
||||
|
新增問題並參考
封鎖使用者