[Intel-gfx] [PATCH v2 9/9] drm/i915: Don't use too small watermark

yakui.zhao at intel.com yakui.zhao at intel.com
Wed Jan 20 10:41:18 CET 2010


From: Zhao Yakui <yakui.zhao at intel.com>

Assure that the watermark is higher than or equal to the predefined default
value. If too small watermark is configured, it will cause that request to
the system memory is generated very frequently.

At the same time it also redefines the default watermark value on
g4x/965/9xx platform.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 13689b8..a97c63e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2191,7 +2191,7 @@ static struct intel_watermark_params pineview_cursor_hplloff_wm = {
 static struct intel_watermark_params g4x_wm_info = {
 	G4X_FIFO_SIZE,
 	G4X_MAX_WM,
-	G4X_MAX_WM,
+	8,
 	2,
 	G4X_FIFO_LINE_SIZE,
 	WM_USE_ENTRY_COUNT,
@@ -2236,7 +2236,7 @@ static struct intel_watermark_params gm965_self_cursor_info = {
 static struct intel_watermark_params i945_wm_info = {
 	I945_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I915_FIFO_LINE_SIZE,
 	WM_USE_OFFSET,
@@ -2244,7 +2244,7 @@ static struct intel_watermark_params i945_wm_info = {
 static struct intel_watermark_params i915_wm_info = {
 	I915_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I915_FIFO_LINE_SIZE,
 	WM_USE_OFFSET,
@@ -2252,7 +2252,7 @@ static struct intel_watermark_params i915_wm_info = {
 static struct intel_watermark_params i855_wm_info = {
 	I855GM_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I830_FIFO_LINE_SIZE,
 	WM_USE_OFFSET,
@@ -2260,7 +2260,7 @@ static struct intel_watermark_params i855_wm_info = {
 static struct intel_watermark_params i830_wm_info = {
 	I830_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I830_FIFO_LINE_SIZE,
 	WM_USE_OFFSET,
@@ -2356,7 +2356,7 @@ static unsigned long intel_calculate_wm(struct intel_watermark_params *wm,
 	/* Don't promote wm_size to unsigned... */
 	if (wm_size > (long)wm->max_wm)
 		wm_size = wm->max_wm;
-	if (wm_size <= 0)
+	if (wm_size < (int)wm->default_wm)
 		wm_size = wm->default_wm;
 	return wm_size;
 }
-- 
1.5.4.5




More information about the Intel-gfx mailing list