#include <drm/drm_print.h>
#include <linux/clk.h>
#include "komeda_dev.h"
#include "komeda_kms.h"
#include "komeda_pipeline.h"
#include "komeda_framebuffer.h"
static inline bool is_switching_user(void *old, void *new)
{ … }
static struct komeda_pipeline_state *
komeda_pipeline_get_state(struct komeda_pipeline *pipe,
struct drm_atomic_state *state)
{ … }
struct komeda_pipeline_state *
komeda_pipeline_get_old_state(struct komeda_pipeline *pipe,
struct drm_atomic_state *state)
{ … }
static struct komeda_pipeline_state *
komeda_pipeline_get_new_state(struct komeda_pipeline *pipe,
struct drm_atomic_state *state)
{ … }
static struct komeda_pipeline_state *
komeda_pipeline_get_state_and_set_crtc(struct komeda_pipeline *pipe,
struct drm_atomic_state *state,
struct drm_crtc *crtc)
{ … }
static struct komeda_component_state *
komeda_component_get_state(struct komeda_component *c,
struct drm_atomic_state *state)
{ … }
static struct komeda_component_state *
komeda_component_get_old_state(struct komeda_component *c,
struct drm_atomic_state *state)
{ … }
static struct komeda_component_state *
komeda_component_get_state_and_set_user(struct komeda_component *c,
struct drm_atomic_state *state,
void *user,
struct drm_crtc *crtc)
{ … }
static void
komeda_component_add_input(struct komeda_component_state *state,
struct komeda_component_output *input,
int idx)
{ … }
static int
komeda_component_check_input(struct komeda_component_state *state,
struct komeda_component_output *input,
int idx)
{ … }
static void
komeda_component_set_output(struct komeda_component_output *output,
struct komeda_component *comp,
u8 output_port)
{ … }
static int
komeda_component_validate_private(struct komeda_component *c,
struct komeda_component_state *st)
{ … }
static struct komeda_scaler *
komeda_component_get_avail_scaler(struct komeda_component *c,
struct drm_atomic_state *state)
{ … }
static void
komeda_rotate_data_flow(struct komeda_data_flow_cfg *dflow, u32 rot)
{ … }
static int
komeda_layer_check_cfg(struct komeda_layer *layer,
struct komeda_fb *kfb,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_layer_validate(struct komeda_layer *layer,
struct komeda_plane_state *kplane_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_wb_layer_validate(struct komeda_layer *wb_layer,
struct drm_connector_state *conn_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static bool scaling_ratio_valid(u32 size_in, u32 size_out,
u32 max_upscaling, u32 max_downscaling)
{ … }
static int
komeda_scaler_check_cfg(struct komeda_scaler *scaler,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_scaler_validate(void *user,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static void komeda_split_data_flow(struct komeda_scaler *scaler,
struct komeda_data_flow_cfg *dflow,
struct komeda_data_flow_cfg *l_dflow,
struct komeda_data_flow_cfg *r_dflow);
static int
komeda_splitter_validate(struct komeda_splitter *splitter,
struct drm_connector_state *conn_st,
struct komeda_data_flow_cfg *dflow,
struct komeda_data_flow_cfg *l_output,
struct komeda_data_flow_cfg *r_output)
{ … }
static int
komeda_merger_validate(struct komeda_merger *merger,
void *user,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *left_input,
struct komeda_data_flow_cfg *right_input,
struct komeda_data_flow_cfg *output)
{ … }
void pipeline_composition_size(struct komeda_crtc_state *kcrtc_st,
u16 *hsize, u16 *vsize)
{ … }
static int
komeda_compiz_set_input(struct komeda_compiz *compiz,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_compiz_validate(struct komeda_compiz *compiz,
struct komeda_crtc_state *state,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_improc_validate(struct komeda_improc *improc,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow)
{ … }
static int
komeda_timing_ctrlr_validate(struct komeda_timing_ctrlr *ctrlr,
struct komeda_crtc_state *kcrtc_st,
struct komeda_data_flow_cfg *dflow)
{ … }
void komeda_complete_data_flow_cfg(struct komeda_layer *layer,
struct komeda_data_flow_cfg *dflow,
struct drm_framebuffer *fb)
{ … }
static bool merger_is_available(struct komeda_pipeline *pipe,
struct komeda_data_flow_cfg *dflow)
{ … }
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)
{ … }
static void komeda_split_data_flow(struct komeda_scaler *scaler,
struct komeda_data_flow_cfg *dflow,
struct komeda_data_flow_cfg *l_dflow,
struct komeda_data_flow_cfg *r_dflow)
{ … }
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_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_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_build_display_data_flow(struct komeda_crtc *kcrtc,
struct komeda_crtc_state *kcrtc_st)
{ … }
static int
komeda_pipeline_unbound_components(struct komeda_pipeline *pipe,
struct komeda_pipeline_state *new)
{ … }
int komeda_release_unclaimed_resources(struct komeda_pipeline *pipe,
struct komeda_crtc_state *kcrtc_st)
{ … }
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)
{ … }