#ifndef _KOMEDA_PIPELINE_H_
#define _KOMEDA_PIPELINE_H_
#include <linux/types.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include "malidp_utils.h"
#include "komeda_color_mgmt.h"
#define KOMEDA_MAX_PIPELINES …
#define KOMEDA_PIPELINE_MAX_LAYERS …
#define KOMEDA_PIPELINE_MAX_SCALERS …
#define KOMEDA_COMPONENT_N_INPUTS …
enum { … };
#define KOMEDA_PIPELINE_LAYERS …
#define KOMEDA_PIPELINE_SCALERS …
#define KOMEDA_PIPELINE_COMPIZS …
#define KOMEDA_PIPELINE_IMPROCS …
struct komeda_component;
struct komeda_component_state;
struct komeda_component_funcs { … };
struct komeda_component { … };
struct komeda_component_output { … };
struct komeda_component_state { … };
static inline u16 component_disabling_inputs(struct komeda_component_state *st)
{ … }
static inline u16 component_changed_inputs(struct komeda_component_state *st)
{ … }
#define for_each_changed_input(st, i) …
#define to_comp(__c) …
#define to_cpos(__c) …
struct komeda_layer { … };
struct komeda_layer_state { … };
struct komeda_scaler { … };
struct komeda_scaler_state { … };
struct komeda_compiz { … };
struct komeda_compiz_input_cfg { … };
struct komeda_compiz_state { … };
struct komeda_merger { … };
struct komeda_merger_state { … };
struct komeda_splitter { … };
struct komeda_splitter_state { … };
struct komeda_improc { … };
struct komeda_improc_state { … };
struct komeda_timing_ctrlr { … };
struct komeda_timing_ctrlr_state { … };
struct komeda_data_flow_cfg { … };
struct komeda_pipeline_funcs { … };
struct komeda_pipeline { … };
struct komeda_pipeline_state { … };
#define to_layer(c) …
#define to_compiz(c) …
#define to_scaler(c) …
#define to_splitter(c) …
#define to_merger(c) …
#define to_improc(c) …
#define to_ctrlr(c) …
#define to_layer_st(c) …
#define to_compiz_st(c) …
#define to_scaler_st(c) …
#define to_splitter_st(c) …
#define to_merger_st(c) …
#define to_improc_st(c) …
#define to_ctrlr_st(c) …
#define priv_to_comp_st(o) …
#define priv_to_pipe_st(o) …
struct komeda_pipeline *
komeda_pipeline_add(struct komeda_dev *mdev, size_t size,
const struct komeda_pipeline_funcs *funcs);
void komeda_pipeline_destroy(struct komeda_dev *mdev,
struct komeda_pipeline *pipe);
struct komeda_pipeline *
komeda_pipeline_get_slave(struct komeda_pipeline *master);
int komeda_assemble_pipelines(struct komeda_dev *mdev);
struct komeda_component *
komeda_pipeline_get_component(struct komeda_pipeline *pipe, int id);
struct komeda_component *
komeda_pipeline_get_first_component(struct komeda_pipeline *pipe,
u32 comp_mask);
void komeda_pipeline_dump_register(struct komeda_pipeline *pipe,
struct seq_file *sf);
extern __printf(10, 11)
struct komeda_component *
komeda_component_add(struct komeda_pipeline *pipe,
size_t comp_sz, u32 id, u32 hw_id,
const struct komeda_component_funcs *funcs,
u8 max_active_inputs, u32 supported_inputs,
u8 max_active_outputs, u32 __iomem *reg,
const char *name_fmt, ...);
void komeda_component_destroy(struct komeda_dev *mdev,
struct komeda_component *c);
static inline struct komeda_component *
komeda_component_pickup_output(struct komeda_component *c, u32 avail_comps)
{ … }
struct komeda_plane_state;
struct komeda_crtc_state;
struct komeda_crtc;
void pipeline_composition_size(struct komeda_crtc_state *kcrtc_st,
u16 *hsize, u16 *vsize);
int komeda_build_layer_data_flow(struct komeda_layer *layer,
struct komeda_plane_state *kplane_st,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow);
int komeda_build_wb_data_flow(struct komeda_layer *wb_layer,
struct drm_connector_state *conn_st,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow);
int komeda_build_display_data_flow(struct komeda_crtc *kcrtc,
struct komeda_crtc_state *kcrtc_st);
int komeda_build_layer_split_data_flow(struct komeda_layer *left,
struct komeda_plane_state *kplane_st,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow);
int komeda_build_wb_split_data_flow(struct komeda_layer *wb_layer,
struct drm_connector_state *conn_st,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow);
int komeda_release_unclaimed_resources(struct komeda_pipeline *pipe,
struct komeda_crtc_state *kcrtc_st);
struct komeda_pipeline_state *
komeda_pipeline_get_old_state(struct komeda_pipeline *pipe,
struct drm_atomic_state *state);
bool komeda_pipeline_disable(struct komeda_pipeline *pipe,
struct drm_atomic_state *old_state);
void komeda_pipeline_update(struct komeda_pipeline *pipe,
struct drm_atomic_state *old_state);
void komeda_complete_data_flow_cfg(struct komeda_layer *layer,
struct komeda_data_flow_cfg *dflow,
struct drm_framebuffer *fb);
#endif