Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp708056pxv; Thu, 15 Jul 2021 14:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXZngjrbIU6jhOHH8q/GketG6IncSsR/TTkX125TxGvE5VCOIw7Wfbrva6D0yMgADcR0LM X-Received: by 2002:a05:6402:22bb:: with SMTP id cx27mr9617578edb.96.1626383056702; Thu, 15 Jul 2021 14:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383056; cv=none; d=google.com; s=arc-20160816; b=X7SRDbXKUsz9MO4l2gNADlcGx1q77Ssi28pCRqAnqn8mQLdQ/o1bQqPnDvJ9ZsmA4y uX5/YZ4h2q4BIVxKI8dQXs3WvVm+vv13g1o2FBXuGlce7698/eG/6DOso2ExKlgyOYgn OmWc0rTjgsxSMbrFQqi9SlJYtAorAZtZL8f/QbazhbElo+HwVwYksvBAQMZldyLEBoqQ gow9B51aQVO4dRZ62UUC6WH5oynH4NwANqYFPqFtxXu6q3jrRK034tZN4YGhocYzmIa0 3kOkoVng8PgVAcIZ2U3q6b6jl1GvcWunBzsrlHKimr4dOGH3VcqHAGsyyudt982WQHix /mHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kcp1qnrXsI5kaisSxdgvbhm/6VJjSSrqQs/z03QiUv0=; b=HN9gOVH7zRtdJibH/zgajeBfYVygiuhHdeT94W8NN5Pr5aX1JNQf6Ku42l/pEGVF6W XF/XNCG7SaRZ+tWYF0j4OrE6wroswdEWkHQTyx8UfvE2QksVRPr4otNfFWPQlz3zK5hW 6EvTzFO5MO/wCN2FscbCLtt+8UtpHibtPQduyGJKdeXq3j4dvr307ve/I+1VVrtsf+Gy b/fJcFJVpkxOuDuDlToMzJuBO3srvR0R7uGdGZn5e9UJMmXIocobY9EneFlFnO+X2JtE GZTxPoksTdOD1i6y5w2y2VKgG3UhowLaT3HcEyXd0wN8ErRbnk6nVhlEwHcEh/wA1f+n 7GNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q2wwJU2S; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si8600764edv.330.2021.07.15.14.03.53; Thu, 15 Jul 2021 14:04:16 -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=@linuxfoundation.org header.s=korg header.b=Q2wwJU2S; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244449AbhGOTOt (ORCPT + 99 others); Thu, 15 Jul 2021 15:14:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:34230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241256AbhGOS6v (ORCPT ); Thu, 15 Jul 2021 14:58:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE812613DA; Thu, 15 Jul 2021 18:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375352; bh=P923ERhE2scix0Bmb5FE8KAJFqLGlHL+1sVq8aBO464=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q2wwJU2SwmMXjJafs04APfh4//Gb2h3w07pwMO6w7buulR1BBiaBhYC2lskjVjZ5e fZRP0rGPjmTIIeHx3adIG6usf29CfSsLyR95LLqm8yhiJaJX0Qk39vAAn+eOQqGsmg duXo3vmDw7C5S+45PWil2jks4J/ALlJeNNzAI+gQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Wang , "Stanley.Yang" , Alex Deucher , Sasha Levin Subject: [PATCH 5.12 050/242] drm/amdgpu: fix sdma firmware version error in sriov Date: Thu, 15 Jul 2021 20:36:52 +0200 Message-Id: <20210715182601.022136033@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kevin Wang [ Upstream commit 2b8f731849800e3948763ccaff31cceac526789b ] Re-adjust the function return order to avoid empty sdma version in the sriov environment. (read amdgpu_firmware_info) Signed-off-by: Kevin Wang Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c index 32c6aa03d267..f884d43d4ff0 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c @@ -145,9 +145,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) struct amdgpu_firmware_info *info = NULL; const struct common_firmware_header *header = NULL; - if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_SIENNA_CICHLID)) - return 0; - DRM_DEBUG("\n"); switch (adev->asic_type) { @@ -182,6 +179,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) (void *)&adev->sdma.instance[0], sizeof(struct amdgpu_sdma_instance)); + if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_SIENNA_CICHLID)) + return 0; + DRM_DEBUG("psp_load == '%s'\n", adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false"); -- 2.30.2