Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp654596pxv; Thu, 15 Jul 2021 12:35:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/ZhywF1Hqg2Qu2vL908l4aKi4W/H5HmaJAzVUy4N91J4HgpVRaUDJsV5lR8kDSRjGHYPA X-Received: by 2002:a05:6402:1d4d:: with SMTP id dz13mr9300020edb.67.1626377725185; Thu, 15 Jul 2021 12:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626377725; cv=none; d=google.com; s=arc-20160816; b=bZYtPkBkfxftlbhRlsWpjzLLKDMmJFxWwYYw6DqPgpyNrAzloRmOm/0njdWDJ5EuCy nx4W98PneSjKOt3xuVv0IK764hTUcAvRDfVx7WvIjjg/BVCbJygX8xZwQZHXKVxZbZVN f4g1Mcf6krxqDsMnZkMSxQ06mqzarO/wzkUDXq486D1VXnjOiQDL9WQFmysrgL33ja+x Gu9dGXEYi60BazsAiBGCVXrmRcChpVTXL68/9Cus2G2hkcWOSFVMYgnMftUEAinWZNi9 yUuKSEYg55nHGhq/6GRBCcaxs+WHouIU0k6C3jlzDVXkAzSyLuKPT2ZRee+jilP6JsZg 7asQ== 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=8A+J1T0oEyGT52cwp/jpxmwur+Sbe9SAaz80YSvsgz8=; b=uJ0mSg8RsUyZWLM8eoXxNgnY42bD24TEaFSsRFlIcfTj7CBUdD30145cM7ZSMDYnsJ PbDrrbQ/QKw37V0EwumQS97cCI+xl1vtik3gGkgtDY6gfGAsaMDi8CBinPb0Ip9+2csU LMyDxspWW6OtYKfxUoD0PeNhXt3PJ9KpmPPFER9J6rFSQanw2mDlyjF9qmkkrkJOVOZ9 qBj0OmjXR1tqNe33MJusrkP1A1sCfds/xmSzpNvWX4GpKWdGDy2SY6W+WBl/fOYaVhXh 73xVnrFjTWkRmpOxZTwkktRE8drh8TKI//bh7QnVBwuqMoYcDuGu7p4cYP43QB/MDNiD 2DmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jcXzvjv5; 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 cb18si8712362edb.378.2021.07.15.12.35.02; Thu, 15 Jul 2021 12:35:25 -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=jcXzvjv5; 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 S245126AbhGOTbc (ORCPT + 99 others); Thu, 15 Jul 2021 15:31:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:45648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243538AbhGOTJy (ORCPT ); Thu, 15 Jul 2021 15:09:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2B7DD613D0; Thu, 15 Jul 2021 19:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375949; bh=MO40KtTCzKgw6sjeqzbXc98VsztHqIQAJjBSUAiLKnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jcXzvjv5mKK7oB+46oA/Nw6ro9Jinb8c9sboANIFN6o6YESxPy9a68tkQYndAveqy liX9lIgVBCFUByl+WAcsFhw9DLRESQhB6ONsxpXPEgP1Dg9xQqEUxBxkQK+YI5AtRb FhnaPTH3VM+TXpBvOBp1cjaeXo1StTSbbgDwH660= 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.13 061/266] drm/amdgpu: fix sdma firmware version error in sriov Date: Thu, 15 Jul 2021 20:36:56 +0200 Message-Id: <20210715182625.019428754@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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 240596b25fe4..9ab23947a151 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