Sachin Bhayare | eeb8889 | 2018-01-02 16:36:01 +0530 | [diff] [blame] | 1 | /* 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 | |
| 25 | struct 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 | |
| 32 | struct 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 | |
| 40 | struct mdss_mdp_wfd *mdss_mdp_wfd_init(struct device *device, |
| 41 | struct mdss_mdp_ctl *ctl); |
| 42 | |
| 43 | void mdss_mdp_wfd_deinit(struct mdss_mdp_wfd *wfd); |
| 44 | |
| 45 | int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd, |
| 46 | struct mdp_output_layer *layer); |
| 47 | |
| 48 | void mdss_mdp_wfd_destroy(struct mdss_mdp_wfd *wfd); |
| 49 | |
| 50 | struct mdss_mdp_wfd_data *mdss_mdp_wfd_add_data( |
| 51 | struct mdss_mdp_wfd *wfd, |
| 52 | struct mdp_output_layer *layer); |
| 53 | |
| 54 | void mdss_mdp_wfd_remove_data(struct mdss_mdp_wfd *wfd, |
| 55 | struct mdss_mdp_wfd_data *data); |
| 56 | |
| 57 | int mdss_mdp_wfd_validate(struct mdss_mdp_wfd *wfd, |
| 58 | struct mdp_output_layer *layer); |
| 59 | |
| 60 | int mdss_mdp_wfd_kickoff(struct mdss_mdp_wfd *wfd, |
| 61 | struct mdss_mdp_commit_cb *commit_cb); |
| 62 | |
| 63 | int mdss_mdp_wfd_commit_done(struct mdss_mdp_wfd *wfd); |
| 64 | |
| 65 | #endif |