]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/guc: Stop using mutex while sending CTB messages
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 3 Jun 2021 05:16:26 +0000 (22:16 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 4 Jun 2021 08:40:50 +0000 (10:40 +0200)
We are no longer using descriptor to hold G2H replies and we are
protecting access to the descriptor and command buffer by the
separate spinlock, so we can stop using mutex.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210603051630.2635-17-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

index b07d22de682fbeb58fab0044c18718fbf5747b5a..1745f89baeae5a16acb293936d465809deda9377 100644 (file)
@@ -559,7 +559,6 @@ unlink:
 int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
                      u32 *response_buf, u32 response_buf_size)
 {
-       struct intel_guc *guc = ct_to_guc(ct);
        u32 status = ~0; /* undefined */
        int ret;
 
@@ -568,8 +567,6 @@ int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
                return -ENODEV;
        }
 
-       mutex_lock(&guc->send_mutex);
-
        ret = ct_send(ct, action, len, response_buf, response_buf_size, &status);
        if (unlikely(ret < 0)) {
                CT_ERROR(ct, "Sending action %#x failed (err=%d status=%#X)\n",
@@ -579,7 +576,6 @@ int intel_guc_ct_send(struct intel_guc_ct *ct, const u32 *action, u32 len,
                         action[0], ret, ret);
        }
 
-       mutex_unlock(&guc->send_mutex);
        return ret;
 }