1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7     * Redistributions of source code must retain the above copyright
8       notice, this list of conditions and the following disclaimer.
9     * Redistributions in binary form must reproduce the above copyright
10       notice, this list of conditions and the following disclaimer in the
11       documentation and/or other materials provided with the distribution.
12     * Neither the name of the copyright holder nor the
13       names of its contributors may be used to endorse or promote products
14       derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef VC_VCHI_DISPMANX_H
29 #define VC_VCHI_DISPMANX_H
30 
31 #include "interface/peer/vc_vchi_dispmanx_common.h"
32 
33 #define VC_NUM_HOST_RESOURCES 64
34 #define DISPMANX_MSGFIFO_SIZE 1024
35 #define DISPMANX_CLIENT_NAME MAKE_FOURCC("DISP")
36 #define DISPMANX_NOTIFY_NAME MAKE_FOURCC("UPDH")
37 
38 //Or with command to indicate we don't need a response
39 #define DISPMANX_NO_REPLY_MASK (1<<31)
40 
41 typedef struct {
42    char     description[32];
43    uint32_t width;
44    uint32_t height;
45    uint32_t aspect_pixwidth;
46    uint32_t aspect_pixheight;
47    uint32_t fieldrate_num;
48    uint32_t fieldrate_denom;
49    uint32_t fields_per_frame;
50    uint32_t transform;
51 } GET_MODES_DATA_T;
52 
53 typedef struct {
54    int32_t  response;
55    uint32_t width;
56    uint32_t height;
57    uint32_t transform;
58    uint32_t input_format;
59 } GET_INFO_DATA_T;
60 
61 //Attributes changes flag mask
62 #define ELEMENT_CHANGE_LAYER          (1<<0)
63 #define ELEMENT_CHANGE_OPACITY        (1<<1)
64 #define ELEMENT_CHANGE_DEST_RECT      (1<<2)
65 #define ELEMENT_CHANGE_SRC_RECT       (1<<3)
66 #define ELEMENT_CHANGE_MASK_RESOURCE  (1<<4)
67 #define ELEMENT_CHANGE_TRANSFORM      (1<<5)
68 
69 #endif
70