aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i/sun4i_frontend.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_frontend.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_frontend.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.h b/drivers/gpu/drm/sun4i/sun4i_frontend.h
index 02661ce81f3e..ad146e8d8d70 100644
--- a/drivers/gpu/drm/sun4i/sun4i_frontend.h
+++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h
@@ -26,12 +26,14 @@
26#define SUN4I_FRONTEND_LINESTRD0_REG 0x040 26#define SUN4I_FRONTEND_LINESTRD0_REG 0x040
27 27
28#define SUN4I_FRONTEND_INPUT_FMT_REG 0x04c 28#define SUN4I_FRONTEND_INPUT_FMT_REG 0x04c
29#define SUN4I_FRONTEND_INPUT_FMT_DATA_MOD(mod) ((mod) << 8) 29#define SUN4I_FRONTEND_INPUT_FMT_DATA_MOD_PACKED (1 << 8)
30#define SUN4I_FRONTEND_INPUT_FMT_DATA_FMT(fmt) ((fmt) << 4) 30#define SUN4I_FRONTEND_INPUT_FMT_DATA_FMT_RGB (5 << 4)
31#define SUN4I_FRONTEND_INPUT_FMT_PS(ps) (ps) 31#define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_BGRX 0
32#define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_XRGB 1
32 33
33#define SUN4I_FRONTEND_OUTPUT_FMT_REG 0x05c 34#define SUN4I_FRONTEND_OUTPUT_FMT_REG 0x05c
34#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT(fmt) (fmt) 35#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888 1
36#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888 2
35 37
36#define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100 38#define SUN4I_FRONTEND_CH0_INSIZE_REG 0x100
37#define SUN4I_FRONTEND_INSIZE(h, w) ((((h) - 1) << 16) | (((w) - 1))) 39#define SUN4I_FRONTEND_INSIZE(h, w) ((((h) - 1) << 16) | (((w) - 1)))
@@ -95,5 +97,6 @@ void sun4i_frontend_update_coord(struct sun4i_frontend *frontend,
95 struct drm_plane *plane); 97 struct drm_plane *plane);
96int sun4i_frontend_update_formats(struct sun4i_frontend *frontend, 98int sun4i_frontend_update_formats(struct sun4i_frontend *frontend,
97 struct drm_plane *plane, uint32_t out_fmt); 99 struct drm_plane *plane, uint32_t out_fmt);
100bool sun4i_frontend_format_is_supported(uint32_t fmt, uint64_t modifier);
98 101
99#endif /* _SUN4I_FRONTEND_H_ */ 102#endif /* _SUN4I_FRONTEND_H_ */