From patchwork Tue Oct 16 14:15:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zhu X-Patchwork-Id: 10643597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E0EA13B0 for ; Tue, 16 Oct 2018 14:15:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EA4A29B4E for ; Tue, 16 Oct 2018 14:15:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 624EF2A14E; Tue, 16 Oct 2018 14:15:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 09BE329B4E for ; Tue, 16 Oct 2018 14:15:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D49866E23C; Tue, 16 Oct 2018 14:15:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710068.outbound.protection.outlook.com [40.107.71.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FB556E23C; Tue, 16 Oct 2018 14:15:03 +0000 (UTC) Received: from CY4PR1201MB0102.namprd12.prod.outlook.com (10.172.78.8) by CY4PR1201MB0151.namprd12.prod.outlook.com (10.172.78.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.20; Tue, 16 Oct 2018 14:15:01 +0000 Received: from CY4PR1201MB0102.namprd12.prod.outlook.com ([fe80::142:756e:c319:885c]) by CY4PR1201MB0102.namprd12.prod.outlook.com ([fe80::142:756e:c319:885c%12]) with mapi id 15.20.1228.027; Tue, 16 Oct 2018 14:15:01 +0000 From: "Zhu, James" To: "amd-gfx@lists.freedesktop.org" Subject: [PATCH] drm/amdgpu/vcn:Fix uninitialized symbol error Thread-Topic: [PATCH] drm/amdgpu/vcn:Fix uninitialized symbol error Thread-Index: AQHUZVqg/a7Rrp960UCtbBx1x6SuPQ== Date: Tue, 16 Oct 2018 14:15:01 +0000 Message-ID: <1539699282-2266-1-git-send-email-James.Zhu@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: YTOPR0101CA0022.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:15::35) To CY4PR1201MB0102.namprd12.prod.outlook.com (2603:10b6:910:1c::8) x-originating-ip: [165.204.55.251] x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR1201MB0151; 20:L/3aUYahhOE2CBOwMJn5gMv3s9uXYI11WCugeat1KbTiUpESeF+4GHfkfHkRl57CJYKmKgP1iEb13932KQoUlna6CqGh8KKDy944t6CiOx+FA6gv9OsGIYnpKeBMigp3JOWZB9vprQuJaN2os7z3Uh+rdxu5JNfsM+7z3jf21bkh7+zJbIOO/xtzLwaxyne3dV4kzACD1DZdqIneF1zw4zUt0H6+r+ecF42SyaCISqtv2Tt/yHsyijdx4fALZR6g x-ms-office365-filtering-correlation-id: e90252d1-4c14-4fee-5eed-08d63371c26c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:CY4PR1201MB0151; x-ms-traffictypediagnostic: CY4PR1201MB0151: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991067); SRVR:CY4PR1201MB0151; BCL:0; PCL:0; RULEID:; SRVR:CY4PR1201MB0151; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(396003)(39860400002)(136003)(376002)(346002)(366004)(189003)(199004)(8936002)(81166006)(106356001)(7736002)(54906003)(52116002)(4326008)(305945005)(2351001)(102836004)(105586002)(6506007)(81156014)(386003)(99286004)(6916009)(25786009)(8676002)(36756003)(66066001)(71190400001)(71200400001)(6486002)(2900100001)(39060400002)(5660300001)(68736007)(5250100002)(72206003)(2501003)(14454004)(478600001)(97736004)(316002)(476003)(2616005)(486006)(2906002)(6436002)(3846002)(5640700003)(6116002)(86362001)(14444005)(6512007)(53936002)(1857600001)(186003)(256004)(26005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0151; H:CY4PR1201MB0102.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 8g5tRoNKSWCmjFg+QDVhfTxsfU6I+mtdnNSIv00655UwniYV4Z7ND+PIH1FGJTBwd6qBD9DEkgwEuxvjLS4fDuA25HaTuZx/rk8LV7WB7/wRi9/9BAmTq8ja1Wm8wCCLNoOuV8lazIYFBe+fYQJC05BTv+wG3RqFHNr/uswhsGXVtU36CqXFLaL9Z1aMaN3H8TQkxD2joPMtVqLUaw1cTWGKkewnkXdrFZwSJq48kF9TTrs6yiG+2cK9T33YlvS7uygYL45ULgefW15NKALlCK8mDypKA71cixu4aCqtsR2vJH3iK6z6I+1hxnpD99TMYQcySw1TBbRVkdcDTXcQOykHQIOt4E48jIHPdi3LBgg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e90252d1-4c14-4fee-5eed-08d63371c26c X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 14:15:01.4173 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0151 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "jzhums@gmail.com" , "dri-devel@lists.freedesktop.org" , "kbuild@01.org" , "kbuild-all@01.org" , "dan.carpenter@oracle.com" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP ret_code should be initialized with 0. The check of read/write ptr should be activate when UVD_POWER_STATUS_TILES is off. Signed-off-by: James Zhu Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index bc64706..eae9092 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c @@ -1165,14 +1165,14 @@ static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev) static int vcn_v1_0_stop_dpg_mode(struct amdgpu_device *adev) { - int ret_code; + int ret_code = 0; /* Wait for power status to be UVD_POWER_STATUS__UVD_POWER_STATUS_TILES_OFF */ SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_POWER_STATUS, UVD_POWER_STATUS__UVD_POWER_STATUS_TILES_OFF, UVD_POWER_STATUS__UVD_POWER_STATUS_MASK, ret_code); - if (ret_code) { + if (!ret_code) { int tmp = RREG32_SOC15(UVD, 0, mmUVD_RBC_RB_WPTR) & 0x7FFFFFFF; /* wait for read ptr to be equal to write ptr */ SOC15_WAIT_ON_RREG(UVD, 0, mmUVD_RBC_RB_RPTR, tmp, 0xFFFFFFFF, ret_code);