[Intel-gfx] [PATCH 05/59] drm/i915: Reserve ring buffer space for i915_add_request() commands

John Harrison John.C.Harrison at Intel.com
Fri Mar 20 11:13:09 PDT 2015


On 20/03/2015 16:19, John Harrison wrote:
> On 19/03/2015 12:30, John.C.Harrison at Intel.com wrote:
>> +void intel_ring_reserved_space_end(struct intel_ringbuffer *ringbuf)
>> +{
>> +    WARN_ON(!ringbuf->reserved_in_use);
>> +    WARN_ON(ringbuf->tail > ringbuf->reserved_tail + 
>> ringbuf->reserved_size);
>> +
>> +    ringbuf->reserved_size   = 0;
>> +    ringbuf->reserved_in_use = false;
>> +}
>> +
>
> So apparently, my reserved size choice was too small for ironlake and 
> the above assert is firing. Is there any kind of WARN_ON with printf 
> facility in the kernel? It would be useful to have the offending sizes 
> included in the message log without having to patch and re-run the 
> tests. Or is the official solution to just use DRM_ERROR(...) instead 
> of WARN_ON? I guess the stack trace isn't necessary as we know where 
> the error is coming from already. But do DRM_ERROR() prints always 
> appear or are they conditional on the user enabling them? And would 
> anyone notice one anyway? At least with WARN_ONs, people do tend to 
> complain.

It was pointed out that I was being dumb. I shall update the WARN_ON() 
to be an ordinary WARN() instead and include the sizes in the message 
format. Unless there is a particular reason to use DRM_ERROR instead of 
WARN?


>
> Thanks,
> John.



More information about the Intel-gfx mailing list