Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp294400pxk; Wed, 9 Sep 2020 05:42:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw012r6XkVz+k1bcxkt92FiQPB8aXlrEKXqkLjnqEdvgTH0G+Fq4K7nERoDlcYPLdNklfTf X-Received: by 2002:a17:906:15c7:: with SMTP id l7mr3350443ejd.208.1599655336861; Wed, 09 Sep 2020 05:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599655336; cv=none; d=google.com; s=arc-20160816; b=oxfzqdtdA1VbV2yo1d+lW205BLMUfAg6dyg+3bxG9LtCo1aiwQv+2mTk2m266+BEIO JNgT+uV5kj1HUAjOnXmb4webNZbD2Cs0ovisOoDaFiUZ6D5t7KD7DuAgMO+8v0dW+Ld/ 6pOfL638EvUEG37ipW20PJcqR9hX2bxB25ZFp0MJvvQt+1SmgRktcB7P21rPKU7tBkQn eWFCw04kvTH19nJ680w1W6NJaWsAw9/0TnmrSWYpqX5vx1LsrE0nuAPD2V9LydNIkcNX MbPlaAWeLyb3ULcvPECrYU+cpAt+s06v+ToTrxeDliSFpfZ9k07cOx+LTJ5ZjBx6fg68 rG0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1eK9p7+SgVs55ltCEyrkIjteD1OQGkXYxud9D2Rum0w=; b=W1TZsPcF51ioAcDN2j5jd0mkstJY/Hn1bRZLp2BQc7SZLdWjLjYS0sIzZjAcF8IBKt Tw5DkdLPThUBfsxOOW7cEVQFZA59uIrSDVZP4L1jxo7ZdbwakBVrx92Id8vWHI5T4kln WvVcoH5ZyhwPVBYw1wjNMt30/6Wey5O4AW/imTu/R2OMKw8x5Livyig2l5e3zd5atZKO TpCnReyWZnPK6hv6SB85HixCm/rGsoAYMFaG4tdbEjVYkZmtPGBkOHoCLiixybu9Ud2T UULaz6xLxiskpXNX5tXlxl/22jdBB0yuGtWYJbY5tpHn0xhkBHOT1dhhFqTy3bK5lTwu WLRQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si1478194ejd.606.2020.09.09.05.41.51; Wed, 09 Sep 2020 05:42:16 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729913AbgIIMjj (ORCPT + 99 others); Wed, 9 Sep 2020 08:39:39 -0400 Received: from foss.arm.com ([217.140.110.172]:42506 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730161AbgIIMae (ORCPT ); Wed, 9 Sep 2020 08:30:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 58CD2101E; Wed, 9 Sep 2020 05:30:05 -0700 (PDT) Received: from e112269-lin.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8734F3F68F; Wed, 9 Sep 2020 05:30:03 -0700 (PDT) From: Steven Price To: Daniel Vetter , David Airlie , Rob Herring , Tomeu Vizoso Cc: Alyssa Rosenzweig , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Marty E. Plummer" , Eric Anholt , Neil Armstrong , Steven Price Subject: [PATCH] drm/panfrost: Ensure GPU quirks are always initialised Date: Wed, 9 Sep 2020 13:29:57 +0100 Message-Id: <20200909122957.51667-1-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GPU 'CONFIG' registers used to work around hardware issues are cleared on reset so need to be programmed every time the GPU is reset. However panfrost_device_reset() failed to do this. To avoid this in future instead move the call to panfrost_gpu_init_quirks() to panfrost_gpu_power_on() so that the regsiters are always programmed just before the cores are powered. Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index e0f190e43813..6d17d3cbd1df 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -305,6 +305,8 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev) int ret; u32 val; + panfrost_gpu_init_quirks(pfdev); + /* Just turn on everything for now */ gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present); ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO, @@ -356,7 +358,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev) return err; } - panfrost_gpu_init_quirks(pfdev); panfrost_gpu_power_on(pfdev); return 0; -- 2.20.1