From patchwork Mon Dec 9 12:00:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11279265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06368139A for ; Mon, 9 Dec 2019 12:00:32 +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 E2CB82077B for ; Mon, 9 Dec 2019 12:00:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2CB82077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 629646E43A; Mon, 9 Dec 2019 12:00:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 530026E421; Mon, 9 Dec 2019 12:00:19 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id a15so15851080wrf.9; Mon, 09 Dec 2019 04:00:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iPyrNYuh+D9sdc90p8MGbT53BzBTuJgc562Xscp47+M=; b=VIDuLskP5BBKSu3gyY0bn3vAbJeWQteMB1WYVNwX3g0cSbV3npdbp9w1n71QGsASzB 3TT7JZkjAgcopJoQJeeQvLCVKGROmMiJ+hUW4y74blfwbm8l45AG5Ef6wi3O1NQ/G2h1 KOTBvf6rsFWghZNvLH6fOFhOIZ7I87hZmYOzDKRE2/wSV4CB5dcOMUCMcKZaHX1vPYbK ymQ4OWjY6J+eKwM/8wPPD3sBFxLy/qSsHIePT8xSCqqW6nDaBJMs0mOWy+1MkfOtzVoh UREX05jwR0K67OeMrWAIKI94T9/ys/7Mmru9qxhZ/t8rNShbtzp7/1SkEEDFsB5qfWwm 84mg== X-Gm-Message-State: APjAAAUfBSww9+bDPu2w9Eg0xICKwHhrebU+kdOCnOQLSFV/TWz9xe3F DIcKedsLY9GbFC0iYoD3qUg= X-Google-Smtp-Source: APXvYqzXPoZDxBiw+5no9dfH5axKmd4vK6atZbcQ1BeBP6m3W9lIvlzVLMCJTuPWlpxT9mBV93YTdg== X-Received: by 2002:adf:e40f:: with SMTP id g15mr1816420wrm.223.1575892817765; Mon, 09 Dec 2019 04:00:17 -0800 (PST) Received: from localhost (pD9E518ED.dip0.t-ipconnect.de. [217.229.24.237]) by smtp.gmail.com with ESMTPSA id x26sm1672491wmc.30.2019.12.09.04.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 04:00:16 -0800 (PST) From: Thierry Reding To: Ben Skeggs Subject: [PATCH v3 5/9] drm/nouveau: tegra: Avoid pulsing reset twice Date: Mon, 9 Dec 2019 13:00:01 +0100 Message-Id: <20191209120005.2254786-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191209120005.2254786-1-thierry.reding@gmail.com> References: <20191209120005.2254786-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iPyrNYuh+D9sdc90p8MGbT53BzBTuJgc562Xscp47+M=; b=SKUQl8T0YZIUWCBN3443ZKkGVN5Go8c7h7XoQozfP9MSykuO+Pr3ftH+ORSi2RAxAy rVEc36/ZlaiBKn9c7DSQjG0flhGKIDydl/ehc5l83+f6M1V+hhn8VX3GlYvVZscEZm9E mWcDoMQMPMFSjYAfKT4gb0hMZd0JlEgN69vDkGlN8M0PwdvOi5GlqMPR2YUongTZDMKK E35byK4fLXznAaOeCH2zat5ch0ut19tjVuqTQljNAmuJbpSaA2fRXb1I5vSywAV+r08j NrA6PHXYX0f1usHdmKDVtTrwi5Y6/UgBsQ4C1ZxoJih8av5JFBFhS+xYgfhA6d4ac9Lj JZrw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thierry Reding When the GPU powergate is controlled by a generic power domain provider, the reset will automatically be asserted and deasserted as part of the power-ungating procedure. On some Jetson TX2 boards, doing an additional assert and deassert of the GPU outside of the power-ungate procedure can cause the GPU to go into a bad state where the memory interface can no longer access system memory. Signed-off-by: Thierry Reding --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 0e372a190d3f..747a775121cf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -52,18 +52,18 @@ nvkm_device_tegra_power_up(struct nvkm_device_tegra *tdev) clk_set_rate(tdev->clk_pwr, 204000000); udelay(10); - reset_control_assert(tdev->rst); - udelay(10); - if (!tdev->pdev->dev.pm_domain) { + reset_control_assert(tdev->rst); + udelay(10); + ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D); if (ret) goto err_clamp; udelay(10); - } - reset_control_deassert(tdev->rst); - udelay(10); + reset_control_deassert(tdev->rst); + udelay(10); + } return 0;