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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/03/2015 16:19, John Harrison wrote:
On 19/03/2015 12:30, John.C.Harrison@xxxxxxxxx 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.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux