aboutsummaryrefslogtreecommitdiff
path: root/include/video/mcde.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/video/mcde.h')
-rw-r--r--include/video/mcde.h90
1 files changed, 41 insertions, 49 deletions
diff --git a/include/video/mcde.h b/include/video/mcde.h
index 1c1e4525c1a..6bdf792f779 100644
--- a/include/video/mcde.h
+++ b/include/video/mcde.h
@@ -118,28 +118,45 @@ enum mcde_sync_src {
MCDE_SYNCSRC_EXT = 4, /* GPIO, or other outside MCDE control */
};/* REVIEW: Remove _EXT, not supported */
-struct mcde_col_conv {/* REVIEW: Generalize matrix, or include YCbCR->RGB in name */
- u16 yr_red;
- u16 yr_green;
- u16 yr_blue;
- u16 cr_red;
- u16 cr_green;
- u16 cr_blue;
- u16 cb_red;
- u16 cb_green;
- u16 cb_blue;
- u16 offset_red;
- u16 offset_green;
- u16 offset_blue;
+/* Interface pixel formats (output) */
+/* REVIEW: Define formats */
+enum mcde_port_pix_fmt {
+ /* MIPI standard formats */
+ MCDE_PORTPIXFMT_DBI_3BPP = 0x11,/* REVIEW: Remove */
+ MCDE_PORTPIXFMT_DBI_8BPP = 0x12,/* REVIEW: Remove */
+ MCDE_PORTPIXFMT_DBI_12BPP = 0x13,/* REVIEW: Remove */
+ MCDE_PORTPIXFMT_DBI_16BPP = 0x15,/* REVIEW: Remove */
+ MCDE_PORTPIXFMT_DBI_18BPP = 0x16,/* REVIEW: Remove */
+ MCDE_PORTPIXFMT_DBI_24BPP = 0x17,/* REVIEW: Remove */
+
+ MCDE_PORTPIXFMT_DPI_16BPP_C1 = 0x21,
+ MCDE_PORTPIXFMT_DPI_16BPP_C2 = 0x22,
+ MCDE_PORTPIXFMT_DPI_16BPP_C3 = 0x23,
+ MCDE_PORTPIXFMT_DPI_18BPP_C1 = 0x24,
+ MCDE_PORTPIXFMT_DPI_18BPP_C2 = 0x25,
+ MCDE_PORTPIXFMT_DPI_24BPP = 0x26,
+
+ MCDE_PORTPIXFMT_DSI_16BPP = 0x31,
+ MCDE_PORTPIXFMT_DSI_18BPP = 0x32,
+ MCDE_PORTPIXFMT_DSI_18BPP_PACKED = 0x33,
+ MCDE_PORTPIXFMT_DSI_24BPP = 0x34,
+
+ /* Custom formats */
+ MCDE_PORTPIXFMT_DSI_YCBCR422 = 0x40,
+};
+
+struct mcde_col_convert {
+ u16 matrix[3][3];
+ u16 offset[3];
};
struct mcde_port {
enum mcde_port_type type;
enum mcde_port_mode mode;
+ enum mcde_port_pix_fmt pixel_format;
u8 ifc;
u8 link;
enum mcde_sync_src sync_src;
- struct mcde_col_conv *col_conv;/* REVIEW: Remove, not port */
bool update_auto_trig;
union {
struct {
@@ -165,33 +182,6 @@ enum mcde_ovly_pix_fmt {
MCDE_OVLYPIXFMT_YCbCr422 = 7,/* REVIEW: Capitalize */
};
-/* Interface pixel formats (output) */
-/* REVIEW: Define formats */
-enum mcde_port_pix_fmt {
- /* MIPI standard formats */
- MCDE_PORTPIXFMT_DBI_3BPP = 0x11,/* REVIEW: Remove */
- MCDE_PORTPIXFMT_DBI_8BPP = 0x12,/* REVIEW: Remove */
- MCDE_PORTPIXFMT_DBI_12BPP = 0x13,/* REVIEW: Remove */
- MCDE_PORTPIXFMT_DBI_16BPP = 0x15,/* REVIEW: Remove */
- MCDE_PORTPIXFMT_DBI_18BPP = 0x16,/* REVIEW: Remove */
- MCDE_PORTPIXFMT_DBI_24BPP = 0x17,/* REVIEW: Remove */
-
- MCDE_PORTPIXFMT_DPI_16BPP_C1 = 0x21,
- MCDE_PORTPIXFMT_DPI_16BPP_C2 = 0x22,
- MCDE_PORTPIXFMT_DPI_16BPP_C3 = 0x23,
- MCDE_PORTPIXFMT_DPI_18BPP_C1 = 0x24,
- MCDE_PORTPIXFMT_DPI_18BPP_C2 = 0x25,
- MCDE_PORTPIXFMT_DPI_24BPP = 0x26,
-
- MCDE_PORTPIXFMT_DSI_16BPP = 0x31,
- MCDE_PORTPIXFMT_DSI_18BPP = 0x32,
- MCDE_PORTPIXFMT_DSI_18BPP_PACKED = 0x33,
- MCDE_PORTPIXFMT_DSI_24BPP = 0x34,
-
- /* Custom formats */
- MCDE_PORTPIXFMT_DSI_YCBCR422 = 0x40,
-};
-
/* Display power modes */
enum mcde_display_power_mode {
MCDE_DISPLAY_PM_OFF = 0, /* Power off */
@@ -264,20 +254,22 @@ struct mcde_overlay {
struct mcde_chnl_state;
struct mcde_chnl_state *mcde_chnl_get(enum mcde_chnl chnl_id,
- enum mcde_fifo fifo, const struct mcde_port *port);
+ enum mcde_fifo fifo, const struct mcde_port *port);
int mcde_chnl_set_pixel_format(struct mcde_chnl_state *chnl,
- enum mcde_port_pix_fmt pix_fmt);
+ enum mcde_port_pix_fmt pix_fmt);
+void mcde_chnl_set_col_convert(struct mcde_chnl_state *chnl,
+ struct mcde_col_convert *col_convert);
int mcde_chnl_set_video_mode(struct mcde_chnl_state *chnl,
- struct mcde_video_mode *vmode);
+ struct mcde_video_mode *vmode);
/* TODO: Remove rotbuf* parameters */
int mcde_chnl_set_rotation(struct mcde_chnl_state *chnl,
- enum mcde_display_rotation rotation, u32 rotbuf1, u32 rotbuf2);
+ enum mcde_display_rotation rotation, u32 rotbuf1, u32 rotbuf2);
int mcde_chnl_enable_synchronized_update(struct mcde_chnl_state *chnl,
- bool enable);
-int mcde_chnl_apply(struct mcde_chnl_state* chnl);
-int mcde_chnl_update(struct mcde_chnl_state* chnl,
+ bool enable);
+int mcde_chnl_apply(struct mcde_chnl_state *chnl);
+int mcde_chnl_update(struct mcde_chnl_state *chnl,
struct mcde_rectangle *update_area);
-void mcde_chnl_put(struct mcde_chnl_state* chnl);
+void mcde_chnl_put(struct mcde_chnl_state *chnl);
/* MCDE overlay */
struct mcde_ovly_state;