From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82C7ACD37B3 for ; Sun, 17 Sep 2023 08:49:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbjIQIsz (ORCPT ); Sun, 17 Sep 2023 04:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235089AbjIQIsi (ORCPT ); Sun, 17 Sep 2023 04:48:38 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDCC6185 for ; Sun, 17 Sep 2023 01:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694940513; x=1726476513; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0Boe7Gc2DP0E8eOe/KIMoMoyqtMVHIVrqsWDAKZBOPE=; b=TJiTyt3EjpUJ9Flfu4nhH5S9sHHihpIP1k2SjEfIO2L+vP8LSpcXxkW/ gs6cChQ71SxQk5QO7FaUW7IE4qBcd9s5Whv/2d6B87IUX7BhNxx6QajE1 uJGIvd+CH3/7INDdsCBSK0IDeTQmBEcOz2ppv624s4drS96MnoYnB8r1N VSaMnQeokMQN87btIKeratIQjDkUyyF7tD83huF0Xhw2aEyRY1vn2g0ax nPHi7hIaRBhqtoCx+Riw9dparLvat4t4KSTSS8pnRCB0LOaJu/1M8J9+3 k2p8jZ3Agm/6FlPmjWfOGctwvNcj8G9J/hZUBDUeDWP8AkwyyVOfmhmgI A==; X-IronPort-AV: E=McAfee;i="6600,9927,10835"; a="364528902" X-IronPort-AV: E=Sophos;i="6.02,153,1688454000"; d="scan'208";a="364528902" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 01:48:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10835"; a="738808548" X-IronPort-AV: E=Sophos;i="6.02,153,1688454000"; d="scan'208";a="738808548" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 01:48:31 -0700 Date: Sun, 17 Sep 2023 10:48:29 +0200 From: Stanislaw Gruszka To: Jeffrey Hugo Cc: quic_carlv@quicinc.com, quic_pkanojiy@quicinc.com, ogabbay@kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 6/7] accel/qaic: Create a function to initialize BO Message-ID: <20230917084829.GA441281@linux.intel.com> References: <20230901172247.11410-1-quic_jhugo@quicinc.com> <20230901172247.11410-7-quic_jhugo@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230901172247.11410-7-quic_jhugo@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, Sep 01, 2023 at 11:22:46AM -0600, Jeffrey Hugo wrote: > From: Pranjal Ramajor Asha Kanojiya > > This makes sure that we have a single place to initialize and > re-initialize BO. > > Use this new API to cleanup release_dbc() > > We will need this for next patch to detach slicing to a BO. > > Signed-off-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo > --- > drivers/accel/qaic/qaic_data.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c > index 6e44e00937af..2acb9dbac88b 100644 > --- a/drivers/accel/qaic/qaic_data.c > +++ b/drivers/accel/qaic/qaic_data.c > @@ -635,6 +635,18 @@ static const struct drm_gem_object_funcs qaic_gem_funcs = { > .vm_ops = &drm_vm_ops, > }; > > +static void qaic_init_bo(struct qaic_bo *bo, bool reinit) > +{ > + if (reinit) { > + bo->sliced = false; > + reinit_completion(&bo->xfer_done); > + } else { > + init_completion(&bo->xfer_done); > + } > + complete_all(&bo->xfer_done); Why do you need complete_all() here ? Regards Stanislaw From mboxrd@z Thu Jan 1 00:00:00 1970 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 F2A68CD37B4 for ; Sun, 17 Sep 2023 08:48:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 202E410E03C; Sun, 17 Sep 2023 08:48:36 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4422510E03C for ; Sun, 17 Sep 2023 08:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694940514; x=1726476514; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0Boe7Gc2DP0E8eOe/KIMoMoyqtMVHIVrqsWDAKZBOPE=; b=c0wD/aaNqgE629p6Siptvjs2hc78/F6tACJoh+SStrSbYTSB54D33puz tx8BzCcAtmYlJp2/FSN9abLpjjpDy9QGMGS4zsea8YI5aUIWSmCAGCSpR WE4FSynFJ3q1MAh79tzuFUJDU70UL9VtU7iw4f1UrvOd4yPF8IN2WUZIl l/wA8KBea5gVgqRQx8s32Md5N0Fw7wvb5rzFF19Fo3A2T2c3PHOu+9usV j+TAKvclq1Hr2+Iz6sCyMYbKDKeuzartDqkvYK++LuEFvqyWhq1ODZ9/v 32vXGfwyLWCx0voq7S9+i6Cqi+foP3+6XgFI03YYpf4qEuwvBHVnd4+qe A==; X-IronPort-AV: E=McAfee;i="6600,9927,10835"; a="364528905" X-IronPort-AV: E=Sophos;i="6.02,153,1688454000"; d="scan'208";a="364528905" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 01:48:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10835"; a="738808548" X-IronPort-AV: E=Sophos;i="6.02,153,1688454000"; d="scan'208";a="738808548" Received: from joe-255.igk.intel.com (HELO localhost) ([10.91.220.57]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 01:48:31 -0700 Date: Sun, 17 Sep 2023 10:48:29 +0200 From: Stanislaw Gruszka To: Jeffrey Hugo Subject: Re: [PATCH 6/7] accel/qaic: Create a function to initialize BO Message-ID: <20230917084829.GA441281@linux.intel.com> References: <20230901172247.11410-1-quic_jhugo@quicinc.com> <20230901172247.11410-7-quic_jhugo@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230901172247.11410-7-quic_jhugo@quicinc.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quic_pkanojiy@quicinc.com, linux-arm-msm@vger.kernel.org, quic_carlv@quicinc.com, ogabbay@kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Sep 01, 2023 at 11:22:46AM -0600, Jeffrey Hugo wrote: > From: Pranjal Ramajor Asha Kanojiya > > This makes sure that we have a single place to initialize and > re-initialize BO. > > Use this new API to cleanup release_dbc() > > We will need this for next patch to detach slicing to a BO. > > Signed-off-by: Pranjal Ramajor Asha Kanojiya > Reviewed-by: Jeffrey Hugo > Signed-off-by: Jeffrey Hugo > --- > drivers/accel/qaic/qaic_data.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c > index 6e44e00937af..2acb9dbac88b 100644 > --- a/drivers/accel/qaic/qaic_data.c > +++ b/drivers/accel/qaic/qaic_data.c > @@ -635,6 +635,18 @@ static const struct drm_gem_object_funcs qaic_gem_funcs = { > .vm_ops = &drm_vm_ops, > }; > > +static void qaic_init_bo(struct qaic_bo *bo, bool reinit) > +{ > + if (reinit) { > + bo->sliced = false; > + reinit_completion(&bo->xfer_done); > + } else { > + init_completion(&bo->xfer_done); > + } > + complete_all(&bo->xfer_done); Why do you need complete_all() here ? Regards Stanislaw