• Akash Goel's avatar
    drm/i915: Optimization to reduce the sampling time of GuC log buffer · 6941f3c9
    Akash Goel authored
    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: default avatarAkash Goel <akash.goel@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    6941f3c9
i915_guc_submission.c 45.2 KB