Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4883529pjb; Mon, 27 Jul 2020 07:32:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygxKDuPfPYJcB5VvxiAqAHK9ZfKKBQoHUdvUSiQ05Vt4kQo3JXHB0kCfrIkXOeWtaL3wji X-Received: by 2002:a05:6402:37b:: with SMTP id s27mr5435778edw.239.1595860368678; Mon, 27 Jul 2020 07:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860368; cv=none; d=google.com; s=arc-20160816; b=aVTIp8Cowy9Y7JLD5qbXwKPj1hNafKcGqFzL5goGToVw5bduv1mjcR9w+BMD8EugYB +6+7Pr4ZRHAg87S/bD1zFWR2Nk9BIKb+ZtcPVV/VDSXD7fVzw4M49689T3u/Za9SlmXs xFVMSoVsSfwo2R7gc/rNW194Ho9DISm5dxuyYtZ9lqS7cTMNEdGEd87vwLOu2z0pI44U ysjX98UAGoHyPmTcBBYGaj0015DRCI+zNrsnP6ab8aKa857vaKX1MWcje3j6a4SpAUjh VgY11/lUO8PdZWSdDwRokZZL+4czu9yqOyETcHud4blhzzwYBhnrheC151smoBKRpziN tDww== 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=O1EkYPxY6TNtatZKdEGpDa6uezwUtOKV3PhEQKQ4LFs=; b=nX3ldFoKh31jkfuiVOIg0V96PnhpqJNGCkVzkFvqFISmtZtfav5RyjtOwX9Kew/e4A SHDfqja4MqtJLagDZrzhMA/rcWQXAygVbZuUS1oiqKbwf3x699fcB7LcTiyCeaZcOmWI jOq+D1AlKnZdSX1RdgtRBhE+iIfTfp/Ckvg09rvM1JgcueXbdNBjiPo0nAxe0lCVkQBk NRyxOXCkfpZZJ0x85QTzx6EwVKz0XhP8XOR3Doh+meRuxI9bkgH8ejcBUh9jh2iTAFCW X7oG6+AF5w7BtybPH8AX/taSsFSXFyGOjNGNLBQ0yc6IA+AsyFybRgxV6rFXIXLF9E2/ dKsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aOJbcQvP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si5537025ejg.203.2020.07.27.07.32.26; Mon, 27 Jul 2020 07:32:48 -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=aOJbcQvP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731642AbgG0OU6 (ORCPT + 99 others); Mon, 27 Jul 2020 10:20:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:49286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731616AbgG0OUv (ORCPT ); Mon, 27 Jul 2020 10:20:51 -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 8BD962070B; Mon, 27 Jul 2020 14:20:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859651; bh=hieHIYOhvmEWOXDY2W3R6y6/9MZURkm3sq/GeG6V4qU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aOJbcQvPMN4extNowZ5rjnRESmCLc8+qwBGDqJyXEDCAAYZYMeuhG5dBj8Po3MtfP Err51WpFXq5ODqQsvVaDYNL7voAHmOyflD2gePttk+XsWVHdmOTJZomzw7NOzcyxeA cjrndvb4bd/J7El7IroqYk/YmZIopD1b3Ykpd9Pk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Jerry (Fangzhi) Zuo" , Hersen Wu , Aurabindo Pillai , Alex Deucher , Sasha Levin Subject: [PATCH 5.7 022/179] drm/amd/display: Check DMCU Exists Before Loading Date: Mon, 27 Jul 2020 16:03:17 +0200 Message-Id: <20200727134933.751392896@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@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: Jerry (Fangzhi) Zuo [ Upstream commit 17bdb4a82fe5014c8aa5b2103c80c5729744a096 ] Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index d06fa63801799..7da2a22dbde7e 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1342,9 +1342,14 @@ static int dm_late_init(void *handle) struct dmcu_iram_parameters params; unsigned int linear_lut[16]; int i; - struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu; + struct dmcu *dmcu = NULL; bool ret; + if (!adev->dm.fw_dmcu) + return detect_mst_link_for_all_connectors(adev->ddev); + + dmcu = adev->dm.dc->res_pool->dmcu; + for (i = 0; i < 16; i++) linear_lut[i] = 0xFFFF * i / 15; -- 2.25.1