forked from rock64-android/hardware-rockchip-hwcomposer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hwc_ipp.h
executable file
·68 lines (53 loc) · 1.61 KB
/
hwc_ipp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* rockchip hwcomposer( 2D graphic acceleration unit) .
*
* Copyright (C) 2015 Rockchip Electronics Co., Ltd.
*/
#ifndef __rk_hwc_ipp
#define __rk_hwc_ipp
#include <hardware/hwcomposer.h>
#include <hardware/hardware.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include "rk29-ipp.h"
#include <cutils/log.h>
#ifdef TARGET_BOARD_PLATFORM_RK30XXB
#include <hardware/hal_public.h>
#else
#include "gralloc_priv.h"
#endif
#ifdef TARGET_BOARD_PLATFORM_RK30XXB
#define GPU_BASE handle->iBase
#define GPU_WIDTH handle->iWidth
#define GPU_HEIGHT handle->iHeight
#define GPU_FORMAT handle->iFormat
#define GPU_DST_FORMAT DstHandle->iFormat
#define private_handle_t IMG_native_handle_t
#else
#define GPU_BASE handle->base
#define GPU_WIDTH handle->width
#define GPU_HEIGHT handle->height
#define GPU_FORMAT handle->format
#define GPU_DST_FORMAT DstHandle->format
#endif
extern "C"
{
// #include <ion/ionalloc.h>
#include <linux/ion.h>
#include <ion/ion.h>
#include <linux/rockchip_ion.h>
}
typedef struct ipp_device_t
{
int (*ipp_is_enable)(); //ipp if available
int (*ipp_reset)();//ipp reset
int (*ipp_format_is_surport)(int format); //ipp is surport
int (*ipp_rotate_and_scale)(struct private_handle_t *handle, \
int tranform, \
unsigned int* srcPhysical, int *videoWidth, int *videoHeight);//ipp rotate or scale
void *reserved;//
} ipp_device_t;
int ipp_open(ipp_device_t *ippDev);//open ipp
int ipp_close(ipp_device_t *ippDev);//close ipp
#endif