6a4f7f26f04ccd926c96d2525b73fe59c69efc2b
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / inc / hw / panel.h
1 /*
2  * Copyright 2017 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 /*
24  * panel.h
25  *
26  *  Created on: Oct 6, 2015
27  *      Author: yonsun
28  */
29
30 #ifndef DC_PANEL_H_
31 #define DC_PANEL_H_
32
33 #include "dc_types.h"
34
35 struct panel_funcs {
36         void (*destroy)(struct panel **panel);
37         void (*hw_init)(struct panel *panel);
38         bool (*is_panel_backlight_on)(struct panel *panel);
39         bool (*is_panel_powered_on)(struct panel *panel);
40 };
41
42 struct panel_init_data {
43         struct dc_context *ctx;
44         uint32_t inst;
45 };
46
47 struct panel {
48         const struct panel_funcs *funcs;
49         struct dc_context *ctx;
50         uint32_t inst;
51 };
52
53 #endif /* DC_PANEL_H_ */