summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uc.c
diff options
context:
space:
mode:
authorArkadiusz Hiler2016-11-25 18:59:36 +0100
committerChris Wilson2016-11-25 22:42:36 +0100
commit413e8fdb6ae7ef074cb0393adada2658217ec48d (patch)
treebea17451ed3eb25eda98e13c4e6b5ed8167a1c4a /drivers/gpu/drm/i915/intel_uc.c
parentdrm/i915/guc: Move guc_{send,recv}() to intel_uc.c (diff)
downloadkernel-qcow2-linux-413e8fdb6ae7ef074cb0393adada2658217ec48d.tar.gz
kernel-qcow2-linux-413e8fdb6ae7ef074cb0393adada2658217ec48d.tar.xz
kernel-qcow2-linux-413e8fdb6ae7ef074cb0393adada2658217ec48d.zip
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 a24cf0822c3b..8ae67954563c 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