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

yakui.zhao at intel.com yakui.zhao at intel.com
Wed Jan 13 15:10:55 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 so 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 af3df7c..630d70a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2181,7 +2181,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,
 	1
@@ -2224,28 +2224,28 @@ 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
 };
 static struct intel_watermark_params i915_wm_info = {
 	I915_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I915_FIFO_LINE_SIZE
 };
 static struct intel_watermark_params i855_wm_info = {
 	I855GM_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I830_FIFO_LINE_SIZE
 };
 static struct intel_watermark_params i830_wm_info = {
 	I830_FIFO_SIZE,
 	I915_MAX_WM,
-	1,
+	8,
 	2,
 	I830_FIFO_LINE_SIZE
 };
@@ -2363,7 +2363,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