Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp780373ybj; Thu, 7 May 2020 07:30:33 -0700 (PDT) X-Google-Smtp-Source: APiQypI4594Jrigag378vWMVpGkXDAIkoiCF7Eb9jUGdIzC9VFoyYGPlkuHb3ytXAcBxuKzPzbbj X-Received: by 2002:a50:f095:: with SMTP id v21mr12282114edl.103.1588861833607; Thu, 07 May 2020 07:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588861833; cv=none; d=google.com; s=arc-20160816; b=ZyGv1XfPAekkEtRIAHcKyh/FGlgwgyKBDMXah4pBGF0AhBp8xMwiJvUnp+03IU280O tP4UV3f1mQ9ly+ek/UvxNQc3AKlBpuwNoBkX7Wgs+Xg2BnSzUDnr30oaaL6mj7MP0Q1q czQnps7DRyzaZgsue2dxiMqfQH73kUUeaiB1k+zSK21PVufwlZQyfeyI7ASSVy6c0wdd DyRAIiCLtWh+aduFJO4aW82+CIBzUFrom9syPl071vUOK0wntechWIJQKH8qt3alhz/f 5cgqaj+CKoMmLB0441go0QOfskxTas0t8KDmZapXBO8Pr8v+9i/wPDNlLOFWynJx66Yw mjwg== 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=YXiYlUF5WCeFH9oO7FDYv7giC4ApeD3c9xn5M+etaRc=; b=lfsxTS7iktOjMi/nQbOUsw65PpzAr6YMzzb1mq6iYJjUyIM0YK13KhtijOdg0bG7eS s2TxaNkvdIrkrZUFTnImws2ZYWsS/l09THvpgZ7gvynRQA2qDvwJBIDwpRY/t4F59ZW9 0QDAWja/JvCOE/NbKxb9zy9XGrrkBtfeayhk8PZfBuyYMqrMfnOxeOC5OXQtyP8bjyr8 6e8y9tb3xqf/UDjM14tY3C6qjCKUf2JR38fNvJbNDeYNbDHq4UKalj86cJuhxNwf9FVf pymCBNE4MLf01wmuOwRPn+Of5Tm0eiPoFaR57WWvFr8fkjkDIj7tceLpVMF6C5leA0NC MZDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="CQKuv4f/"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si3311426ejx.280.2020.05.07.07.30.09; Thu, 07 May 2020 07:30:33 -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="CQKuv4f/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728011AbgEGO2P (ORCPT + 99 others); Thu, 7 May 2020 10:28:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:54460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727984AbgEGO2L (ORCPT ); Thu, 7 May 2020 10:28:11 -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 09E43208D6; Thu, 7 May 2020 14:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861691; bh=dp7iFnJlTuXJo6yAkAJuyAMkJxYlx6hfOyDpFHMYqbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQKuv4f/hJucKK16lVxMRhjz+Gtl9JWwD6HPK89uizrgHIoBYx9pmoT2b3xb32dlB pI0PCi/hpAbDgS5REhd9g9HA7vRlBASTyS70rlfdNGEJQfDLRAYx5SstaeuxJiUhqJ 6hV0OiKIGud8fRdkUVT9iOd1nNLbervxZwTBUoT8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dmytro Laktyushkin , Eric Bernstein , Aurabindo Pillai , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.6 35/50] drm/amd/display: check if REFCLK_CNTL register is present Date: Thu, 7 May 2020 10:27:11 -0400 Message-Id: <20200507142726.25751-35-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 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: Dmytro Laktyushkin [ Upstream commit 3159d41db3a04330c31ece32f8b29752fc114848 ] Check before programming the register since it isn't present on all IPs using this code. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c index a444fed941849..ad422e00f9fec 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c @@ -2306,7 +2306,8 @@ void dcn20_fpga_init_hw(struct dc *dc) REG_UPDATE(DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_REFDIV, 2); REG_UPDATE(DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_ENABLE, 1); - REG_WRITE(REFCLK_CNTL, 0); + if (REG(REFCLK_CNTL)) + REG_WRITE(REFCLK_CNTL, 0); // -- 2.20.1