• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (C) 2013-2016 Freescale Semiconductor, Inc.
3  *  Copyright 2017-2019 NXP
4  *
5  *  Permission is hereby granted, free of charge, to any person obtaining
6  *  a copy of this software and associated documentation files (the
7  *  'Software'), to deal in the Software without restriction, including
8  *  without limitation the rights to use, copy, modify, merge, publish,
9  *  distribute, sub license, and/or sell copies of the Software, and to
10  *  permit persons to whom the Software is furnished to do so, subject
11  *  to the following conditions:
12 
13  *  The above copyright notice and this permission notice (including the
14  *  next paragraph) shall be included in all copies or substantial
15  *  portions of the Software.
16 
17  *  THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20  *  IN NO EVENT SHALL VIVANTE AND/OR ITS SUPPLIERS BE LIABLE FOR ANY
21  *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22  *  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23  *  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24  *
25  */
26 
27 /*
28  *  g2dExt.h
29  *  g2dExt.h is for g2d extension, some feature has platform dependency, not recommended to customer.
30  *  So any platform dependent extension should be here, others will still be updated in g2d.h.
31  *  History :
32  *  Date(y.m.d)        Author            Version        Description
33 */
34 
35 #ifndef __G2DEXT_H__
36 #define __G2DEXT_H__
37 
38 #include "g2d.h"
39 
40 #ifdef __cplusplus
41 extern "C"  {
42 #endif
43 
44 struct g2d_tile_status {
45     unsigned int ts_addr;
46     unsigned int fc_enabled;
47     unsigned int fc_value;
48     unsigned int fc_value_upper;
49 };
50 
51 enum g2d_tiling {
52     G2D_LINEAR              = 0x1,
53     G2D_TILED               = 0x2,
54     G2D_SUPERTILED          = 0x4,
55     G2D_AMPHION_TILED       = 0x8,
56     G2D_AMPHION_INTERLACED  = 0x10,
57     G2D_TILED_STATUS        = 0x20,
58 };
59 
60 struct g2d_surfaceEx {
61     struct g2d_surface base;
62     enum   g2d_tiling tiling;
63     struct g2d_tile_status ts;
64     int reserved[8];
65 };
66 
67 int g2d_blitEx(void *handle, struct g2d_surfaceEx *srcEx, struct g2d_surfaceEx *dstEx);
68 
69 int g2d_set_clipping(void *handle, int left, int top, int right, int bottom);
70 
71 /**
72  * @brief Set the Color Space Conversion Matrix.
73  * @param handle A g2d handle.
74  * @param matrix A 4x4 matrix. When NULL, Color Space Coversion is disabled.
75  * @return       0 if successful; or 1 if failed
76  */
77 int g2d_set_csc_matrix(void *handle, const unsigned *matrix);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif
84