aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2014-01-21 04:24:25 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-27 11:16:45 -0500
commitd330a9530c97b8ee4704fdd7f228712029438ea9 (patch)
tree7e2c111e25a63e8d166d92cc31e8b57852e287ae /drivers/gpu/drm/i915/intel_display.c
parent2b7e8082b258eebcff49acff040a9110ed6f2c09 (diff)
drm/i915: move module parameters into a struct, in a new file
With 20+ module parameters, I think referring to them via a struct improves clarity over just having a bunch of globals. While at it, move the parameter initialization and definitions into a new file i915_params.c to reduce clutter in i915_drv.c. Apart from the ill-named i915_enable_rc6, i915_enable_fbc and i915_enable_ppgtt parameters, for which we lose the "i915_" prefix internally, the module parameters now look the same both on the kernel command line and in code. For example, "i915.modeset". The downsides of the change are losing static on a couple of variables and not having the initialization and module_param_named() right next to each other. On the other hand, all module parameters are now defined in one place at i915_params.c. Plus you can do this to find all module parameter references: $ git grep "i915\." -- drivers/gpu/drm/i915 v2: - move the definitions into a new file - s/i915_params/i915/ - make i915_try_reset i915.reset, for consistency Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 46b014f6080f..122f87155b8e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2372,7 +2372,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
2372 * whether the platform allows pfit disable with pipe active, and only 2372 * whether the platform allows pfit disable with pipe active, and only
2373 * then update the pipesrc and pfit state, even on the flip path. 2373 * then update the pipesrc and pfit state, even on the flip path.
2374 */ 2374 */
2375 if (i915_fastboot) { 2375 if (i915.fastboot) {
2376 const struct drm_display_mode *adjusted_mode = 2376 const struct drm_display_mode *adjusted_mode =
2377 &intel_crtc->config.adjusted_mode; 2377 &intel_crtc->config.adjusted_mode;
2378 2378
@@ -4580,7 +4580,7 @@ retry:
4580static void hsw_compute_ips_config(struct intel_crtc *crtc, 4580static void hsw_compute_ips_config(struct intel_crtc *crtc,
4581 struct intel_crtc_config *pipe_config) 4581 struct intel_crtc_config *pipe_config)
4582{ 4582{
4583 pipe_config->ips_enabled = i915_enable_ips && 4583 pipe_config->ips_enabled = i915.enable_ips &&
4584 hsw_crtc_supports_ips(crtc) && 4584 hsw_crtc_supports_ips(crtc) &&
4585 pipe_config->pipe_bpp <= 24; 4585 pipe_config->pipe_bpp <= 24;
4586} 4586}
@@ -4781,8 +4781,8 @@ intel_link_compute_m_n(int bits_per_pixel, int nlanes,
4781 4781
4782static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv) 4782static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
4783{ 4783{
4784 if (i915_panel_use_ssc >= 0) 4784 if (i915.panel_use_ssc >= 0)
4785 return i915_panel_use_ssc != 0; 4785 return i915.panel_use_ssc != 0;
4786 return dev_priv->vbt.lvds_use_ssc 4786 return dev_priv->vbt.lvds_use_ssc
4787 && !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE); 4787 && !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
4788} 4788}
@@ -4841,7 +4841,7 @@ static void i9xx_update_pll_dividers(struct intel_crtc *crtc,
4841 4841
4842 crtc->lowfreq_avail = false; 4842 crtc->lowfreq_avail = false;
4843 if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_LVDS) && 4843 if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_LVDS) &&
4844 reduced_clock && i915_powersave) { 4844 reduced_clock && i915.powersave) {
4845 I915_WRITE(FP1(pipe), fp2); 4845 I915_WRITE(FP1(pipe), fp2);
4846 crtc->config.dpll_hw_state.fp1 = fp2; 4846 crtc->config.dpll_hw_state.fp1 = fp2;
4847 crtc->lowfreq_avail = true; 4847 crtc->lowfreq_avail = true;
@@ -6345,7 +6345,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
6345 if (intel_crtc->config.has_dp_encoder) 6345 if (intel_crtc->config.has_dp_encoder)
6346 intel_dp_set_m_n(intel_crtc); 6346 intel_dp_set_m_n(intel_crtc);
6347 6347
6348 if (is_lvds && has_reduced_clock && i915_powersave) 6348 if (is_lvds && has_reduced_clock && i915.powersave)
6349 intel_crtc->lowfreq_avail = true; 6349 intel_crtc->lowfreq_avail = true;
6350 else 6350 else
6351 intel_crtc->lowfreq_avail = false; 6351 intel_crtc->lowfreq_avail = false;
@@ -6713,7 +6713,7 @@ static void __hsw_enable_package_c8(struct drm_i915_private *dev_priv)
6713 return; 6713 return;
6714 6714
6715 schedule_delayed_work(&dev_priv->pc8.enable_work, 6715 schedule_delayed_work(&dev_priv->pc8.enable_work,
6716 msecs_to_jiffies(i915_pc8_timeout)); 6716 msecs_to_jiffies(i915.pc8_timeout));
6717} 6717}
6718 6718
6719static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv) 6719static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv)
@@ -6812,7 +6812,7 @@ static void hsw_update_package_c8(struct drm_device *dev)
6812 if (!HAS_PC8(dev_priv->dev)) 6812 if (!HAS_PC8(dev_priv->dev))
6813 return; 6813 return;
6814 6814
6815 if (!i915_enable_pc8) 6815 if (!i915.enable_pc8)
6816 return; 6816 return;
6817 6817
6818 mutex_lock(&dev_priv->pc8.lock); 6818 mutex_lock(&dev_priv->pc8.lock);
@@ -8210,7 +8210,7 @@ void intel_mark_idle(struct drm_device *dev)
8210 8210
8211 hsw_package_c8_gpu_idle(dev_priv); 8211 hsw_package_c8_gpu_idle(dev_priv);
8212 8212
8213 if (!i915_powersave) 8213 if (!i915.powersave)
8214 return; 8214 return;
8215 8215
8216 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 8216 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -8230,7 +8230,7 @@ void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
8230 struct drm_device *dev = obj->base.dev; 8230 struct drm_device *dev = obj->base.dev;
8231 struct drm_crtc *crtc; 8231 struct drm_crtc *crtc;
8232 8232
8233 if (!i915_powersave) 8233 if (!i915.powersave)
8234 return; 8234 return;
8235 8235
8236 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 8236 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -9893,7 +9893,7 @@ intel_set_config_compute_mode_changes(struct drm_mode_set *set,
9893 struct intel_crtc *intel_crtc = 9893 struct intel_crtc *intel_crtc =
9894 to_intel_crtc(set->crtc); 9894 to_intel_crtc(set->crtc);
9895 9895
9896 if (intel_crtc->active && i915_fastboot) { 9896 if (intel_crtc->active && i915.fastboot) {
9897 DRM_DEBUG_KMS("crtc has no fb, will flip\n"); 9897 DRM_DEBUG_KMS("crtc has no fb, will flip\n");
9898 config->fb_changed = true; 9898 config->fb_changed = true;
9899 } else { 9899 } else {
@@ -10144,7 +10144,7 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
10144 * flipping, so increasing its cost here shouldn't be a big 10144 * flipping, so increasing its cost here shouldn't be a big
10145 * deal). 10145 * deal).
10146 */ 10146 */
10147 if (i915_fastboot && ret == 0) 10147 if (i915.fastboot && ret == 0)
10148 intel_modeset_check_state(set->crtc->dev); 10148 intel_modeset_check_state(set->crtc->dev);
10149 } 10149 }
10150 10150
@@ -11382,7 +11382,7 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
11382 */ 11382 */
11383 list_for_each_entry(crtc, &dev->mode_config.crtc_list, 11383 list_for_each_entry(crtc, &dev->mode_config.crtc_list,
11384 base.head) { 11384 base.head) {
11385 if (crtc->active && i915_fastboot) { 11385 if (crtc->active && i915.fastboot) {
11386 intel_crtc_mode_from_pipe_config(crtc, &crtc->config); 11386 intel_crtc_mode_from_pipe_config(crtc, &crtc->config);
11387 11387
11388 DRM_DEBUG_KMS("[CRTC:%d] found active mode: ", 11388 DRM_DEBUG_KMS("[CRTC:%d] found active mode: ",