/** komeda_component_funcs - component control functions */ struct komeda_component_funcs { /** @validate: optional, * component may has special requirements or limitations, this function * supply HW the ability to do the further HW specific check.
*/ int (*validate)(struct komeda_component *c, struct komeda_component_state *state); /** @update: update is a active update */ void (*update)(struct komeda_component *c, struct komeda_component_state *state); /** @disable: disable component */ void (*disable)(struct komeda_component *c); /** @dump_register: Optional, dump registers to seq_file */ void (*dump_register)(struct komeda_component *c, struct seq_file *seq);
};
/** * struct komeda_component * * struct komeda_component describe the data flow capabilities for how to link a * component into the display pipeline. * all specified components are subclass of this structure.
*/ struct komeda_component { /** @obj: treat component as private obj */ struct drm_private_obj obj; /** @pipeline: the komeda pipeline this component belongs to */ struct komeda_pipeline *pipeline; /** @name: component name */ char name[32]; /** * @reg: * component register base, * which is initialized by chip and used by chip only
*/
u32 __iomem *reg; /** @id: component id */
u32 id; /** * @hw_id: component hw id, * which is initialized by chip and used by chip only
*/
u32 hw_id;
/** * @max_active_inputs: * @max_active_outputs: * * maximum number of inputs/outputs that can be active at the same time * Note: * the number isn't the bit number of @supported_inputs or * @supported_outputs, but may be less than it, since component may not * support enabling all @supported_inputs/outputs at the same time.
*/
u8 max_active_inputs; /** @max_active_outputs: maximum number of outputs */
u8 max_active_outputs; /** * @supported_inputs: * @supported_outputs: * * bitmask of BIT(component->id) for the supported inputs/outputs, * describes the possibilities of how a component is linked into a * pipeline.
*/
u32 supported_inputs; /** @supported_outputs: bitmask of supported output componenet ids */
u32 supported_outputs;
/** * struct komeda_component_output * * a component has multiple outputs, if want to know where the data * comes from, only know the component is not enough, we still need to know * its output port
*/ struct komeda_component_output { /** @component: indicate which component the data comes from */ struct komeda_component *component; /** * @output_port: * the output port of the &komeda_component_output.component
*/
u8 output_port;
};
/** * struct komeda_component_state * * component_state is the data flow configuration of the component, and it's * the superclass of all specific component_state like @komeda_layer_state, * @komeda_scaler_state
*/ struct komeda_component_state { /** @obj: tracking component_state by drm_atomic_state */ struct drm_private_state obj; /** @component: backpointer to the component */ struct komeda_component *component; /** * @binding_user: * currently bound user, the user can be @crtc, @plane or @wb_conn, * which is valid decided by @component and @inputs * * - Layer: its user always is plane. * - compiz/improc/timing_ctrlr: the user is crtc. * - wb_layer: wb_conn; * - scaler: plane when input is layer, wb_conn if input is compiz.
*/ union { /** @crtc: backpointer for user crtc */ struct drm_crtc *crtc; /** @plane: backpointer for user plane */ struct drm_plane *plane; /** @wb_conn: backpointer for user wb_connector */ struct drm_connector *wb_conn; void *binding_user;
};
/** * @active_inputs: * * active_inputs is bitmask of @inputs index * * - active_inputs = changed_active_inputs | unchanged_active_inputs * - affected_inputs = old->active_inputs | new->active_inputs; * - disabling_inputs = affected_inputs ^ active_inputs; * - changed_inputs = disabling_inputs | changed_active_inputs; * * NOTE: * changed_inputs doesn't include all active_input but only * @changed_active_inputs, and this bitmask can be used in chip * level for dirty update.
*/
u16 active_inputs; /** @changed_active_inputs: bitmask of the changed @active_inputs */
u16 changed_active_inputs; /** @affected_inputs: bitmask for affected @inputs */
u16 affected_inputs; /** * @inputs: * * the specific inputs[i] only valid on BIT(i) has been set in * @active_inputs, if not the inputs[i] is undefined.
*/ struct komeda_component_output inputs[KOMEDA_COMPONENT_N_INPUTS];
};
struct komeda_layer { struct komeda_component base; /* accepted h/v input range before rotation */ struct malidp_range hsize_in, vsize_in;
u32 layer_type; /* RICH, SIMPLE or WB */
u32 line_sz;
u32 yuv_line_sz; /* maximum line size for YUV422 and YUV420 */
u32 supported_rots; /* komeda supports layer split which splits a whole image to two parts * left and right and handle them by two individual layer processors * Note: left/right are always according to the final display rect, * not the source buffer.
*/ struct komeda_layer *right;
};
/* Why define A separated structure but not use plane_state directly ? * 1. Komeda supports layer_split which means a plane_state can be split and * handled by two layers, one layer only handle half of plane image. * 2. Fix up the user properties according to HW's capabilities, like user * set rotation to R180, but HW only supports REFLECT_X+Y. the rot here is * after drm_rotation_simplify()
*/ struct komeda_data_flow_cfg { struct komeda_component_output input;
u16 in_x, in_y, in_w, in_h;
u32 out_x, out_y, out_w, out_h;
u16 total_in_h, total_in_w;
u16 total_out_w;
u16 left_crop, right_crop, overlap;
u32 rot; int blending_zorder;
u8 pixel_blend_mode, layer_alpha;
u8 en_scaling : 1,
en_img_enhancement : 1,
en_split : 1,
is_yuv : 1,
right_part : 1; /* right part of display image if split enabled */
};
struct komeda_pipeline_funcs { /* check if the aclk (main engine clock) can satisfy the clock * requirements of the downscaling that specified by dflow
*/ int (*downscaling_clk_check)(struct komeda_pipeline *pipe, struct drm_display_mode *mode, unsignedlong aclk_rate, struct komeda_data_flow_cfg *dflow); /* dump_register: Optional, dump registers to seq_file */ void (*dump_register)(struct komeda_pipeline *pipe, struct seq_file *sf);
};
/** * struct komeda_pipeline * * Represent a complete display pipeline and hold all functional components.
*/ struct komeda_pipeline { /** @obj: link pipeline as private obj of drm_atomic_state */ struct drm_private_obj obj; /** @mdev: the parent komeda_dev */ struct komeda_dev *mdev; /** @pxlclk: pixel clock */ struct clk *pxlclk; /** @id: pipeline id */ int id; /** @avail_comps: available components mask of pipeline */
u32 avail_comps; /** * @standalone_disabled_comps: * * When disable the pipeline, some components can not be disabled * together with others, but need a sparated and standalone disable. * The standalone_disabled_comps are the components which need to be * disabled standalone, and this concept also introduce concept of * two phase. * phase 1: for disabling the common components. * phase 2: for disabling the standalong_disabled_comps.
*/
u32 standalone_disabled_comps; /** @n_layers: the number of layer on @layers */ int n_layers; /** @layers: the pipeline layers */ struct komeda_layer *layers[KOMEDA_PIPELINE_MAX_LAYERS]; /** @n_scalers: the number of scaler on @scalers */ int n_scalers; /** @scalers: the pipeline scalers */ struct komeda_scaler *scalers[KOMEDA_PIPELINE_MAX_SCALERS]; /** @compiz: compositor */ struct komeda_compiz *compiz; /** @splitter: for split the compiz output to two half data flows */ struct komeda_splitter *splitter; /** @merger: merger */ struct komeda_merger *merger; /** @wb_layer: writeback layer */ struct komeda_layer *wb_layer; /** @improc: post image processor */ struct komeda_improc *improc; /** @ctrlr: timing controller */ struct komeda_timing_ctrlr *ctrlr; /** @funcs: chip private pipeline functions */ conststruct komeda_pipeline_funcs *funcs;
/** @of_node: pipeline dt node */ struct device_node *of_node; /** @of_output_port: pipeline output port */ struct device_node *of_output_port; /** @of_output_links: output connector device nodes */ struct device_node *of_output_links[2]; /** @dual_link: true if of_output_links[0] and [1] are both valid */ bool dual_link;
};
/** * struct komeda_pipeline_state * * NOTE: * Unlike the pipeline, pipeline_state doesn’t gather any component_state * into it. It because all component will be managed by drm_atomic_state.
*/ struct komeda_pipeline_state { /** @obj: tracking pipeline_state by drm_atomic_state */ struct drm_private_state obj; /** @pipe: backpointer to the pipeline */ struct komeda_pipeline *pipe; /** @crtc: currently bound crtc */ struct drm_crtc *crtc; /** * @active_comps: * * bitmask - BIT(component->id) of active components
*/
u32 active_comps;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.