OSDN Git Service

drm/i915/guc: Log runtime should consist of both mapping and relay
authorMichał Winiarski <michal.winiarski@intel.com>
Mon, 19 Mar 2018 09:53:37 +0000 (10:53 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Mar 2018 12:23:01 +0000 (12:23 +0000)
commitb813d50e869aeda09ccf22e8d869e61b63389e4d
tree0b8f3f08e460930c9e425416860350fd38eace21
parenteacd8391f977d3800cc41a026f9f81fce210a78c
drm/i915/guc: Log runtime should consist of both mapping and relay

Currently, we're treating relay and mapping of GuC log as a separate
concepts. We're also using inconsistent locking, sometimes using
relay_lock, sometimes using struct mutex.
Let's correct that. Anything touching the runtime is now serialized
using runtime.lock, while we're still using struct mutex as inner lock
for mapping.
We're still racy in setting the log level - but we'll take care of that
in the following patches.

v2: Tidy locking (Sagar)
v3: Remove obsoleted comment (Sagar)

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180319095348.9716-2-michal.winiarski@intel.com
drivers/gpu/drm/i915/intel_guc_log.c
drivers/gpu/drm/i915/intel_guc_log.h