diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-08-06 15:24:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-08 08:04:54 -0400 |
commit | 77c122bcc448439af7f5fcb2542406b45b606c51 (patch) | |
tree | dc5e28f31f86c3e1bcac01bcf2e97cfeac7b1db3 | |
parent | 71fff20ff1bb790f4defe0c880e028581ffab420 (diff) |
drm/i915: Rename hsw_data_buf_partitioning to intel_ddb_partitioning
We're going to use the 1/2 vs. 5/6 split option already on IVB so the
HSW name is not proper. Just give it an intel_ prefix and move it to
i915_drv.h so that we can use it there later.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 17 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 2421ad17831b..cb4521d95429 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1055,6 +1055,11 @@ struct intel_vbt_data { | |||
1055 | struct child_device_config *child_dev; | 1055 | struct child_device_config *child_dev; |
1056 | }; | 1056 | }; |
1057 | 1057 | ||
1058 | enum intel_ddb_partitioning { | ||
1059 | INTEL_DDB_PART_1_2, | ||
1060 | INTEL_DDB_PART_5_6, /* IVB+ */ | ||
1061 | }; | ||
1062 | |||
1058 | typedef struct drm_i915_private { | 1063 | typedef struct drm_i915_private { |
1059 | struct drm_device *dev; | 1064 | struct drm_device *dev; |
1060 | struct kmem_cache *slab; | 1065 | struct kmem_cache *slab; |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index d5f0b4e1f1c4..81d88d040128 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -2196,11 +2196,6 @@ struct hsw_wm_values { | |||
2196 | bool enable_fbc_wm; | 2196 | bool enable_fbc_wm; |
2197 | }; | 2197 | }; |
2198 | 2198 | ||
2199 | enum hsw_data_buf_partitioning { | ||
2200 | HSW_DATA_BUF_PART_1_2, | ||
2201 | HSW_DATA_BUF_PART_5_6, | ||
2202 | }; | ||
2203 | |||
2204 | /* | 2199 | /* |
2205 | * For both WM_PIPE and WM_LP. | 2200 | * For both WM_PIPE and WM_LP. |
2206 | * mem_value must be in 0.1us units. | 2201 | * mem_value must be in 0.1us units. |
@@ -2631,11 +2626,11 @@ static struct hsw_wm_values *hsw_find_best_result(struct hsw_wm_values *r1, | |||
2631 | */ | 2626 | */ |
2632 | static void hsw_write_wm_values(struct drm_i915_private *dev_priv, | 2627 | static void hsw_write_wm_values(struct drm_i915_private *dev_priv, |
2633 | struct hsw_wm_values *results, | 2628 | struct hsw_wm_values *results, |
2634 | enum hsw_data_buf_partitioning partitioning) | 2629 | enum intel_ddb_partitioning partitioning) |
2635 | { | 2630 | { |
2636 | struct hsw_wm_values previous; | 2631 | struct hsw_wm_values previous; |
2637 | uint32_t val; | 2632 | uint32_t val; |
2638 | enum hsw_data_buf_partitioning prev_partitioning; | 2633 | enum intel_ddb_partitioning prev_partitioning; |
2639 | bool prev_enable_fbc_wm; | 2634 | bool prev_enable_fbc_wm; |
2640 | 2635 | ||
2641 | previous.wm_pipe[0] = I915_READ(WM0_PIPEA_ILK); | 2636 | previous.wm_pipe[0] = I915_READ(WM0_PIPEA_ILK); |
@@ -2652,7 +2647,7 @@ static void hsw_write_wm_values(struct drm_i915_private *dev_priv, | |||
2652 | previous.wm_linetime[2] = I915_READ(PIPE_WM_LINETIME(PIPE_C)); | 2647 | previous.wm_linetime[2] = I915_READ(PIPE_WM_LINETIME(PIPE_C)); |
2653 | 2648 | ||
2654 | prev_partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ? | 2649 | prev_partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ? |
2655 | HSW_DATA_BUF_PART_5_6 : HSW_DATA_BUF_PART_1_2; | 2650 | INTEL_DDB_PART_5_6 : INTEL_DDB_PART_1_2; |
2656 | 2651 | ||
2657 | prev_enable_fbc_wm = !(I915_READ(DISP_ARB_CTL) & DISP_FBC_WM_DIS); | 2652 | prev_enable_fbc_wm = !(I915_READ(DISP_ARB_CTL) & DISP_FBC_WM_DIS); |
2658 | 2653 | ||
@@ -2691,7 +2686,7 @@ static void hsw_write_wm_values(struct drm_i915_private *dev_priv, | |||
2691 | 2686 | ||
2692 | if (prev_partitioning != partitioning) { | 2687 | if (prev_partitioning != partitioning) { |
2693 | val = I915_READ(WM_MISC); | 2688 | val = I915_READ(WM_MISC); |
2694 | if (partitioning == HSW_DATA_BUF_PART_1_2) | 2689 | if (partitioning == INTEL_DDB_PART_1_2) |
2695 | val &= ~WM_MISC_DATA_PARTITION_5_6; | 2690 | val &= ~WM_MISC_DATA_PARTITION_5_6; |
2696 | else | 2691 | else |
2697 | val |= WM_MISC_DATA_PARTITION_5_6; | 2692 | val |= WM_MISC_DATA_PARTITION_5_6; |
@@ -2728,7 +2723,7 @@ static void haswell_update_wm(struct drm_device *dev) | |||
2728 | struct hsw_wm_maximums lp_max_1_2, lp_max_5_6; | 2723 | struct hsw_wm_maximums lp_max_1_2, lp_max_5_6; |
2729 | struct hsw_pipe_wm_parameters params[3]; | 2724 | struct hsw_pipe_wm_parameters params[3]; |
2730 | struct hsw_wm_values results_1_2, results_5_6, *best_results; | 2725 | struct hsw_wm_values results_1_2, results_5_6, *best_results; |
2731 | enum hsw_data_buf_partitioning partitioning; | 2726 | enum intel_ddb_partitioning partitioning; |
2732 | 2727 | ||
2733 | hsw_compute_wm_parameters(dev, params, &lp_max_1_2, &lp_max_5_6); | 2728 | hsw_compute_wm_parameters(dev, params, &lp_max_1_2, &lp_max_5_6); |
2734 | 2729 | ||
@@ -2743,7 +2738,7 @@ static void haswell_update_wm(struct drm_device *dev) | |||
2743 | } | 2738 | } |
2744 | 2739 | ||
2745 | partitioning = (best_results == &results_1_2) ? | 2740 | partitioning = (best_results == &results_1_2) ? |
2746 | HSW_DATA_BUF_PART_1_2 : HSW_DATA_BUF_PART_5_6; | 2741 | INTEL_DDB_PART_1_2 : INTEL_DDB_PART_5_6; |
2747 | 2742 | ||
2748 | hsw_write_wm_values(dev_priv, best_results, partitioning); | 2743 | hsw_write_wm_values(dev_priv, best_results, partitioning); |
2749 | } | 2744 | } |