| 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_flipq, false, 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(int, enable_panel_replay, -1, 0600) \ | 
|---|
| 50 | param(bool, psr_safest_params, false, 0400) \ | 
|---|
| 51 | param(bool, enable_psr2_sel_fetch, true, 0400) \ | 
|---|
| 52 | param(int, enable_dmc_wl, -1, 0400) \ | 
|---|
| 53 |  | 
|---|
| 54 | #define MEMBER(T, member, ...) T member; | 
|---|
| 55 | struct intel_display_params { | 
|---|
| 56 | INTEL_DISPLAY_PARAMS_FOR_EACH(MEMBER); | 
|---|
| 57 | }; | 
|---|
| 58 | #undef MEMBER | 
|---|
| 59 |  | 
|---|
| 60 | void intel_display_params_dump(const struct intel_display_params *params, | 
|---|
| 61 | const char *driver_name, struct drm_printer *p); | 
|---|
| 62 | void intel_display_params_copy(struct intel_display_params *dest); | 
|---|
| 63 | void intel_display_params_free(struct intel_display_params *params); | 
|---|
| 64 |  | 
|---|
| 65 | #endif | 
|---|
| 66 |  | 
|---|