Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F26D9C77B73 for ; Wed, 24 May 2023 19:34:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA86210E095; Wed, 24 May 2023 19:34:06 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id F23B710E095 for ; Wed, 24 May 2023 19:34:04 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 626ED6112C; Wed, 24 May 2023 19:34:04 +0000 (UTC) Received: from rdvivi-mobl4 (unknown [192.55.54.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPSA id 85C0FC433EF; Wed, 24 May 2023 19:34:02 +0000 (UTC) Date: Wed, 24 May 2023 15:33:58 -0400 From: Rodrigo Vivi To: Matthew Auld Message-ID: References: <20230524175701.320653-1-matthew.auld@intel.com> <20230524175701.320653-3-matthew.auld@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230524175701.320653-3-matthew.auld@intel.com> Subject: Re: [Intel-xe] [PATCH v10 3/9] drm/xe: drop xe_device_mem_access_get() from guc_ct_send X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-xe@lists.freedesktop.org, Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Wed, May 24, 2023 at 06:56:55PM +0100, Matthew Auld wrote: > The callers should already be holding the mem_access reference, before > calling into this. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi > --- > drivers/gpu/drm/xe/xe_guc_ct.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c > index 9dc906f2651a..874323c382b3 100644 > --- a/drivers/gpu/drm/xe/xe_guc_ct.c > +++ b/drivers/gpu/drm/xe/xe_guc_ct.c > @@ -605,14 +605,10 @@ static int guc_ct_send(struct xe_guc_ct *ct, const u32 *action, u32 len, > > XE_BUG_ON(g2h_len && g2h_fence); > > - xe_device_mem_access_get(ct_to_xe(ct)); > - > mutex_lock(&ct->lock); > ret = guc_ct_send_locked(ct, action, len, g2h_len, num_g2h, g2h_fence); > mutex_unlock(&ct->lock); > > - xe_device_mem_access_put(ct_to_xe(ct)); > - > return ret; > } > > -- > 2.40.1 >