]> git.ipfire.org Git - thirdparty/linux.git/blob - drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h
x86/fpu/xstate: Restore supervisor states for signal return
[thirdparty/linux.git] / drivers / gpu / drm / amd / display / dc / dml / display_mode_lib.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 * Authors: AMD
23 *
24 */
25 #ifndef __DISPLAY_MODE_LIB_H__
26 #define __DISPLAY_MODE_LIB_H__
27
28
29 #include "dml_common_defs.h"
30 #include "display_mode_vba.h"
31
32 enum dml_project {
33 DML_PROJECT_UNDEFINED,
34 DML_PROJECT_RAVEN1,
35 DML_PROJECT_NAVI10,
36 DML_PROJECT_NAVI10v2,
37 DML_PROJECT_DCN21,
38 };
39
40 struct display_mode_lib;
41
42 struct dml_funcs {
43 void (*rq_dlg_get_dlg_reg)(
44 struct display_mode_lib *mode_lib,
45 display_dlg_regs_st *dlg_regs,
46 display_ttu_regs_st *ttu_regs,
47 display_e2e_pipe_params_st *e2e_pipe_param,
48 const unsigned int num_pipes,
49 const unsigned int pipe_idx,
50 const bool cstate_en,
51 const bool pstate_en,
52 const bool vm_en,
53 const bool ignore_viewport_pos,
54 const bool immediate_flip_support);
55 void (*rq_dlg_get_rq_reg)(
56 struct display_mode_lib *mode_lib,
57 display_rq_regs_st *rq_regs,
58 const display_pipe_params_st pipe_param);
59 void (*recalculate)(struct display_mode_lib *mode_lib);
60 void (*validate)(struct display_mode_lib *mode_lib);
61 };
62
63 struct display_mode_lib {
64 struct _vcs_dpi_ip_params_st ip;
65 struct _vcs_dpi_soc_bounding_box_st soc;
66 enum dml_project project;
67 struct vba_vars_st vba;
68 struct dal_logger *logger;
69 struct dml_funcs funcs;
70 };
71
72 void dml_init_instance(struct display_mode_lib *lib,
73 const struct _vcs_dpi_soc_bounding_box_st *soc_bb,
74 const struct _vcs_dpi_ip_params_st *ip_params,
75 enum dml_project project);
76
77 const char *dml_get_status_message(enum dm_validation_status status);
78
79 #endif