drm/i915/display: Move enable_dpcd_backlight module parameter under display
authorJouni Högander <jouni.hogander@intel.com>
Tue, 24 Oct 2023 12:41:02 +0000 (15:41 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Thu, 26 Oct 2023 09:15:41 +0000 (12:15 +0300)
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-17-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_display_params.c
drivers/gpu/drm/i915/display/intel_display_params.h
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h

index 70a4752..190ca12 100644 (file)
@@ -72,6 +72,10 @@ intel_display_param_named_unsafe(edp_vswing, int, 0400,
        "(0=use value from vbt [default], 1=low power swing(200mV),"
        "2=default swing(400mV))");
 
+intel_display_param_named(enable_dpcd_backlight, int, 0400,
+       "Enable support for DPCD backlight control"
+       "(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enable, 2=force VESA interface, 3=force Intel interface)");
+
 intel_display_param_named_unsafe(enable_fbc, int, 0400,
        "Enable frame buffer compression for power savings "
        "(default: -1 (use per-chip default))");
index 10c79ce..85d1128 100644 (file)
@@ -35,6 +35,7 @@ struct drm_i915_private;
        param(bool, enable_ips, true, 0600) \
        param(int, invert_brightness, 0, 0600) \
        param(int, edp_vswing, 0, 0400) \
+       param(int, enable_dpcd_backlight, -1, 0600) \
        param(int, enable_fbc, -1, 0600) \
        param(int, enable_psr, -1, 0600) \
        param(bool, psr_safest_params, false, 0400) \
index 26ea7e9..4f58efd 100644 (file)
@@ -146,7 +146,7 @@ intel_dp_aux_supports_hdr_backlight(struct intel_connector *connector)
         * HDR static metadata we need to start maintaining table of
         * ranges for such panels.
         */
-       if (i915->params.enable_dpcd_backlight != INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL &&
+       if (i915->display.params.enable_dpcd_backlight != INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL &&
            !(connector->base.hdr_sink_metadata.hdmi_type1.metadata_type &
              BIT(HDMI_STATIC_METADATA_TYPE1))) {
                drm_info(&i915->drm,
@@ -489,7 +489,7 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
        /* Check the VBT and user's module parameters to figure out which
         * interfaces to probe
         */
-       switch (i915->params.enable_dpcd_backlight) {
+       switch (i915->display.params.enable_dpcd_backlight) {
        case INTEL_DP_AUX_BACKLIGHT_OFF:
                return -ENODEV;
        case INTEL_DP_AUX_BACKLIGHT_AUTO:
index 6b9df9f..e15cd84 100644 (file)
@@ -140,10 +140,6 @@ i915_param_named_unsafe(inject_probe_failure, uint, 0400,
        "Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");
 #endif
 
-i915_param_named(enable_dpcd_backlight, int, 0400,
-       "Enable support for DPCD backlight control"
-       "(-1=use per-VBT LFP backlight type setting [default], 0=disabled, 1=enable, 2=force VESA interface, 3=force Intel interface)");
-
 #if IS_ENABLED(CONFIG_DRM_I915_GVT)
 i915_param_named(enable_gvt, bool, 0400,
        "Enable support for Intel GVT-g graphics virtualization host support(default:false)");
index c33edae..8169234 100644 (file)
@@ -57,7 +57,6 @@ struct drm_printer;
        param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \
        param(unsigned int, reset, 3, 0600) \
        param(unsigned int, inject_probe_failure, 0, 0) \
-       param(int, enable_dpcd_backlight, -1, 0600) \
        param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
        param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, CONFIG_DRM_I915_REQUEST_TIMEOUT ? 0600 : 0) \
        param(unsigned int, lmem_size, 0, 0400) \