Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp526880pxx; Wed, 28 Oct 2020 10:19:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZEvWYMEtjVxUNSW+aQJUq2bXwm7R1APpyiCNkYfOezLvh1zlbmnLsE4zYPvlLdKcHkbg8 X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr9221562edv.319.1603905547187; Wed, 28 Oct 2020 10:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603905547; cv=none; d=google.com; s=arc-20160816; b=c1CcZD1b2lrpDuThM4X34CHoInijd9qveRi48utQBKfBiEFnco7iVuU9V9ZEu59c+F ztWirBfdIUJASH1RK7pNmL3kP3Hlta+xCqk9HoLbWQbtt6jMVHLmGOhC+bqmQHzuOFGQ vyyjXlhBOrX2u6TraMBkxdNdR99JHSkynMbc5XrSspBPlcPljXtVKbI08baNIKw6BzDk YL2sN4mtcF9tvm0anb3Au6mlHLGsISD9+ZmBJN5s+hC/JwY1iOsC5LsA3cH/R6HjQbhR o1n1HbZMCmKpOsOnmZ69w6ivEzS5mFHCbRcXgH/mIld3Pza/2jeUiBrnZ+dgBY74acH6 ZeFQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sN0ya1VtRlEiZqXWZc/5Q35/QBBkdEQFjDZ8af2WkQo=; b=WsoodhU26h+RjVg3yDWgTUnnsKLRcDn8o+BG0CDbuEkZz00qezVGtsRL8YITti8OCV 543di8X+nnSId9zah2nyqN3/MybUavOnJR0+SStFoX6fD8vMj/E1gW/7IxVk7Y7g9Zgq 7yQvI9z7n1juf3izTX+JNcgxWJvf1SlEl+11KAtaHVFOHEx3TpKyvtZ3h4YRRCxMJDAy 35bOQMeeLYUZti7oliQash9XT0A1jwlYaDvbmpL8qXnZoPxC7D0p44sGuWQAZadh+nIB cDaYV02chW7mE+1BbepCcKUpKLILhwTh2a80xY6pTvtUYN63B60O22Uh3Wo7FGKl9Pw4 4mzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BgVhXoVj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si3762200eja.230.2020.10.28.10.18.44; Wed, 28 Oct 2020 10:19:07 -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; dkim=pass header.i=@kernel.org header.s=default header.b=BgVhXoVj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1820796AbgJ0RiZ (ORCPT + 99 others); Tue, 27 Oct 2020 13:38:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:33582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760354AbgJ0Oep (ORCPT ); Tue, 27 Oct 2020 10:34:45 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EC426207BB; Tue, 27 Oct 2020 14:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809284; bh=U1/EQmUCs1K3RWAhVipzsNc8+B3ohnd64s0zlhr9toY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BgVhXoVjIwQ8dqQBbNgjKAJ4SsxM3QnhVm7712byXtCYujBYLGiPg4D/00zQ4+iCr RoFt8nohpxYGhWzBavS0OyaA1bNfDNSS+pzT9wpQEvNb+UP2yhdOcgulDOi+Iy45Us RvsBpJ14zTMzrmKu8kk+sc0JfEOcpal4fH40srhc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steven Price , Alyssa Rosenzweig , Sasha Levin Subject: [PATCH 5.4 141/408] drm/panfrost: Ensure GPU quirks are always initialised Date: Tue, 27 Oct 2020 14:51:19 +0100 Message-Id: <20201027135501.637067196@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steven Price [ Upstream commit 8c3c818c23a5bbce6ff180dd2ee04415241df77c ] 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 Reviewed-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20200909122957.51667-1-steven.price@arm.com Signed-off-by: Sasha Levin --- 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 8822ec13a0d61..1431db13ec788 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -304,6 +304,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, @@ -357,7 +359,6 @@ int panfrost_gpu_init(struct panfrost_device *pfdev) return err; } - panfrost_gpu_init_quirks(pfdev); panfrost_gpu_power_on(pfdev); return 0; -- 2.25.1