Commit 1837379e authored by Laurent Pinchart's avatar Laurent Pinchart

v4l: vsp1: Add support for multiple DRM pipelines

The R-Car H3 ES2.0 VSP-DL instance has two LIF entities and can drive
two display pipelines at the same time. Refactor the VSP DRM code to
support that by introducing a vsp_drm_pipeline object that models one
display pipeline.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 3be0bf97
This diff is collapsed.
...@@ -18,32 +18,41 @@ ...@@ -18,32 +18,41 @@
#include "vsp1_pipe.h" #include "vsp1_pipe.h"
/** /**
* vsp1_drm - State for the API exposed to the DRM driver * vsp1_drm_pipeline - State for the API exposed to the DRM driver
* @pipe: the VSP1 pipeline used for display * @pipe: the VSP1 pipeline used for display
* @num_inputs: number of active pipeline inputs at the beginning of an update * @enabled: pipeline state at the beginning of an update
* @inputs: source crop rectangle, destination compose rectangle and z-order
* position for every input
* @du_complete: frame completion callback for the DU driver (optional) * @du_complete: frame completion callback for the DU driver (optional)
* @du_private: data to be passed to the du_complete callback * @du_private: data to be passed to the du_complete callback
*/ */
struct vsp1_drm { struct vsp1_drm_pipeline {
struct vsp1_pipeline pipe; struct vsp1_pipeline pipe;
unsigned int num_inputs; bool enabled;
/* Frame synchronisation */
void (*du_complete)(void *);
void *du_private;
};
/**
* vsp1_drm - State for the API exposed to the DRM driver
* @pipe: the VSP1 DRM pipeline used for display
* @inputs: source crop rectangle, destination compose rectangle and z-order
* position for every input (indexed by RPF index)
*/
struct vsp1_drm {
struct vsp1_drm_pipeline pipe[VSP1_MAX_LIF];
struct { struct {
bool enabled;
struct v4l2_rect crop; struct v4l2_rect crop;
struct v4l2_rect compose; struct v4l2_rect compose;
unsigned int zpos; unsigned int zpos;
} inputs[VSP1_MAX_RPF]; } inputs[VSP1_MAX_RPF];
/* Frame synchronisation */
void (*du_complete)(void *);
void *du_private;
}; };
static inline struct vsp1_drm *to_vsp1_drm(struct vsp1_pipeline *pipe) static inline struct vsp1_drm_pipeline *
to_vsp1_drm_pipeline(struct vsp1_pipeline *pipe)
{ {
return container_of(pipe, struct vsp1_drm, pipe); return container_of(pipe, struct vsp1_drm_pipeline, pipe);
} }
int vsp1_drm_init(struct vsp1_device *vsp1); int vsp1_drm_init(struct vsp1_device *vsp1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment