android_kernel_samsung_msm8976/include/video/adf_client.h
Greg Hackmann 480da3d350 video: adf: support "simple" buffers
Simple buffers are linear RGB buffers analogous to KMS's dumb buffers.
Simple buffers can be allocated and posted to a display interface
without any driver-private data.

Internally, ADF drivers provide the driver-private data needed (if any)
to post a simple buffer to the display.

Change-Id: Ib0b737622eaf343111310f6623f99d69cf3807d2
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Git-commit: b07062e41853a8096096d3a75767b955e13a57bb
Git-Repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-06-13 12:05:31 -07:00

62 lines
2.5 KiB
C

/*
* Copyright (C) 2013 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _VIDEO_ADF_CLIENT_H_
#define _VIDEO_ADF_CLIENT_H_
#include <video/adf.h>
int adf_interface_blank(struct adf_interface *intf, u8 state);
u8 adf_interface_dpms_state(struct adf_interface *intf);
void adf_interface_current_mode(struct adf_interface *intf,
struct drm_mode_modeinfo *mode);
size_t adf_interface_modelist(struct adf_interface *intf,
struct drm_mode_modeinfo *modelist, size_t n_modes);
int adf_interface_set_mode(struct adf_interface *intf,
struct drm_mode_modeinfo *mode);
int adf_interface_get_screen_size(struct adf_interface *intf, u16 *width,
u16 *height);
int adf_interface_simple_buffer_alloc(struct adf_interface *intf, u16 w, u16 h,
u32 format, struct dma_buf **dma_buf, u32 *offset, u32 *pitch);
struct sync_fence *adf_interface_simple_post(struct adf_interface *intf,
struct adf_buffer *buf);
bool adf_overlay_engine_supports_format(struct adf_overlay_engine *eng,
u32 format);
size_t adf_device_attachments(struct adf_device *dev,
struct adf_attachment *attachments, size_t n_attachments);
size_t adf_device_attachments_allowed(struct adf_device *dev,
struct adf_attachment *attachments, size_t n_attachments);
bool adf_device_attached(struct adf_device *dev, struct adf_overlay_engine *eng,
struct adf_interface *intf);
bool adf_device_attach_allowed(struct adf_device *dev,
struct adf_overlay_engine *eng, struct adf_interface *intf);
int adf_device_attach(struct adf_device *dev, struct adf_overlay_engine *eng,
struct adf_interface *intf);
int adf_device_detach(struct adf_device *dev, struct adf_overlay_engine *eng,
struct adf_interface *intf);
struct sync_fence *adf_device_post(struct adf_device *dev,
struct adf_interface **intfs, size_t n_intfs,
struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
size_t custom_data_size);
struct sync_fence *adf_device_post_nocopy(struct adf_device *dev,
struct adf_interface **intfs, size_t n_intfs,
struct adf_buffer *bufs, size_t n_bufs, void *custom_data,
size_t custom_data_size);
#endif /* _VIDEO_ADF_CLIENT_H_ */