Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3145894pxj; Mon, 17 May 2021 18:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS0qlsH+5k5iwmYWnKOamcMP2BVMms8xlMZxQB98U5/O7H3a5GqIaTn4Tid3vJQ29EZ6nD X-Received: by 2002:a02:cca4:: with SMTP id t4mr2959226jap.67.1621303119784; Mon, 17 May 2021 18:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621303119; cv=none; d=google.com; s=arc-20160816; b=XD43C57f8KekFAxZ1icu4pAyf1yHtu1+HXcOTgBK1aGTNOc2bOzEe2uk7lKtH9xC4P 8GNlgXNHeU2ZlhkyvmZF4MjosINCtUxL4Q7RHAxgFClbPl0sa93ZQlBkxGNdKI/xedHt 0egf7mLtJ4FZZiVnoCAP2rT+g7sYz9VWdZxddU/oyZT8QINHihanEKxwaCaqnRG6n5NU v9Q1wkjldWWv8vupkIXTxBOk8Nj70lVh2KwqjkR5KFOIRctLhLtTXdQAP7E6TjNBo5LD s7AzTEi5WnfYw/guU2FIPY1+uM7rbEJ+nljjOK8PN9uJ8GbGNtyPiKcuU631+duLdiEl nP/w== 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=BQOY6gQDna343HWB+cZun69i2eLwZqimcTY2oo528A4=; b=Yomfs5Ub/PkPHjT0F49UCulyroCp19Y6QkMO+Kzm+jMd2LowywxgSI2LxHE8smmtWx nreptQfotqKkphdVsw54ODpkoEXLgNV9RxLQ3WitGbkH4jYGclT28GP/tmDPZ4jPPQs+ icjAmM0fW3gxt3nxwe4/z7XgC57gZ0xKMkb0cFm3uxlt5m3V3iNzNFBKdYkJm7w3oAfp 4yilbAX7JyO1lnAYwAD/gWg4PjNm7QbjP51rNabkLvy9gGddXlkXgR3fEHzemz7/Ozzo ZYmDJSG5R6osz8zLPiIThzMLkbDb2bhnJXnp2PzMbJVX45G+Q84hrvXKO2ry5kulR6tG +Nnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W5s3EAdP; 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=pass (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 l10si16626558ilv.37.2021.05.17.18.58.27; Mon, 17 May 2021 18:58:39 -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=@linuxfoundation.org header.s=korg header.b=W5s3EAdP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239610AbhEQOgk (ORCPT + 99 others); Mon, 17 May 2021 10:36:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239798AbhEQOcI (ORCPT ); Mon, 17 May 2021 10:32:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 98ECA6187E; Mon, 17 May 2021 14:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260955; bh=JZqn9YUYgXqbdsw3UJqgUoZNEMHCDSDsyp1CcJCbWk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W5s3EAdPwvDrxc+VEIG54+oUq/wN1ltXZL2Mqa2q3RK6CPnWCpwJg7FiiZuZ7NhQH 4yiG/yQRE+El9oQkZK2GICJlsXwHkApa2cgshLL5lEDRR0qODlCCDidbzn1zLusssB Fl1UH2Kf7WI4BvDj0mv23AxQFyiuomIqMRFCEmJU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Marek , Rob Clark , Sasha Levin Subject: [PATCH 5.12 274/363] drm/msm: fix LLC not being enabled for mmu500 targets Date: Mon, 17 May 2021 16:02:20 +0200 Message-Id: <20210517140311.878859439@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@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: Jonathan Marek [ Upstream commit 4b95d371fb001185af84d177e69a23d55bd0167a ] mmu500 targets don't have a "cx_mem" region, set llc_mmio to NULL in that case to avoid the IS_ERR() condition in a6xx_llc_activate(). Fixes: 3d247123b5a1 ("drm/msm/a6xx: Add support for using system cache on MMU500 based targets") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210424014927.1661-1-jonathan@marek.ca Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index d553f62f4eeb..b4d8e1b01ee4 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1153,10 +1153,6 @@ static void a6xx_llc_slices_init(struct platform_device *pdev, { struct device_node *phandle; - a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx"); - if (IS_ERR(a6xx_gpu->llc_mmio)) - return; - /* * There is a different programming path for targets with an mmu500 * attached, so detect if that is the case @@ -1166,6 +1162,11 @@ static void a6xx_llc_slices_init(struct platform_device *pdev, of_device_is_compatible(phandle, "arm,mmu-500")); of_node_put(phandle); + if (a6xx_gpu->have_mmu500) + a6xx_gpu->llc_mmio = NULL; + else + a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx"); + a6xx_gpu->llc_slice = llcc_slice_getd(LLCC_GPU); a6xx_gpu->htw_llc_slice = llcc_slice_getd(LLCC_GPUHTW); -- 2.30.2