Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4722076iog; Wed, 22 Jun 2022 04:42:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1stchliRWaJEX1zmheLnlL81zwfZSZ0f7Qk17z7YF+ZVuYDl2TBQmzRovI3FhmynJ4WvOfC X-Received: by 2002:a17:906:4785:b0:722:f71d:b10c with SMTP id cw5-20020a170906478500b00722f71db10cmr1602867ejc.31.1655898119926; Wed, 22 Jun 2022 04:41:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655898119; cv=none; d=google.com; s=arc-20160816; b=fLfO7a1CYImAaHuNO3UDv2sSbxe5n7gRT7NXvV3ShkOFMWJnfojgrvLljspyxCh+B3 OPRWnfVinGLHmathCujg6iCQanz4IGPQr1aokp9j2EfHRQvWsB6Z1gQaVYjh7wrkr1aA 1VUGApQNzn9NPJq4T6KX6HW2YfyarPUTQQ51lS4s9/pb+slhy8P8H8T2UVguMt4Erayv FvLrCY5PzvpM/U2fxjZaSucVw+xTdWq0tiWVcBuDn1I/FCfliFPudoY/V+qnO7/W9GQE 0AwNfv9+7WhXuuZHFasgbqFUd8YXDb7u7L2UqL9C2xYk4556eMQfi7l1Nki4qZpCmsDY 9fnw== 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=qsvcFPW0V7o8GAb3gXWId4aksM6PVO7z8AdMqvYOxaW4wTo5an1Qca5Jb6Yn0Go/aI TxzEdxWcdzNiER/SmnNQIJFGnsoyr9pr4JWCRBcCR8P/YY/LV1beCNagLGUhdJr/uUmX nUcvj4zmp5pqAzyHNuqxUi1cfz9FqpoIFsEvfRPoLFswqIJbQ0MeWQBuIXXeyotQFHOJ LQVnPgEP1GbAtQY95i2t1qvf3on7jQBuzCSmI5yw+QURUXZRLmzZrFzVrlUiZakAKVkG HMJCn+Xqhw9olKmYvjQ6ztSmjP1oKDcDb7TQ4FX1mfzPD0C8XYbbaQv9izhfKBccaKEg pqFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kapsi.fi header.s=20161220 header.b="olo7AVQ/"; 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 p28-20020a17090664dc00b00722cc585d1fsi6249307ejn.842.2022.06.22.04.41.34; Wed, 22 Jun 2022 04:41:59 -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="olo7AVQ/"; 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 S242360AbiFVLiA (ORCPT + 99 others); Wed, 22 Jun 2022 07:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349856AbiFVLhv (ORCPT ); Wed, 22 Jun 2022 07:37:51 -0400 Received: from mail.kapsi.fi (mail.kapsi.fi [IPv6:2001:67c:1be8::25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2954C3C73B; Wed, 22 Jun 2022 04:37:50 -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=olo7AVQ/z2D+28RGJI7Bl3jOeC JxCIejLKe7MSwyew1QFGqWk9JyWepl8TMdGdW8Bp4tmAe4j00+pP1gTPiPMSVNLGT1HS8fnxSpJNG /fVpfwPQMgH9LUOZPt6d133ykmg92Ee2tyRVW/HwiqSh9kqqlE6jnL2Dh99QiLMveW0yFh0N3hA7e cQ1dSH3U+nqN3xmLzTHOwZszayGroZdwkNhbVU+uJMjCEHQek4gTnOdBffrFZ5zNnsUMCWv9ftHS9 riT3MAa1MKrzxzgbIPlWReRk1HD60RFb+liPUejqgfXaWnKljy9i8r8p6+cziBEnpff8Vbr469CL3 PlL0pU/A==; Received: from 91-158-25-70.elisa-laajakaista.fi ([91.158.25.70] helo=toshino.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o3yg3-0001Xl-Ul; Wed, 22 Jun 2022 14:37:42 +0300 From: Mikko Perttunen 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 v2 08/13] gpu: host1x: Program interrupt destinations on Tegra234 Date: Wed, 22 Jun 2022 14:37:28 +0300 Message-Id: <20220622113733.1710471-9-cyndis@kapsi.fi> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220622113733.1710471-1-cyndis@kapsi.fi> References: <20220622113733.1710471-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