Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp251824pxu; Sun, 22 Nov 2020 06:53:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwK3rRxP4aXnMvh4kIWiQdj1cWn9PI6xJfXkpBeDrbIVOFbYAuPGsLjDvG9lxT1U6mUhhXS X-Received: by 2002:a05:6402:17f0:: with SMTP id t16mr6033080edy.107.1606056820650; Sun, 22 Nov 2020 06:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606056820; cv=none; d=google.com; s=arc-20160816; b=Iw7jXd64XoLL/sx9DEGZns2fVqRhlhqkY9WeEs1T6AMOZ6kDLc0vgTdbOkUzwT1oEP n8z3RPCbAJQlSRtx/n/qFxOAu6ypstcx9BhS9kGk7vonjdThfVBWrMxrAGG06bdaLN10 dqs9pCm7WPn4EUHS7qQJ14hmxfZunZEE/3tb8eB/3xAAIxIP3jpX+IiAwWBrfmsA8XmV 90LWecj2BDtycWuwARrHgwYEOC6ChNDGLeFTTwN2+DctHl/C4nHp1o7IiwVYc9fTBCsM 5pWiRfkPYJVPvBCFsd5IbKDeOE4NlnYKG9Z4fQpQljjxAEF7DhoRxlWJmL49Wv87Fn1R 6efQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=LGSv+zaXag5bhul/n9vAaILaF4/C2Vq/pib9rWiVqdI=; b=rNk+BppcxKeeQBaoxGDnFO2m4Q36gGCvrRigyxzfTD2c5CU7ofK4C88Djd2f6u//go 7VgakKyD4STTM9M2QuXwJVVYFU3tOBh6o/i2dndFgTVOO8UWRvLltLx0mfBmuDqx5o/0 tNPlgw3LiWvIYWdDVWo8rUDGs7mbep7P8XEtJSVOk3reP4chVEs2RrcVsEH03J5kzK+o xvF2l9RVVXHANn3X6TS/iY3xsm/aV1deeGW/W+S1Avo3OI9xXsDNqsYo+4sI86fIbLNj E7c/1Wj1h5iv5cHWyDPGG5AFarYLdxf8NrqONXpHDhcMyraiJYB/wOFHgdt6GZMh8HVq Gf2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQ8IvQoM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc13si2404851edb.468.2020.11.22.06.53.18; Sun, 22 Nov 2020 06:53:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQ8IvQoM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727634AbgKVOt1 (ORCPT + 99 others); Sun, 22 Nov 2020 09:49:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728028AbgKVOt0 (ORCPT ); Sun, 22 Nov 2020 09:49:26 -0500 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04936C0613CF for ; Sun, 22 Nov 2020 06:49:26 -0800 (PST) Received: by mail-ed1-x544.google.com with SMTP id a15so14483843edy.1 for ; Sun, 22 Nov 2020 06:49:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LGSv+zaXag5bhul/n9vAaILaF4/C2Vq/pib9rWiVqdI=; b=cQ8IvQoMl4tgBQPIgz8T3aEV3/bSlcLoSFZI+ehIw/5IVA1jHdd1QAajE5BbDXZU4g Cpo2LDBWUub9OB/QDsIt+1HZqXYBsOm4xnspae8b4+f7wplItrWZNL6qUQRTNoRxbQKu LSA/gam/9dXsaTz1KXd63aMQInMU3Bejl5lOF4a76LZ0EMjhW0M4HmwwQj9F9JB9KVyc Q8BXrB+RxsGQPkgrL3/ARvtI9tIoei6ijCHBP0Z7aICiLmHFrUiRxjzEDKnhZ4mb56eU Z2QB5AO0IwXuZJad+p7AFcLWoOy2OhcTckQ3y2nxiDfkEeHrsObJKLvfOs4cfUzDNUyP YZHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LGSv+zaXag5bhul/n9vAaILaF4/C2Vq/pib9rWiVqdI=; b=pIJQq01Z0metfFoFsb4h1MePMkG625R2jJOwnL6KQVP7a0ie7ScahnnhbmtkiNtxXR wDldSSYh/K0Won1zHCSgy4JaI7SD7jzEcsfc4WQCLudtujjObSU+2PnrpVqiilDHXhqh 7btNYZz9Hec56aPdEto31BKMzkFwBFamsoCnwOIevwQgzoVyda/HjxbtiHjWtdfvILey G2Tw6xIM9N67lcI8yKzaQG+wVpTx6gXJxrQ5u85us7DN0nfltniD6z/zERwwFARFPCJB H+yp3lwtXyIQ21b+v0MibcR9NuJWdaUTP4VOlvmnin1WQxyWoSJ6HBn23qpi9rOxfa4L mGkg== X-Gm-Message-State: AOAM533RdgbphSeOGsfrlBIrdwlcnt86NGbuHaVqEqa6NmIY5OchP6xV CnVQnYQFIkmfvOYdb93U3QkjOA== X-Received: by 2002:a50:950e:: with SMTP id u14mr42735701eda.260.1606056564785; Sun, 22 Nov 2020 06:49:24 -0800 (PST) Received: from [192.168.1.9] (hst-208-222.medicom.bg. [84.238.208.222]) by smtp.googlemail.com with ESMTPSA id aq15sm3658002ejc.70.2020.11.22.06.49.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Nov 2020 06:49:24 -0800 (PST) Subject: Re: [PATCH 3/3] media: hfi_venus: Request interrupt for sync cmds To: Fritz Koenig , Stanimir Varbanov Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Vikash Garodia , Mansur Alisha Shaik , Dikshita Agarwal References: <20201120001037.10032-1-stanimir.varbanov@linaro.org> <20201120001037.10032-4-stanimir.varbanov@linaro.org> From: Stanimir Varbanov Message-ID: <493867b4-4106-9167-a361-09737b06a8b7@linaro.org> Date: Sun, 22 Nov 2020 16:49:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21/20 3:02 AM, Fritz Koenig wrote: > On Thu, Nov 19, 2020 at 4:12 PM Stanimir Varbanov > wrote: >> >> From: Vikash Garodia >> >> For synchronous commands, update the message queue variable. >> This would inform video firmware to raise interrupt on host >> CPU whenever there is a response for such commands. >> >> Signed-off-by: Vikash Garodia >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media/platform/qcom/venus/hfi_venus.c | 74 ++++++++++--------- >> 1 file changed, 41 insertions(+), 33 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c >> index 4be4a75ddcb6..b8fdb464ba9c 100644 >> --- a/drivers/media/platform/qcom/venus/hfi_venus.c >> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c >> @@ -372,7 +372,7 @@ static void venus_soft_int(struct venus_hfi_device *hdev) >> } >> >> static int venus_iface_cmdq_write_nolock(struct venus_hfi_device *hdev, >> - void *pkt) >> + void *pkt, bool sync) >> { >> struct device *dev = hdev->core->dev; >> struct hfi_pkt_hdr *cmd_packet; >> @@ -397,15 +397,23 @@ static int venus_iface_cmdq_write_nolock(struct venus_hfi_device *hdev, >> if (rx_req) >> venus_soft_int(hdev); >> >> + /* Inform video firmware to raise interrupt for synchronous commands */ >> + queue = &hdev->queues[IFACEQ_MSG_IDX]; > > I don't think there is any reason to scope queue outside of the sync > block below. OK. I'll move into the 'if' statment. > >> >> + if (sync) { >> + queue->qhdr->rx_req = 1; >> + /* ensure rx_req is updated in memory */ >> + wmb(); >> + } >> + >> return 0; >> } >> -- -- regards, Stan