summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_drm.h
blob: 5ef32cff96016c3e18e8c6499d7271ac9ec1e91a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * 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__

#include "vsp1_dl.h"
#include "vsp1_pipe.h"

/**
 * 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
 * @update: the pipeline configuration has been updated
 * @dlm: display list manager used for DRM operation
 */
struct vsp1_drm {
	struct vsp1_pipeline pipe;
	unsigned int num_inputs;
	bool update;
	struct vsp1_dl_manager dlm;
};

int vsp1_drm_init(struct vsp1_device *vsp1);
void vsp1_drm_cleanup(struct vsp1_device *vsp1);
int vsp1_drm_create_links(struct vsp1_device *vsp1);

static inline void vsp1_drm_display_start(struct vsp1_device *vsp1)
{
	vsp1_dlm_irq_display_start(&vsp1->drm->dlm);
}

#endif /* __VSP1_DRM_H__ */