summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.c
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2016-11-25 18:59:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-11-25 21:42:36 +0000
commit413e8fdb6ae7ef074cb0393adada2658217ec48d (patch)
treebea17451ed3eb25eda98e13c4e6b5ed8167a1c4a /drivers/gpu/drm/i915/intel_uc.c
parent2d803c2de09ececa77395e48193fa51c4a2f8def (diff)
downloadop-kernel-dev-413e8fdb6ae7ef074cb0393adada2658217ec48d.zip
op-kernel-dev-413e8fdb6ae7ef074cb0393adada2658217ec48d.tar.gz
drm/i915/guc: Init send_mutex in intel_uc_init_early()
send_mutex is used to serialise communication with GuC via intel_guc_send(). Since functions that utilize it are no longer limited to submission, initialization should be handled as a part of general setup. v2: move initialization to *_early() Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Winiarski <michal.winiarski@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1480096777-12573-5-git-send-email-arkadiusz.hiler@intel.com Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_uc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index a24cf08..8ae6795 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -25,6 +25,11 @@
#include "i915_drv.h"
#include "intel_uc.h"
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+ mutex_init(&dev_priv->guc.send_mutex);
+}
+
/*
* Read GuC command/status register (SOFT_SCRATCH_0)
* Return true if it contains a response rather than a command
OpenPOWER on IntegriCloud