From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 4/9] drm/i915: Use LRI based FBC render tracking for ILK
Date: Wed, 27 Nov 2013 17:24:45 +0200 [thread overview]
Message-ID: <1385565885-29838-1-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1385062193-19466-5-git-send-email-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
ILK should work pretty much the same as SNB, except it
doesn't have the blitter, so we only care about render tracking.
v2: Rebased against earlier changes
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
drivers/gpu/drm/i915/intel_pm.c | 2 --
drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index f2104f5..6de26eb 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1091,7 +1091,7 @@
#define ILK_DPFC_CHICKEN 0x43224
#define ILK_FBC_RT_BASE 0x2128
#define ILK_FBC_RT_VALID (1<<0)
-#define SNB_FBC_FRONT_BUFFER (1<<1)
+#define ILK_FBC_FRONT_BUFFER (1<<1)
#define ILK_DISPLAY_CHICKEN1 0x42000
#define ILK_FBCQ_DIS (1<<22)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 059245e..d0f554e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -214,8 +214,6 @@ static void ironlake_enable_fbc(struct drm_crtc *crtc,
(stall_watermark << DPFC_RECOMP_STALL_WM_SHIFT) |
(interval << DPFC_RECOMP_TIMER_COUNT_SHIFT));
I915_WRITE(ILK_DPFC_FENCE_YOFF, crtc->y);
- if (IS_GEN5(dev))
- I915_WRITE(ILK_FBC_RT_BASE, i915_gem_obj_ggtt_offset(obj) | ILK_FBC_RT_VALID);
/* enable it... */
I915_WRITE(ILK_DPFC_CONTROL, dpfc_ctl | DPFC_CTL_EN);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 426d868..c0db05e 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -51,7 +51,7 @@ void __intel_ring_advance(struct intel_ring_buffer *ring)
ring->write_tail(ring, ring->tail);
}
-static int gen6_render_fbc_tracking(struct intel_ring_buffer *ring)
+static int gen5_render_fbc_tracking(struct intel_ring_buffer *ring)
{
int ret;
@@ -67,7 +67,7 @@ static int gen6_render_fbc_tracking(struct intel_ring_buffer *ring)
intel_ring_emit(ring, ILK_FBC_RT_BASE);
if (ring->fbc_address != -1)
intel_ring_emit(ring, ring->fbc_address |
- SNB_FBC_FRONT_BUFFER | ILK_FBC_RT_VALID);
+ ILK_FBC_FRONT_BUFFER | ILK_FBC_RT_VALID);
else
intel_ring_emit(ring, 0);
intel_ring_advance(ring);
@@ -183,6 +183,9 @@ gen4_render_ring_flush(struct intel_ring_buffer *ring,
intel_ring_emit(ring, MI_NOOP);
intel_ring_advance(ring);
+ if (invalidate_domains && IS_GEN5(dev))
+ return gen5_render_fbc_tracking(ring);
+
return 0;
}
@@ -308,7 +311,7 @@ gen6_render_ring_flush(struct intel_ring_buffer *ring,
intel_ring_advance(ring);
if (invalidate_domains)
- return gen6_render_fbc_tracking(ring);
+ return gen5_render_fbc_tracking(ring);
return 0;
}
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-27 15:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 19:29 [PATCH 0/9] drm/i915: Some more FBC stuff ville.syrjala
2013-11-21 19:29 ` [PATCH 1/9] drm/i915: Don't set the fence number in DPFC_CTL on SNB ville.syrjala
2013-11-21 23:22 ` Chris Wilson
2013-11-25 8:43 ` Daniel Vetter
2013-11-21 19:29 ` [PATCH 2/9] drm/i915: Don't set persistent FBC mode on ILK/SNB ville.syrjala
2013-11-21 19:29 ` [PATCH 3/9] drm/i915: Don't set DPFC_HT_MODIFY bit on CTG/ILK/SNB ville.syrjala
2013-11-21 19:29 ` [PATCH 4/9] drm/i915: Use LRI based FBC render tracking for ILK ville.syrjala
2013-11-27 15:24 ` ville.syrjala [this message]
2013-11-28 11:29 ` [PATCH v2 " Chris Wilson
2013-11-21 19:29 ` [PATCH 5/9] drm/i915: Reorder i915_gem_execbuffer_move_to_gpu() and i915_switch_context() ville.syrjala
2013-11-21 19:29 ` [PATCH 6/9] drm/i915: Improve page flip vs. FBC interaction ville.syrjala
2013-11-21 19:29 ` [PATCH 7/9] drm: Push dirtyfb ioctl kms locking down to drivers ville.syrjala
2013-12-03 21:38 ` Daniel Vetter
2013-11-21 19:29 ` [PATCH 8/9] drm/i915: Hook up dirtyfb ioctl for FBC nuke ville.syrjala
2013-11-21 23:18 ` Chris Wilson
2013-11-22 15:19 ` Ville Syrjälä
2013-11-25 8:46 ` Daniel Vetter
2013-11-25 14:54 ` [PATCH v2 8/9] drm/i915: Nuke FBC from SW_FINISH ioctl ville.syrjala
2013-11-25 15:04 ` Chris Wilson
2013-11-25 15:19 ` [PATCH v3 " ville.syrjala
2013-12-04 16:28 ` [PATCH v4 " ville.syrjala
2013-11-21 19:29 ` [PATCH 9/9] drm/i915: Flush caches for scanout during cpu->gtt move ville.syrjala
2013-11-21 23:20 ` Chris Wilson
2013-11-25 8:47 ` Daniel Vetter
2013-11-25 11:04 ` Chris Wilson
2013-11-25 14:40 ` Ville Syrjälä
2013-11-25 15:12 ` Daniel Vetter
2013-12-03 21:42 ` [PATCH 0/9] drm/i915: Some more FBC stuff Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385565885-29838-1-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox