xref: /linux/drivers/gpu/drm/i915/display/intel_display_params.h (revision 96f30c8f0aa9923aa39b30bcaefeacf88b490231)
1 // SPDX-License-Identifier: MIT
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _INTEL_DISPLAY_PARAMS_H_
7 #define _INTEL_DISPLAY_PARAMS_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_printer;
12 struct drm_i915_private;
13 
14 /*
15  * Invoke param, a function-like macro, for each intel display param, with
16  * arguments:
17  *
18  * param(type, name, value, mode)
19  *
20  * type: parameter type, one of {bool, int, unsigned int, unsigned long, char *}
21  * name: name of the parameter
22  * value: initial/default value of the parameter
23  * mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create
24  *       debugfs file
25  */
26 #define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \
27 	param(char *, dmc_firmware_path, NULL, 0400) \
28 	param(char *, vbt_firmware, NULL, 0400) \
29 	param(int, lvds_channel_mode, 0, 0400) \
30 	param(int, panel_use_ssc, -1, 0600) \
31 	param(int, vbt_sdvo_panel_type, -1, 0400) \
32 	param(int, enable_dc, -1, 0400) \
33 	param(bool, enable_dpt, true, 0400) \
34 	param(bool, enable_dsb, true, 0600) \
35 	param(bool, enable_sagv, true, 0600) \
36 	param(int, disable_power_well, -1, 0400) \
37 	param(bool, enable_ips, true, 0600) \
38 	param(int, invert_brightness, 0, 0600) \
39 	param(int, edp_vswing, 0, 0400) \
40 	param(int, enable_dpcd_backlight, -1, 0600) \
41 	param(bool, load_detect_test, false, 0600) \
42 	param(bool, force_reset_modeset_test, false, 0600) \
43 	param(bool, disable_display, false, 0400) \
44 	param(bool, verbose_state_checks, true, 0400) \
45 	param(bool, nuclear_pageflip, false, 0400) \
46 	param(bool, enable_dp_mst, true, 0600) \
47 	param(int, enable_fbc, -1, 0600) \
48 	param(int, enable_psr, -1, 0600) \
49 	param(bool, psr_safest_params, false, 0400) \
50 	param(bool, enable_psr2_sel_fetch, true, 0400) \
51 	param(bool, enable_dmc_wl, false, 0400) \
52 
53 #define MEMBER(T, member, ...) T member;
54 struct intel_display_params {
55 	INTEL_DISPLAY_PARAMS_FOR_EACH(MEMBER);
56 };
57 #undef MEMBER
58 
59 void intel_display_params_dump(struct drm_i915_private *i915,
60 			       struct drm_printer *p);
61 void intel_display_params_copy(struct intel_display_params *dest);
62 void intel_display_params_free(struct intel_display_params *params);
63 
64 #endif
65