drm/i915/params: Align visibility of device level and global modparams
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 26 May 2021 14:19:46 +0000 (15:19 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 27 May 2021 08:34:50 +0000 (09:34 +0100)
We have a few modparams which get conditionally exposed based on a Kconfig
options and in most cases this also means portions of the driver
implementing the respective feature are also left out.

Align the visibility of device level and global modparams to make them
consistent in this respect.

v2:
 * Fix misplaced parentheses.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210526141946.2347085-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_params.h

index 34ebb0662547c64b69f5076a3ad9959233987bb7..01121d8410136eb4ab44c5b1d41377bc96620ac2 100644 (file)
@@ -71,18 +71,18 @@ struct drm_printer;
        param(int, fastboot, -1, 0600) \
        param(int, enable_dpcd_backlight, -1, 0600) \
        param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
-       param(unsigned long, fake_lmem_start, 0, 0400) \
-       param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, 0600) \
+       param(unsigned long, fake_lmem_start, 0, IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM) ? 0400 : 0) \
+       param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, CONFIG_DRM_I915_REQUEST_TIMEOUT ? 0600 : 0) \
        /* leave bools at the end to not create holes */ \
        param(bool, enable_hangcheck, true, 0600) \
        param(bool, load_detect_test, false, 0600) \
        param(bool, force_reset_modeset_test, false, 0600) \
-       param(bool, error_capture, true, 0600) \
+       param(bool, error_capture, true, IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) ? 0600 : 0) \
        param(bool, disable_display, false, 0400) \
        param(bool, verbose_state_checks, true, 0) \
        param(bool, nuclear_pageflip, false, 0400) \
        param(bool, enable_dp_mst, true, 0600) \
-       param(bool, enable_gvt, false, 0400)
+       param(bool, enable_gvt, false, IS_ENABLED(CONFIG_DRM_I915_GVT) ? 0400 : 0)
 
 #define MEMBER(T, member, ...) T member;
 struct i915_params {