]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Optimization to reduce the sampling time of GuC log buffer
authorAkash Goel <akash.goel@intel.com>
Wed, 12 Oct 2016 16:24:37 +0000 (21:54 +0530)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 25 Oct 2016 08:34:23 +0000 (09:34 +0100)
commit67d0663a849b63c15a52a4259bafbccc5d2a2c13
treea7c99ceaee72ee3a7366aa428c8d26ac54d657cd
parentbd0b01ea238adf7db46ee2909accb8e08ac5687a
drm/i915: Optimization to reduce the sampling time of GuC log buffer

GuC firmware sends an interrupt to flush the log buffer when it becomes
half full, so Driver doesn't really need to sample the complete buffer
and can just copy only the newly written data by GuC into the local
buffer, i.e. as per the read & write pointer values.
Moreover the flush interrupt would generally come for one type of log
buffer, when it becomes half full, so at that time the other 2 types of
log buffer would comparatively have much lesser unread data in them.
In case of overflow reported by GuC, Driver do need to copy the entire
buffer as the whole buffer would contain the unread data.

v2: Rebase.

v3: Fix the blooper of doing the copy twice. (Tvrtko)

v4: Add curlies for 'else' case also, matching the 'if'. (Tvrtko)

Signed-off-by: Akash Goel <akash.goel@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_guc_submission.c