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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* 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 __MDSS_HDMI_PANEL_H__
#define __MDSS_HDMI_PANEL_H__
#include "mdss_panel.h"
#include "mdss_hdmi_util.h"
enum hdmi_deep_color_depth {
HDMI_DEEP_COLOR_DEPTH_24BPP,
HDMI_DEEP_COLOR_DEPTH_30BPP,
HDMI_DEEP_COLOR_DEPTH_36BPP,
HDMI_DEEP_COLOR_DEPTH_RESERVED,
};
/**
* struct hdmi_panel_data - panel related data information
*
* @pinfo: pointer to mdss panel information
* @s3d_mode: 3d mode supported
* @vic: video indentification code
* @scan_info: scan information of the TV
* @s3d_support: set to true if 3d supported, false otherwize
* @content_type: type of content like game, cinema etc
* @infoframe: set to true if infoframes should be sent to sink
* @is_it_content: set to true if content is IT
* @scrambler: set to true if scrambler needs to be enabled
* @dc_enable: set to true if deep color is enabled
* @bitdepth: set the output bitdepth like 24/30 bpp
*/
struct hdmi_panel_data {
struct mdss_panel_info *pinfo;
u32 s3d_mode;
u32 vic;
u32 scan_info;
u8 content_type;
bool s3d_support;
bool infoframe;
bool is_it_content;
bool scrambler;
bool dc_enable;
enum hdmi_deep_color_depth bitdepth;
};
/**
* struct hdmi_panel_ops - panel operation for clients
*
* @on: pointer to a function which powers on the panel
* @off: pointer to a function which powers off the panel
* @vendor: pointer to a function which programs vendor specific infoframe
* @update_fps: pointer to a function which updates fps
*/
struct hdmi_panel_ops {
int (*on)(void *input);
int (*off)(void *input);
void (*vendor)(void *input);
int (*update_fps)(void *input, u32 fps);
int (*update_colorimetry)(void *input, bool use_bt2020);
};
/**
* struct hdmi_panel_init_data - initialization data for hdmi panel
*
* @io: pointer to logical memory of the hdmi tx core
* @ds_data: pointer to down stream data
* @panel_data: pointer to panel data
* @ddc: pointer to display data channel's data
* @ops: pointer to pnael ops to be filled by hdmi panel
* @timing: pointer to the timing details of current resolution
* @spd_vendor_name: pointer to spd vendor infoframe data
* @spd_product_description: pointer to spd product description infoframe data
* @version: hardware version of the hdmi tx
*/
struct hdmi_panel_init_data {
struct dss_io_data *io;
struct hdmi_util_ds_data *ds_data;
struct hdmi_panel_data *panel_data;
struct hdmi_tx_ddc_ctrl *ddc;
struct hdmi_panel_ops *ops;
struct msm_hdmi_mode_timing_info *timing;
u8 *spd_vendor_name;
u8 *spd_product_description;
u32 version;
};
/**
* hdmi_panel_init() - initializes hdmi panel
*
* initializes the hdmi panel, allocates the memory, assign the input
* data to local variables and provide the operation function pointers.
*
* @data: initialization data.
* return: hdmi panel data that need to be send with hdmi ops.
*/
void *hdmi_panel_init(struct hdmi_panel_init_data *data);
/**
* hdmi_panel_deinit() - deinitializes hdmi panel
*
* releases memory and all resources.
*
* @input: hdmi panel data.
*/
void hdmi_panel_deinit(void *input);
int hdmi_panel_get_vic(struct mdss_panel_info *pinfo,
struct hdmi_util_ds_data *ds_data);
#endif /* __MDSS_HDMI_PANEL_H__ */
|