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 13 /* 14 * Invoke param, a function-like macro, for each intel display param, with 15 * arguments: 16 * 17 * param(type, name, value, mode) 18 * 19 * type: parameter type, one of {bool, int, unsigned int, unsigned long, char *} 20 * name: name of the parameter 21 * value: initial/default value of the parameter 22 * mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create 23 * debugfs file 24 */ 25 #define INTEL_DISPLAY_PARAMS_FOR_EACH(param) \ 26 param(char *, dmc_firmware_path, NULL, 0400) \ 27 param(char *, vbt_firmware, NULL, 0400) \ 28 param(int, lvds_channel_mode, 0, 0400) \ 29 param(int, panel_use_ssc, -1, 0600) \ 30 param(int, vbt_sdvo_panel_type, -1, 0400) \ 31 param(int, enable_dc, -1, 0400) \ 32 param(bool, enable_dpt, true, 0400) \ 33 param(bool, enable_dsb, true, 0600) \ 34 param(bool, enable_sagv, true, 0600) \ 35 param(int, disable_power_well, -1, 0400) \ 36 param(bool, enable_ips, true, 0600) \ 37 param(int, invert_brightness, 0, 0600) \ 38 param(int, edp_vswing, 0, 0400) \ 39 param(int, enable_dpcd_backlight, -1, 0600) \ 40 param(bool, load_detect_test, false, 0600) \ 41 param(bool, force_reset_modeset_test, false, 0600) \ 42 param(bool, disable_display, false, 0400) \ 43 param(bool, verbose_state_checks, true, 0400) \ 44 param(bool, nuclear_pageflip, false, 0400) \ 45 param(bool, enable_dp_mst, true, 0600) \ 46 param(int, enable_fbc, -1, 0600) \ 47 param(int, enable_psr, -1, 0600) \ 48 param(bool, psr_safest_params, false, 0400) \ 49 param(bool, enable_psr2_sel_fetch, true, 0400) \ 50 param(bool, enable_dmc_wl, false, 0400) \ 51 52 #define MEMBER(T, member, ...) T member; 53 struct intel_display_params { 54 INTEL_DISPLAY_PARAMS_FOR_EACH(MEMBER); 55 }; 56 #undef MEMBER 57 58 void intel_display_params_dump(const struct intel_display_params *params, 59 const char *driver_name, struct drm_printer *p); 60 void intel_display_params_copy(struct intel_display_params *dest); 61 void intel_display_params_free(struct intel_display_params *params); 62 63 #endif 64