Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3283244iob; Mon, 16 May 2022 18:05:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxBGKttn5r+9DbH5I7qZmJgO/UzTZ5F4OLvNd0uNJEAVipGzmg+/1bgpzxC8bb0FCBpUiC X-Received: by 2002:a17:906:730a:b0:6fd:ebc2:cfc with SMTP id di10-20020a170906730a00b006fdebc20cfcmr17992161ejc.751.1652749518164; Mon, 16 May 2022 18:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652749518; cv=none; d=google.com; s=arc-20160816; b=Vn7EufxoIneAUjiIpTsk8VwlFumn3ETb5DnbpneGOIHFsBXcE+X1vwdkGWTTU2g3Eu wRWXsjACEPtAGK6tFsxSxZ51vzPmdNWpvhB0e+ISFsmKWMQMEs7tV7/YXRjrw7x9BeVB YjgJEydK7/cgJC1j5vD26cy/pMbsKkaZKhPENCDHbDZRIp10rWeOVfkoEPSeQCqWZLre plwyJAgkFvSQz4PtWl1KpcUMEWu3Pewako3A7Hea2S0sMBU7D6+ScSW2jp6lZGYmw9VV 59T+gtF9rwhaNqGNwjF9aW8Un/UfkWk4Maan5x+Xcml4l0NHN037SVqfFuxMhm9XX8Pz WrTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hAGGcw/SOg7X5CrJwFzinyDfIvPa2up8kxxxfJmr9MY=; b=FcJ0MtgslpvFv6sZH50pzKAWkELaPRWcS7555J5vZxlP26KCJJ1UvBpxfx3/bJr0BG mINISC4rcfjLomUTDt5Ob0y7JX+jvYk7Rg/93E2NjeSVBXvchGvfFeMs+nb+c9zDlqqH pMOApGaj1guLdML4L2G09aYn8WFjF4rHxKmpvgNPuVNu2jbyOiK0QJQHqMQBNzs6/UZa HStpbhuOWUtg5XIFb2WeCZZ4AhE2jzqV742YQqyGrBdTVPk5FJKSGKpIT0/UVnHLScs7 e4wIgnzp5xc8g2QLxD1Tn3UKpCHLtj0pz1YINw+xhGEqdgiWfE0D63Na4TNYL/u3e2Oc m8kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=qOt+T+P5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d33-20020a056402402100b0042824992221si10820965eda.132.2022.05.16.18.04.52; Mon, 16 May 2022 18:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b=qOt+T+P5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242131AbiEPKDD (ORCPT + 99 others); Mon, 16 May 2022 06:03:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234655AbiEPKCm (ORCPT ); Mon, 16 May 2022 06:02:42 -0400 Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD54D559B; Mon, 16 May 2022 03:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hAGGcw/SOg7X5CrJwFzinyDfIvPa2up8kxxxfJmr9MY=; b=qOt+T+P5wmygdCoxphRDyfzQCL c0xe5FTwZyOST9xCZ8UPwzYRB2ePCIQtrLZDouUokUuZE/QISokHuz/h1cqUZxsbNeRTmVHZ9aqyy HSo3y5ZfL/u+qQPsDS8H6NNc9gzrElD75IDUWz16aM3365RmUIMdJY637aA/aoU1EWwh9uNPV9+Xz JJQdyfVKvX2/VpmF30JYxXgkeO01HT1aZs5swYBIsLo2Ab9ykNCVk16Wg09KeRe4mT0eBlLDJjnYA aog8/c5rfLedihVgOk4fklrKiW5OgsH/CqyfktGH6bUscmI36xGX50zUkYDa8N0gLnbef95pbjtft CSQoonIQ==; Received: from 91-158-25-70.elisa-laajakaista.fi ([91.158.25.70] helo=toshino.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqXYf-0005yU-So; Mon, 16 May 2022 13:02:33 +0300 From: cyndis@kapsi.fi To: thierry.reding@gmail.com, jonathanh@nvidia.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, digetx@gmail.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Mikko Perttunen Subject: [PATCH v1 08/13] gpu: host1x: Program interrupt destinations on Tegra234 Date: Mon, 16 May 2022 13:02:08 +0300 Message-Id: <20220516100213.1536571-9-cyndis@kapsi.fi> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516100213.1536571-1-cyndis@kapsi.fi> References: <20220516100213.1536571-1-cyndis@kapsi.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 91.158.25.70 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mikko Perttunen On Tegra234, each Host1x VM has 8 interrupt lines. Each syncpoint can be configured with which interrupt line should be used for threshold interrupt, allowing for load balancing. For now, to keep backwards compatibility, just set all syncpoints to the first interrupt. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/intr_hw.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/host1x/hw/intr_hw.c b/drivers/gpu/host1x/hw/intr_hw.c index f56375ee6e71..9acccdb139e6 100644 --- a/drivers/gpu/host1x/hw/intr_hw.c +++ b/drivers/gpu/host1x/hw/intr_hw.c @@ -76,6 +76,17 @@ static void intr_hw_init(struct host1x *host, u32 cpm) /* update host clocks per usec */ host1x_sync_writel(host, cpm, HOST1X_SYNC_USEC_CLK); #endif +#if HOST1X_HW >= 8 + u32 id; + + /* + * Program threshold interrupt destination among 8 lines per VM, + * per syncpoint. For now, just direct all to the first interrupt + * line. + */ + for (id = 0; id < host->info->nb_pts; id++) + host1x_sync_writel(host, 0, HOST1X_SYNC_SYNCPT_INTR_DEST(id)); +#endif } static int -- 2.36.1