diff mbox

[8/9] drm/i915: Restore ILK powerctx pin attributes

Message ID 1373818974-23102-9-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky July 14, 2013, 4:22 p.m. UTC
Now that I've killed renderctx, and the ILK pm code no longer has
anything shared with the regular i915 context code, make the pin
arguments the same as how they were before I started.

I do not know the reason for the original pin arguments, so it's totally
possible this commit isn't necessary (and conversely that I temporarily
broke things earlier in the patch series; though I saw no such result).
However, since ILK RC6 worked very well for those of us where it worked,
I think messing with any of the code is unjustified.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson July 15, 2013, 10:30 a.m. UTC | #1
On Sun, Jul 14, 2013 at 09:22:52AM -0700, Ben Widawsky wrote:
> Now that I've killed renderctx, and the ILK pm code no longer has
> anything shared with the regular i915 context code, make the pin
> arguments the same as how they were before I started.
> 
> I do not know the reason for the original pin arguments, so it's totally
> possible this commit isn't necessary (and conversely that I temporarily
> broke things earlier in the patch series; though I saw no such result).
> However, since ILK RC6 worked very well for those of us where it worked,
> I think messing with any of the code is unjustified.

We should move it out of the aperture as there is no reason for this to
be GTT accessible. That requires an extra patch to request top-down
allocation.
-Chris
Ben Widawsky July 15, 2013, 5:58 p.m. UTC | #2
On Mon, Jul 15, 2013 at 11:30:15AM +0100, Chris Wilson wrote:
> On Sun, Jul 14, 2013 at 09:22:52AM -0700, Ben Widawsky wrote:
> > Now that I've killed renderctx, and the ILK pm code no longer has
> > anything shared with the regular i915 context code, make the pin
> > arguments the same as how they were before I started.
> > 
> > I do not know the reason for the original pin arguments, so it's totally
> > possible this commit isn't necessary (and conversely that I temporarily
> > broke things earlier in the patch series; though I saw no such result).
> > However, since ILK RC6 worked very well for those of us where it worked,
> > I think messing with any of the code is unjustified.
> 
> We should move it out of the aperture as there is no reason for this to
> be GTT accessible. That requires an extra patch to request top-down
> allocation.
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

I am perfectly fine with dropping this patch, which I think solves the
problem. I see no reason to go back to a 4k aligned alloc, do you?
Chris Wilson July 15, 2013, 10:12 p.m. UTC | #3
On Mon, Jul 15, 2013 at 10:58:57AM -0700, Ben Widawsky wrote:
> I am perfectly fine with dropping this patch, which I think solves the
> problem. I see no reason to go back to a 4k aligned alloc, do you?

It still introduces a fair amount of fragmentation - but you can argue
that we should be allocating enough single pages for it not to matter.
At some point, I am going to notice the hole and wonder what insanity
lies within. ;-)

However, just dropping the patch isn't quite enough, we need the
'prefer top-down allocations for !mappable' as well to move it out of
the aperture. But that is a patch for another time.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 21e61fc..03b90aa 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2858,7 +2858,7 @@  intel_alloc_context_page(struct drm_device *dev)
 		return NULL;
 	}
 
-	ret = i915_gem_object_pin(ctx, 64 << 10, false, false);
+	ret = i915_gem_object_pin(ctx, 4096, true, false);
 	if (ret) {
 		DRM_ERROR("failed to pin power context: %d\n", ret);
 		goto err_unref;