Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2625999pxa; Mon, 17 Aug 2020 14:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziklXCa8XsKvKAEe/BWtlQNIJjKFocHQVDt8WG889JbkmcXp7QIjganSzrps1RrI++Xsh0 X-Received: by 2002:a05:6402:22d5:: with SMTP id dm21mr16442011edb.211.1597700812052; Mon, 17 Aug 2020 14:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597700812; cv=none; d=google.com; s=arc-20160816; b=dtMTuRrND/toogWAI87R+DzMLyVLkU+O85xewxrXJfIju82ngqhdi4B2PUU4jgb2AL svkYk2mTqdic/pR01gHGPBtDmoJ/Jq6j4jLpSrp2DC4O6sln10UC3cbaBkRcTyEbRIwq fiVhsV6QSMHMByr69dWnyYgvmypZgA74e06oXzz8UZ/q7PmS3xET/t7Xk8aTVx5eCbNt H5IdFpNIzvWaKNd1ttiC04zDx7akO94mosQY7mfOFe7urs+jLCXNLrRB8PRx/DzqOUeb tps/XYUczGtCXV+1Xpdi8O/gw1ZRM35EZUwFhNzWuBcMzNzeQmi78NEqzHYg8OpAdVuK pIRA== 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=EujUS+w2jswvog9PrGGspRT9xCEuIMPiXq0p5+i0MjY=; b=fCeWZzvwlMCN9TYEvqqv5gkvPTbRSRTEmoODor9iw05uWSGt2lrsBRLYOAyLgtOrwc SxAxIT9tsSOX1xpRrSO8IgrFGXBj9Z4vMkuLbhl2cPwFibcR3kwZlQt90wapG7sutI6x dOVG8XNTtXjPnwaZ8clEQmNAzhDY1QljcaBiRTfxx8K3NrtKGg1cPaLYpra5T7OyLvBu jj635yO3/FW0ek0twC9kBGt98R3KFf0/4ZRk45fg7kTKiJKpn9EDqMmJE8wjRfyRD3a+ qhpP8X5UYUeQHxQMDFAVtFJy3F8jAi8xh6J/WtjSpBjSwSXBt89B5SDBUkiy6OJmR1Lc Nt5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KV+eUaWQ; 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 g22si12018531ejw.97.2020.08.17.14.46.28; Mon, 17 Aug 2020 14:46:52 -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=KV+eUaWQ; 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 S1729375AbgHQPYq (ORCPT + 99 others); Mon, 17 Aug 2020 11:24:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:50522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729434AbgHQPXX (ORCPT ); Mon, 17 Aug 2020 11:23: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 CC14422E03; Mon, 17 Aug 2020 15:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597677803; bh=HM15DRQruEOLK3MMp93V+owjUYiahA5zhe7I8I3MwYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KV+eUaWQETMI4jUWgGRALiu4A4VLVebojnMKBpoSNkRMHU8RTcABb2AWsiLstnbjo PkAMGnr45/s71LIqwhrvwERNh5yYmyF/KxU2TeLYx7qyijnnh6bonMppeVV7mf9J97 FPyu7k5dNdhNI5AlKYP1m0Vn+Hl8A0WkOUKq6z30= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Alex Deucher , Sasha Levin Subject: [PATCH 5.8 113/464] drm/amdgpu/display: properly guard the calls to swSMU functions Date: Mon, 17 Aug 2020 17:11:06 +0200 Message-Id: <20200817143839.220765202@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@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: Alex Deucher [ Upstream commit 4072327a2622af8688b88f5cd0a472136d3bf33d ] It's only applicable on newer asics. We could end up here when using DC on older asics like SI or KV. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1170 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c index 7cee8070cb113..5c6a6ae48d396 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c @@ -106,7 +106,7 @@ bool dm_pp_apply_display_requirements( adev->powerplay.pp_funcs->display_configuration_change( adev->powerplay.pp_handle, &adev->pm.pm_display_cfg); - else + else if (adev->smu.ppt_funcs) smu_display_configuration_change(smu, &adev->pm.pm_display_cfg); @@ -592,7 +592,7 @@ void pp_rv_set_wm_ranges(struct pp_smu *pp, if (pp_funcs && pp_funcs->set_watermarks_for_clocks_ranges) pp_funcs->set_watermarks_for_clocks_ranges(pp_handle, &wm_with_clock_ranges); - else + else if (adev->smu.ppt_funcs) smu_set_watermarks_for_clock_ranges(&adev->smu, &wm_with_clock_ranges); } -- 2.25.1