2 * Copyright (C) 2013 Google, Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
15 #ifndef _VIDEO_ADF_CLIENT_H_
16 #define _VIDEO_ADF_CLIENT_H_
18 #include <video/adf.h>
20 int adf_interface_blank(struct adf_interface *intf, u8 state);
21 u8 adf_interface_dpms_state(struct adf_interface *intf);
23 void adf_interface_current_mode(struct adf_interface *intf,
24 struct drm_mode_modeinfo *mode);
25 size_t adf_interface_modelist(struct adf_interface *intf,
26 struct drm_mode_modeinfo *modelist, size_t n_modes);
27 int adf_interface_set_mode(struct adf_interface *intf,
28 struct drm_mode_modeinfo *mode);
29 int adf_interface_get_screen_size(struct adf_interface *intf, u16 *width,
31 int adf_interface_simple_buffer_alloc(struct adf_interface *intf, u16 w, u16 h,
32 u32 format, struct dma_buf **dma_buf, u32 *offset, u32 *pitch);
33 struct sync_fence *adf_interface_simple_post(struct adf_interface *intf,
34 struct adf_buffer *buf);
36 bool adf_overlay_engine_supports_format(struct adf_overlay_engine *eng,
39 size_t adf_device_attachments(struct adf_device *dev,
40 struct adf_attachment *attachments, size_t n_attachments);
41 size_t adf_device_attachments_allowed(struct adf_device *dev,
42 struct adf_attachment *attachments, size_t n_attachments);
43 bool adf_device_attached(struct adf_device *dev, struct adf_overlay_engine *eng,
44 struct adf_interface *intf);
45 bool adf_device_attach_allowed(struct adf_device *dev,
46 struct adf_overlay_engine *eng, struct adf_interface *intf);
47 int adf_device_attach(struct adf_device *dev, struct adf_overlay_engine *eng,
48 struct adf_interface *intf);
49 int adf_device_detach(struct adf_device *dev, struct adf_overlay_engine *eng,
50 struct adf_interface *intf);
52 struct sync_fence *adf_device_post(struct adf_device *dev,
53 struct adf_interface **intfs, size_t n_intfs,
54 struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
55 size_t custom_data_size);
56 struct sync_fence *adf_device_post_nocopy(struct adf_device *dev,
57 struct adf_interface **intfs, size_t n_intfs,
58 struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
59 size_t custom_data_size);
61 #endif /* _VIDEO_ADF_CLIENT_H_ */