[Intel-gfx] [PATCH 55/55] drm/i915: Rename the somewhat reduced i915_gem_object_flush_active()

John Harrison John.C.Harrison at Intel.com
Thu Jun 18 03:57:03 PDT 2015


On 17/06/2015 15:06, Daniel Vetter wrote:
> On Fri, May 29, 2015 at 05:44:16PM +0100, John.C.Harrison at Intel.com wrote:
>> From: John Harrison <John.C.Harrison at Intel.com>
>>
>> The i915_gem_object_flush_active() call used to do lots. Over time it has done
>> less and less. Now all it does check the various associated requests to see if
>> they can be retired. Hence this patch renames the function and updates the
>> comments around it to match the current operation.
>>
>> For: VIZ-5115
>> Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
> When rebasing patches and especially like here when also renaming them a
> bit please leave some indication of what you've changed. Took me a while
> to figure out where one of my pending comments from the previous round
> went too.

The thing is that this isn't really a rebase of a previous patch. It is 
a completely different patch. The original version was removing this 
function entirely as it had become a trivial wrapper around a call to 
i915_gem_retire_requests_ring(). Whereas, some of Chris Wilson's work in 
the meantime has meant that it is now a non-trivial wrapper. Hence the 
function cannot be removed. However, it is not doing what its name or 
comment says. So this new patch is just renaming it and updating the 
comment to be more accurate. Thus the posted comments about the previous 
patch do not apply to this patch - the change being commented on is no 
longer being made.

> And please don't just "v2: rebase", but please add some indicators against
> what it conflicted if it's obvious.
>
> Thanks, Daniel
>
>> ---
>>   drivers/gpu/drm/i915/i915_gem.c |   18 ++++++------------
>>   1 file changed, 6 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>> index f825942..081cbbf 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -2956,12 +2956,10 @@ i915_gem_idle_work_handler(struct work_struct *work)
>>   }
>>   
>>   /**
>> - * Ensures that an object will eventually get non-busy by flushing any required
>> - * write domains, emitting any outstanding lazy request and retiring and
>> - * completed requests.
>> + * Check an object to see if any of it's associated requests can be retired.
>>    */
>>   static int
>> -i915_gem_object_flush_active(struct drm_i915_gem_object *obj)
>> +i915_gem_object_retire(struct drm_i915_gem_object *obj)
>>   {
>>   	int i;
>>   
>> @@ -3034,8 +3032,8 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
>>   		return -ENOENT;
>>   	}
>>   
>> -	/* Need to make sure the object gets inactive eventually. */
>> -	ret = i915_gem_object_flush_active(obj);
>> +	/* Check if the object is pending clean up. */
>> +	ret = i915_gem_object_retire(obj);
>>   	if (ret)
>>   		goto out;
>>   
>> @@ -4526,12 +4524,8 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
>>   		goto unlock;
>>   	}
>>   
>> -	/* Count all active objects as busy, even if they are currently not used
>> -	 * by the gpu. Users of this interface expect objects to eventually
>> -	 * become non-busy without any further actions, therefore emit any
>> -	 * necessary flushes here.
>> -	 */
>> -	ret = i915_gem_object_flush_active(obj);
>> +	/* Check if the object is pending clean up. */
>> +	ret = i915_gem_object_retire(obj);
>>   	if (ret)
>>   		goto unref;
>>   
>> -- 
>> 1.7.9.5
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list