Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3397622ybp; Sun, 6 Oct 2019 11:02:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAIjISKOGoqxz3ol779Y9YNNBR7m9WGguegH2o4ix98VJPxeQV7r55uSOukv3QS5q4Q6CD X-Received: by 2002:a50:ac0d:: with SMTP id v13mr25295151edc.189.1570384974957; Sun, 06 Oct 2019 11:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384974; cv=none; d=google.com; s=arc-20160816; b=DPwDIkkk3NupUBZvAqUbfw8kxbGKZ3vrcMj/+orLFSmat/fHX2FX5zv13fuM14pZWI uZM3DWSEAkufa9dd4ZYlGu53LX3V4/NN2B4jsYOHKm4nrksq0Na5cGSG6Ec0DowWBLOt ZONVPcCpoiy5NmUejf7a8KP2M18wz0s/JSsyQ7CHx5AZOMkuFlIPaAbG+qG4Ec1yQhSi MZ1Sv63xxnRDrpsD1LfKHUG5X1vY6AqVJ5yvlSxB+YF9KuxTAI9eoFhG7zLRiAb/UI/u DvOSpjrcCyl5IVxZhvUP1PdHhFb+t4i6ZiidMN1/G1JaEfaeEuHVpNWLU01p//n4Pdaz J0OQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SyheEMRaH/BgUa1yiDphJItMv51NYPluaM5euwEjJj8=; b=hoE8cXyw8e45st8I8tympTWsUpGV//sciidtT8VKXj6jpu7rgh1iASmIa9G0iBTvBk AbWNuX9AP2xWhUrUQ+pQLHFYd45/DwyZWEtRmUqcRoupoQB79CeCOdkzO8xvD+csLWle xa8qbCpPLp1j59PWdAS0EGUNWn8NHTAhqxOxHKcngWuoExnmeKdBoyZQRsrI0aSWlLSB cg1T3JtyxPzH0hOhbVj1byzsuDIUkYGWB6yLs+O5GUPXHmCya2j0bXxzCwe/PnVBilfx 1pGHZ7XQsIwyJXPjDrt/CR9AB8NHoSWMKq+mwuTXZIcPrqffpu64W2asivgc9pY0Gz35 dp1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s121UijM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si4630222eju.406.2019.10.06.11.02.31; Sun, 06 Oct 2019 11:02:54 -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=s121UijM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729138AbfJFSAP (ORCPT + 99 others); Sun, 6 Oct 2019 14:00:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:55060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728964AbfJFR3X (ORCPT ); Sun, 6 Oct 2019 13:29:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 BF72E2080F; Sun, 6 Oct 2019 17:29:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570382962; bh=htkfBfXqO+GVK1S/HG3m6+YLChtc6ahE2SbDC3kh2MU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s121UijMNXD1+PJwnVVf7gZYA09A3fJnecb8uikRWBMdN2MARs1eAjEfTwlrhfKhS bnT4EG41H1i/tlLMcfCXYeAKFvBxsnBkiuyf4sQgvNBxWdpk04Fv99DaBI48YNXlB7 rp3idBYTvurxojxaZw6h42fv+/YBLcWlXTDjibgs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean Delvare , Ken Wang , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , Sasha Levin Subject: [PATCH 4.19 034/106] drm/amdgpu/si: fix ASIC tests Date: Sun, 6 Oct 2019 19:20:40 +0200 Message-Id: <20191006171140.287601264@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jean Delvare [ Upstream commit 77efe48a729588527afb4d5811b9e0acb29f5e51 ] Comparing adev->family with CHIP constants is not correct. adev->family can only be compared with AMDGPU_FAMILY constants and adev->asic_type is the struct member to compare with CHIP constants. They are separate identification spaces. Signed-off-by: Jean Delvare Fixes: 62a37553414a ("drm/amdgpu: add si implementation v10") Cc: Ken Wang Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/si.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index c364ef94cc366..77c9f4d8668ad 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++ b/drivers/gpu/drm/amd/amdgpu/si.c @@ -1813,7 +1813,7 @@ static void si_program_aspm(struct amdgpu_device *adev) if (orig != data) si_pif_phy1_wreg(adev,PB1_PIF_PWRDOWN_1, data); - if ((adev->family != CHIP_OLAND) && (adev->family != CHIP_HAINAN)) { + if ((adev->asic_type != CHIP_OLAND) && (adev->asic_type != CHIP_HAINAN)) { orig = data = si_pif_phy0_rreg(adev,PB0_PIF_PWRDOWN_0); data &= ~PLL_RAMP_UP_TIME_0_MASK; if (orig != data) @@ -1862,14 +1862,14 @@ static void si_program_aspm(struct amdgpu_device *adev) orig = data = si_pif_phy0_rreg(adev,PB0_PIF_CNTL); data &= ~LS2_EXIT_TIME_MASK; - if ((adev->family == CHIP_OLAND) || (adev->family == CHIP_HAINAN)) + if ((adev->asic_type == CHIP_OLAND) || (adev->asic_type == CHIP_HAINAN)) data |= LS2_EXIT_TIME(5); if (orig != data) si_pif_phy0_wreg(adev,PB0_PIF_CNTL, data); orig = data = si_pif_phy1_rreg(adev,PB1_PIF_CNTL); data &= ~LS2_EXIT_TIME_MASK; - if ((adev->family == CHIP_OLAND) || (adev->family == CHIP_HAINAN)) + if ((adev->asic_type == CHIP_OLAND) || (adev->asic_type == CHIP_HAINAN)) data |= LS2_EXIT_TIME(5); if (orig != data) si_pif_phy1_wreg(adev,PB1_PIF_CNTL, data); -- 2.20.1