Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77A61C33CAF for ; Thu, 16 Jan 2020 18:53:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5D6E12053B for ; Thu, 16 Jan 2020 18:53:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D6E12053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F38BE6EE8E; Thu, 16 Jan 2020 18:53:49 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FA9E6EE8E for ; Thu, 16 Jan 2020 18:53:49 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 10:53:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,327,1574150400"; d="scan'208";a="214192962" Received: from dceraolo-linux.fm.intel.com (HELO [10.1.27.145]) ([10.1.27.145]) by orsmga007.jf.intel.com with ESMTP; 16 Jan 2020 10:53:38 -0800 To: Michal Wajdeczko , intel-gfx@lists.freedesktop.org References: <20200115140822.55756-1-michal.wajdeczko@intel.com> <20200115140822.55756-3-michal.wajdeczko@intel.com> From: Daniele Ceraolo Spurio Message-ID: <99c65a63-e8df-4977-fe30-03b3f3ccbf9e@intel.com> Date: Thu, 16 Jan 2020 10:53:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200115140822.55756-3-michal.wajdeczko@intel.com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH 2/5] i915/drm/guc: Don't pass CTB while writing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 1/15/20 6:08 AM, Michal Wajdeczko wrote: > Since we only have one SEND buffer we don't need to explicitly pass > it to the write function. > > Signed-off-by: Michal Wajdeczko > Cc: Chris Wilson > Cc: Daniele Ceraolo Spurio > --- > drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > index 0d3556a820a3..dedbf3b8ab01 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c > @@ -311,12 +311,13 @@ static u32 ct_get_next_fence(struct intel_guc_ct *ct) > * ^-----------------len-------------------^ > */ > > -static int ctb_write(struct intel_guc_ct_buffer *ctb, > - const u32 *action, > - u32 len /* in dwords */, > - u32 fence, > - bool want_response) > +static int ct_write(struct intel_guc_ct *ct, > + const u32 *action, > + u32 len /* in dwords */, > + u32 fence, > + bool want_response) > { > + struct intel_guc_ct_buffer *ctb = &ct->ctbs[CTB_SEND]; > struct guc_ct_buffer_desc *desc = ctb->desc; > u32 head = desc->head / 4; /* in dwords */ > u32 tail = desc->tail / 4; /* in dwords */ > @@ -492,7 +493,7 @@ static int ct_send(struct intel_guc_ct *ct, > list_add_tail(&request.link, &ct->requests.pending); > spin_unlock_irqrestore(&ct->requests.lock, flags); > > - err = ctb_write(ctb, action, len, fence, !!response_buf); > + err = ct_write(ct, action, len, fence, !!response_buf); I'd update wait_for_ctb_desc_update() to work on struct intel_guc_ct as well, so we can hide the ctb desc access in the lower level functions and drop the ctb variable from ct_send(). With or without that: Reviewed-by: Daniele Ceraolo Spurio Daniele > if (unlikely(err)) > goto unlink; > > _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx