blob: e603c48bd71d35a8990a0a0d006600f0f80a9483 [file] [log] [blame]
Sachin Bhayareeeb88892018-01-02 16:36:01 +05301/* Copyright (c) 2015, 2018, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef __MDSS_MDP_WFD_H__
15#define __MDSS_MDP_WFD_H__
16
17#include <linux/sync.h>
18#include <linux/sw_sync.h>
19#include <linux/mutex.h>
20#include <linux/types.h>
21#include <linux/msm_mdp_ext.h>
22
23#include "mdss_mdp.h"
24
25struct mdss_mdp_wfd_data {
26 struct mdp_output_layer layer;
27 struct mdss_mdp_data data;
28 bool signal_required;
29 struct list_head next;
30};
31
32struct mdss_mdp_wfd {
33 struct mutex lock;
34 struct list_head data_queue;
35 struct mdss_mdp_ctl *ctl;
36 struct device *device;
37 struct completion comp;
38};
39
40struct mdss_mdp_wfd *mdss_mdp_wfd_init(struct device *device,
41 struct mdss_mdp_ctl *ctl);
42
43void mdss_mdp_wfd_deinit(struct mdss_mdp_wfd *wfd);
44
45int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd,
46 struct mdp_output_layer *layer);
47
48void mdss_mdp_wfd_destroy(struct mdss_mdp_wfd *wfd);
49
50struct mdss_mdp_wfd_data *mdss_mdp_wfd_add_data(
51 struct mdss_mdp_wfd *wfd,
52 struct mdp_output_layer *layer);
53
54void mdss_mdp_wfd_remove_data(struct mdss_mdp_wfd *wfd,
55 struct mdss_mdp_wfd_data *data);
56
57int mdss_mdp_wfd_validate(struct mdss_mdp_wfd *wfd,
58 struct mdp_output_layer *layer);
59
60int mdss_mdp_wfd_kickoff(struct mdss_mdp_wfd *wfd,
61 struct mdss_mdp_commit_cb *commit_cb);
62
63int mdss_mdp_wfd_commit_done(struct mdss_mdp_wfd *wfd);
64
65#endif