[Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-09-15 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. v2: Added kernel doc

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-09-15 Thread Tvrtko Ursulin
On 09/15/2015 09:33 AM, ankitprasad.r.sha...@intel.com wrote: From: Ankitprasad Sharma This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread Chris Wilson
On Wed, Jul 22, 2015 at 04:01:33PM +0100, Tvrtko Ursulin wrote: +ret = i915_gem_obj_ggtt_pin(obj, alignment, PIN_MAPPABLE); +if (ret) { +DRM_ERROR(Mapping of gem object to GTT failed\n); Maybe end the sentence with ! ? Or better yet, don't do anything. The error is

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread Tvrtko Ursulin
On 07/22/2015 04:06 PM, Chris Wilson wrote: On Wed, Jul 22, 2015 at 04:01:33PM +0100, Tvrtko Ursulin wrote: This I don't understand. Why it is OK to release a fence and never re-establish it? Could that surprise some callers? We always call get_fence() before we need it (and pin it as

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread Chris Wilson
On Wed, Jul 22, 2015 at 04:01:33PM +0100, Tvrtko Ursulin wrote: This I don't understand. Why it is OK to release a fence and never re-establish it? Could that surprise some callers? We always call get_fence() before we need it (and pin it as required), because it can be revoked at anytime as

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread Chris Wilson
On Wed, Jul 22, 2015 at 04:16:20PM +0100, Tvrtko Ursulin wrote: On 07/22/2015 04:06 PM, Chris Wilson wrote: On Wed, Jul 22, 2015 at 04:01:33PM +0100, Tvrtko Ursulin wrote: This I don't understand. Why it is OK to release a fence and never re-establish it? Could that surprise some callers?

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread Tvrtko Ursulin
Hi, On 07/22/2015 02:51 PM, ankitprasad.r.sha...@intel.com wrote: From: Ankitprasad Sharma ankitprasad.r.sha...@intel.com This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this

[Intel-gfx] [PATCH 1/4] drm/i915: Clearing buffer objects via CPU/GTT

2015-07-22 Thread ankitprasad . r . sharma
From: Ankitprasad Sharma ankitprasad.r.sha...@intel.com This patch adds support for clearing buffer objects via CPU/GTT. This is particularly useful for clearing out the non shmem backed objects. Currently intend to use this only for buffers allocated from stolen region. Testcase: igt/gem_stolen