[Intel-gfx] [PATCH v2] drm/i915: don't track relative-constants-mode

Dave Gordon david.s.gordon at intel.com
Wed Sep 7 17:44:31 UTC 2016


On 26/08/16 20:55, Chris Wilson wrote:
> On Fri, Aug 26, 2016 at 08:46:25PM +0100, Dave Gordon wrote:
>> @@ -1520,6 +1528,14 @@ static void eb_export_fence(struct drm_i915_gem_object *obj,
>>  	if (ret)
>>  		return ret;
>>
>> +	if (instp_mode != I915_EXEC_CONSTANTS_REL_GENERAL) {
>> +		/* Restore default value of INSTPM */
>> +		ret = emit_instpm(params->request, instp_mask,
>> +				  I915_EXEC_CONSTANTS_REL_GENERAL);
>> +		if (ret)
>> +			return ret;
>
> We can't return an error at this point, we are committed to executing
> the batch. And we do expect to see at least an EINTR here occasionally.
> -Chris

Note the 'if (ret) return ret' just above. We already quit early on 
error, this just adds yet one more case. If you want to throw 
half-formed command streams at the GPU you'll need to fix all the other 
early exits, so adding one more doesn't really make it any worse.

In any case, it's the result from the ring_begin() which universally 
triggers an early exit, but on the other hand should never fail because 
we reserved enough space up front.

.Dave.


More information about the Intel-gfx mailing list