2015-08-03 05:37:01 +08:00
|
|
|
/*
|
|
|
|
* vsp1_drm.h -- R-Car VSP1 DRM/KMS Interface
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Renesas Electronics Corporation
|
|
|
|
*
|
|
|
|
* Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
#ifndef __VSP1_DRM_H__
|
|
|
|
#define __VSP1_DRM_H__
|
|
|
|
|
2016-03-24 16:15:59 +08:00
|
|
|
#include <linux/videodev2.h>
|
|
|
|
|
2015-08-03 05:37:01 +08:00
|
|
|
#include "vsp1_pipe.h"
|
|
|
|
|
2015-09-10 20:28:39 +08:00
|
|
|
/**
|
|
|
|
* vsp1_drm - State for the API exposed to the DRM driver
|
|
|
|
* @pipe: the VSP1 pipeline used for display
|
|
|
|
* @num_inputs: number of active pipeline inputs at the beginning of an update
|
2016-03-24 16:15:59 +08:00
|
|
|
* @planes: source crop rectangle, destination compose rectangle and z-order
|
|
|
|
* position for every input
|
2015-09-10 20:28:39 +08:00
|
|
|
*/
|
2015-08-03 05:37:01 +08:00
|
|
|
struct vsp1_drm {
|
|
|
|
struct vsp1_pipeline pipe;
|
2015-09-10 20:28:39 +08:00
|
|
|
unsigned int num_inputs;
|
2016-03-24 16:15:59 +08:00
|
|
|
struct {
|
|
|
|
bool enabled;
|
|
|
|
struct v4l2_rect crop;
|
|
|
|
struct v4l2_rect compose;
|
|
|
|
unsigned int zpos;
|
|
|
|
} inputs[VSP1_MAX_RPF];
|
2015-08-03 05:37:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int vsp1_drm_init(struct vsp1_device *vsp1);
|
2015-09-07 12:40:25 +08:00
|
|
|
void vsp1_drm_cleanup(struct vsp1_device *vsp1);
|
2015-08-03 05:37:01 +08:00
|
|
|
int vsp1_drm_create_links(struct vsp1_device *vsp1);
|
|
|
|
|
2015-11-15 08:27:52 +08:00
|
|
|
void vsp1_drm_display_start(struct vsp1_device *vsp1);
|
2015-11-09 06:06:57 +08:00
|
|
|
|
2015-08-03 05:37:01 +08:00
|
|
|
#endif /* __VSP1_DRM_H__ */
|