• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * vendor/amlogic/media/common/ge2d/ge2d_wq.h
3  *
4  * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef _GE2D_WQ_H_
19 #define _GE2D_WQ_H_
20 #ifdef CONFIG_AMLOGIC_ION
21 #include <ion/ion.h>
22 
23 extern struct ion_client *ge2d_ion_client;
24 #endif
25 
26 extern ssize_t work_queue_status_show(struct class *cla, struct class_attribute *attr, char *buf);
27 
28 extern ssize_t free_queue_status_show(struct class *cla, struct class_attribute *attr, char *buf);
29 
30 extern int ge2d_setup(int irq, struct reset_control *rstc);
31 extern int ge2d_wq_init(struct platform_device *pdev, int irq, struct clk *clk);
32 extern int ge2d_wq_deinit(void);
33 
34 int ge2d_buffer_alloc(struct ge2d_dmabuf_req_s *ge2d_req_buf);
35 int ge2d_buffer_free(int index);
36 int ge2d_buffer_export(struct ge2d_dmabuf_exp_s *ge2d_exp_buf);
37 void ge2d_buffer_dma_flush(int dma_fd);
38 void ge2d_buffer_cache_flush(int dma_fd);
39 void ge2d_pwr_config(bool enable);
40 #endif
41