Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Export the generic, not arch specific, intel_update_watermarks()
@ 2012-04-14 20:56 Chris Wilson
  2012-04-16 15:03 ` Jesse Barnes
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-04-14 20:56 UTC (permalink / raw)
  To: intel-gfx

Rather than export every single architecture specific update_wm, just
export the wrapper around the display vtable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c |    5 ++---
 drivers/gpu/drm/i915/intel_drv.h     |    2 +-
 drivers/gpu/drm/i915/intel_sprite.c  |    4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1a175a8..984834a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -45,7 +45,6 @@
 #define HAS_eDP (intel_pipe_has_type(crtc, INTEL_OUTPUT_EDP))
 
 bool intel_pipe_has_type(struct drm_crtc *crtc, int type);
-static void intel_update_watermarks(struct drm_device *dev);
 static void intel_increase_pllclock(struct drm_crtc *crtc);
 static void intel_crtc_update_cursor(struct drm_crtc *crtc, bool on);
 static void __intel_crtc_load_lut(struct intel_crtc *crtc);
@@ -4891,7 +4890,7 @@ static void ironlake_update_wm(struct drm_device *dev)
 	 */
 }
 
-void sandybridge_update_wm(struct drm_device *dev)
+static void sandybridge_update_wm(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int latency = SNB_READ_WM0_LATENCY() * 100;	/* In unit 0.1us */
@@ -5196,7 +5195,7 @@ static void sandybridge_update_sprite_wm(struct drm_device *dev, int pipe,
  * We don't use the sprite, so we can ignore that.  And on Crestline we have
  * to set the non-SR watermarks to 8.
  */
-static void intel_update_watermarks(struct drm_device *dev)
+void intel_update_watermarks(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index bcc7da5..33deeaf 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -440,7 +440,7 @@ extern void intel_write_eld(struct drm_encoder *encoder,
 extern void intel_cpt_verify_modeset(struct drm_device *dev, int pipe);
 
 /* For use by IVB LP watermark workaround in intel_sprite.c */
-extern void sandybridge_update_wm(struct drm_device *dev);
+extern void intel_update_watermarks(struct drm_device *dev);
 extern void intel_update_sprite_watermarks(struct drm_device *dev, int pipe,
 					   uint32_t sprite_width,
 					   int pixel_size);
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index fd061c2..a831b7d 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -119,13 +119,13 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
 	 */
 	if (crtc_w != src_w || crtc_h != src_h) {
 		dev_priv->sprite_scaling_enabled = true;
-		sandybridge_update_wm(dev);
+		intel_update_watermarks(dev);
 		intel_wait_for_vblank(dev, pipe);
 		sprscale = SPRITE_SCALE_ENABLE | (src_w << 16) | src_h;
 	} else {
 		dev_priv->sprite_scaling_enabled = false;
 		/* potentially re-enable LP watermarks */
-		sandybridge_update_wm(dev);
+		intel_update_watermarks(dev);
 	}
 
 	I915_WRITE(SPRSTRIDE(pipe), fb->pitches[0]);
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Export the generic, not arch specific, intel_update_watermarks()
  2012-04-14 20:56 [PATCH] drm/i915: Export the generic, not arch specific, intel_update_watermarks() Chris Wilson
@ 2012-04-16 15:03 ` Jesse Barnes
  2012-04-16 17:01   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Jesse Barnes @ 2012-04-16 15:03 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sat, 14 Apr 2012 21:56:08 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> Rather than export every single architecture specific update_wm, just
> export the wrapper around the display vtable.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---

Looks good.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Export the generic, not arch specific, intel_update_watermarks()
  2012-04-16 15:03 ` Jesse Barnes
@ 2012-04-16 17:01   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-04-16 17:01 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Mon, Apr 16, 2012 at 08:03:25AM -0700, Jesse Barnes wrote:
> On Sat, 14 Apr 2012 21:56:08 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 
> > Rather than export every single architecture specific update_wm, just
> > export the wrapper around the display vtable.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> 
> Looks good.
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-16 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14 20:56 [PATCH] drm/i915: Export the generic, not arch specific, intel_update_watermarks() Chris Wilson
2012-04-16 15:03 ` Jesse Barnes
2012-04-16 17:01   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox