All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Use the same pte_encoding for ppgtt as for gtt
@ 2013-07-30 16:58 Chris Wilson
  2013-07-30 16:58 ` [PATCH 2/2] drm/i915: Use Write-Through cacheing for the display plane on Iris Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Chris Wilson @ 2013-07-30 16:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky

The PTE layouts are the same for both ppgtt and gtt, so we can simplify
the setup for ppgtt by copying the encoding function pointer from gtt.
This prevents bugs where we update one function pointer, but forget the
other.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 1294cee..0522d00 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -298,13 +298,7 @@ static int gen6_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
 	 * now. */
 	first_pd_entry_in_global_pt = gtt_total_entries(dev_priv->gtt);
 
-	if (IS_HASWELL(dev)) {
-		ppgtt->base.pte_encode = hsw_pte_encode;
-	} else if (IS_VALLEYVIEW(dev)) {
-		ppgtt->base.pte_encode = byt_pte_encode;
-	} else {
-		ppgtt->base.pte_encode = gen6_pte_encode;
-	}
+	ppgtt->base.pte_encode = dev_priv->gtt.base.pte_encode;
 	ppgtt->num_pd_entries = GEN6_PPGTT_PD_ENTRIES;
 	ppgtt->enable = gen6_ppgtt_enable;
 	ppgtt->base.clear_range = gen6_ppgtt_clear_range;
-- 
1.8.3.2

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

end of thread, other threads:[~2013-07-31 16:14 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 16:58 [PATCH 1/2] drm/i915: Use the same pte_encoding for ppgtt as for gtt Chris Wilson
2013-07-30 16:58 ` [PATCH 2/2] drm/i915: Use Write-Through cacheing for the display plane on Iris Chris Wilson
2013-07-30 17:19   ` Ville Syrjälä
2013-07-30 17:36     ` Chris Wilson
2013-07-30 18:01       ` Ville Syrjälä
2013-07-30 18:10         ` Chris Wilson
2013-07-30 18:29           ` Chris Wilson
2013-07-30 17:45     ` [PATCH] " Chris Wilson
2013-07-30 19:25       ` Chris Wilson
2013-07-31 13:16         ` Ville Syrjälä
2013-07-31 13:36           ` Chris Wilson
2013-07-31 15:16             ` Ville Syrjälä
2013-07-31 15:26               ` Chris Wilson
2013-07-31 15:54                 ` Ville Syrjälä
2013-07-31 16:14                   ` Chris Wilson
2013-07-30 17:39   ` [PATCH 2/2] " Kenneth Graunke
2013-07-30 17:39 ` [PATCH 1/2] drm/i915: Use the same pte_encoding for ppgtt as for gtt Kenneth Graunke
2013-07-30 18:04 ` [PATCH] " Chris Wilson
2013-07-31  7:42   ` Ben Widawsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.