Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3097167ybi; Thu, 18 Jul 2019 20:59:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHDFObBXqwDGcVnMnYYya3UEkLU6/WM67Z1wdu+wtNCHvgHfrj4cCJSTAoxBga49VsFuyx X-Received: by 2002:a65:6547:: with SMTP id a7mr31175002pgw.65.1563508740854; Thu, 18 Jul 2019 20:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508740; cv=none; d=google.com; s=arc-20160816; b=zFgp73LBC4SMO/NNfhy/mB6ej4uYZdOc++wSy1OugqlAUti5RCX/oZWnvz5qxHLTUA TUBOiy8s3JBnRICfXLpI1O/lXXbCGfQIs5KPQ43JBm2ziyfHsqDGUy/58IRloo/STe8B FPEnm7XB6vP2ZEKQFLrRRw/RKNTIBYC4lTYW6sQjaA+wNYA5eQHPmtHOMA1ziFF6gY9Q 6F5SWSqga0AzMu9Mw0WJRzszLQxJHEIS417ks/RJAslRzoBK+9jcmCTN94Ia5wT4r4Ae OAEcq5eFKyUbBEPODs5p3vbBHsZCtfcz987un5f6VVYY3vPHwcqe/wxDml0k/f9dKtuP AGbQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pKySKbj4oprS/clMc1IAVtCMHJDsL5Z0pUz3/Q+jtJY=; b=WJNJMxPtjzRnERcezmNSuK0NHRlTQKDNglXoDubRk8issjXdeLLKMfQDk6TuB5RQNN b7uT0ZgkTWFFT7yTcRwOnD89V6ODAU2P0xu5sNm1zR30MCPM+q/ZuoMuPNuOg+9/KmOV zKp9Ltjws6lTh5CSHilZMA1GH426O3MFBC86gTCPOpglQ9t+ZQ0UEhpVhKSMQUoeyDSB ZmyDCEmkyXJGXPTvcnT053UZJE+B6k2W5o/pNw1+nRuGsGrO3MDteAieOGlBpPal2Hsx +tNTb0u+Qdt3JrRrdtvw0hd33POvXpIs9hRw4I20CVhN8iVzz5cQm7e+0I+9DB51M5Pw r95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RN0KCMJC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si4485128pgi.116.2019.07.18.20.58.44; Thu, 18 Jul 2019 20:59:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RN0KCMJC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727619AbfGSD5z (ORCPT + 99 others); Thu, 18 Jul 2019 23:57:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:57086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727580AbfGSD5w (ORCPT ); Thu, 18 Jul 2019 23:57:52 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF38121852; Fri, 19 Jul 2019 03:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508671; bh=pzZwZKV6SoH7ske+1l+sxR65sfGTlz7DnnGQW+Z0Dk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RN0KCMJCABsDrW0aayJb6wMQmf4qXktpO7Ox0bmZPvXzosmnhN6c9jFU4wbw5I+xc pwbMrPz9ryidCulXgBF/4q3AA7VOVhZtuKs/zTxvQeY89Avjov86NTSFQtDJphZ1ob hZXPjgiQkXw9qCDHVPAy7eR7tHzlmyPc1D9S+PF8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tiecheng Zhou , Emily Deng , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 025/171] drm/amdgpu/sriov: Need to initialize the HDP_NONSURFACE_BAStE Date: Thu, 18 Jul 2019 23:54:16 -0400 Message-Id: <20190719035643.14300-25-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tiecheng Zhou [ Upstream commit fe2b5323d2c3cedaa3bf943dc7a0d233c853c914 ] it requires to initialize HDP_NONSURFACE_BASE, so as to avoid using the value left by a previous VM under sriov scenario. v2: it should not hurt baremetal, generalize it for both sriov and baremetal Signed-off-by: Emily Deng Signed-off-by: Tiecheng Zhou Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 72837b8c7031..c2086eb00555 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1163,6 +1163,9 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) tmp = RREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL); WREG32_SOC15(HDP, 0, mmHDP_HOST_PATH_CNTL, tmp); + WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE, (adev->gmc.vram_start >> 8)); + WREG32_SOC15(HDP, 0, mmHDP_NONSURFACE_BASE_HI, (adev->gmc.vram_start >> 40)); + /* After HDP is initialized, flush HDP.*/ adev->nbio_funcs->hdp_flush(adev, NULL); -- 2.20.1