From patchwork Wed May 4 16:50:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Lothian X-Patchwork-Id: 12838190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C152C433F5 for ; Wed, 4 May 2022 16:50:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D2B210FA97; Wed, 4 May 2022 16:50:21 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AE6610F955 for ; Wed, 4 May 2022 16:50:20 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id j15so2849929wrb.2 for ; Wed, 04 May 2022 09:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fireburn-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5ME8Vb8gxqOIl8C5dNwfrWec0fnVNMEI4H6/gIen6nk=; b=LsmoXB53RuJklEcAgoP/lhVs9xJZkWQ06se27ShvPyND9EE+eyYD9CCqgS6XuWxXpt J95ed7Oav/B3VQtu596CkZR50FD2mkVQyQXNc2NoxDdS5BzmW0YqgMgmZE2o9ELoYVe8 0k7hUa+2OGZQyhVPf7PvANlWUneKvKK22k6j6DqKQ98fW/hDAx+68xt8sd6twMiwHa1E trZqNqXCVaURz1kW3e5jwtWHgzfbqdIM60Wc8X/PXQ+wURfqAg3529CaoEWFcbGRHoL5 1vpjBtP8geQUBPHs5MoO9fCG6fddXTn909fVZ52lZN3qdgw9h4yr5RE3b7Vyuid2UwTQ l0zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5ME8Vb8gxqOIl8C5dNwfrWec0fnVNMEI4H6/gIen6nk=; b=ogVMJs/YbLNd+B+pO83pr7nrt5WeAgt0esaIZOiX12UU5280DF4/GcVAz6K9ba8ykh 3hBXELqZDl7r9lP/PH+TlLclCcb7I1HH+77OLzJ21pGihFZZPdOEYyPT5M5HkdcinY// JmauTJZyU1cE4g7R3s48R0z4WBU4eoscPfYgEOcAbd9qVZUsVn/fEomz/juvGQzQTcZB eMnTDX6E55753mJJ3s69/iSYauf2R+uUtoY4FirBzQAy7CqH2XeFpn7XmyyAtHj+NgIH JIG0ZLhZnb2kAaACQZjU4nqFpp4MBd/5+XAjbg/unPR20MZBpE/RR4cn07jtH8wKC/pL h8eA== X-Gm-Message-State: AOAM532ds9vo1P/HTaOev4M9bD5DfhOb8FmPlVv6/I/WthQsSe47Uq6v MaaIktIH3VJgXFbpyICQLYUsjSU1GC6FIg== X-Google-Smtp-Source: ABdhPJx8fjZFXeKn20TrWM2eFHYfX2nPxb05nZBTfwFwypVvjUbxbR+/yX8vByZjTiq0GiWvE3V/1g== X-Received: by 2002:adf:fb90:0:b0:20c:62bd:652d with SMTP id a16-20020adffb90000000b0020c62bd652dmr11902526wrr.402.1651683019155; Wed, 04 May 2022 09:50:19 -0700 (PDT) Received: from axion.fireburn.co.uk ([2a01:4b00:f40e:900::24e]) by smtp.gmail.com with ESMTPSA id t1-20020adfba41000000b0020c6fa5a797sm5930593wrg.91.2022.05.04.09.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 09:50:18 -0700 (PDT) From: Mike Lothian To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm/amdgpu/gfx10: Initalise index Date: Wed, 4 May 2022 17:50:07 +0100 Message-Id: <20220504165009.82557-2-mike@fireburn.co.uk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504165009.82557-1-mike@fireburn.co.uk> References: <20220504165009.82557-1-mike@fireburn.co.uk> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This stops clang complaining: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3846:6: warning: variable 'index' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (ring->is_mes_queue) { ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3903:30: note: uninitialized use occurs here amdgpu_device_wb_free(adev, index); ^~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3846:2: note: remove the 'if' if its condition is always false if (ring->is_mes_queue) { ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:3839:16: note: initialize the variable 'index' to silence this warning unsigned index; ^ = 0 Signed-off-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index fc289ee54a47..7ce62b12e5b4 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c @@ -3836,7 +3836,7 @@ static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) struct amdgpu_device *adev = ring->adev; struct amdgpu_ib ib; struct dma_fence *f = NULL; - unsigned index; + unsigned index = 0; uint64_t gpu_addr; volatile uint32_t *cpu_ptr; long r; From patchwork Wed May 4 16:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Lothian X-Patchwork-Id: 12838191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59953C433EF for ; Wed, 4 May 2022 16:50:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3547510F987; Wed, 4 May 2022 16:50:23 +0000 (UTC) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 05C0310F955 for ; Wed, 4 May 2022 16:50:22 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id q23so2844806wra.1 for ; Wed, 04 May 2022 09:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fireburn-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3czjZEp8b86nn6LrmtiC2bmFLn/kHp3yI7V0niu6+Eg=; b=pSB7ky8H0fhvorvzkXi50T3wg5kx5pOUg0L2w9Imz6waSNfuGfhp0xQVHhDjYHLtAX VjhuugnP/pwMi1K7pgYifn4B7XPwu15wds4tihE79qOzRg5i3CZ8g5WojtpGClAVimoe MmlPRV32Cn3d8vtQGrUG9iOFQHyveiyf7YkVF3ye5cqSZ7fZimr3LQ6/UyXxX5CN3Y4V MJfLSzR/QuGqN7jGuCwW35PLE1/ND6NfULaBg5Jmgv783+bbOwW9IRPAbfEXOQy+W23D KexkwZJ+ilijV20u1MIt4wg/phePjfMOSXwepeOZr1JyOl/zaPQcAI9qqr/XpcnoO/6t SaUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3czjZEp8b86nn6LrmtiC2bmFLn/kHp3yI7V0niu6+Eg=; b=awhZzNNxPkXVhSqHQ8c9zlAACzk3b5FpT24VfJ2gXgn4c/tv9Ztq47Q36TurR/tMMO WfpW1d59QYAQEua31dADgwb6ALOLkuEQ3JOWhM0Fru/ZUEHewKdjNvmK4H1HjyfK+6oo ImMP3OXFGnh+BucPX5kdOgSTXRoSswcO2tAKMYc9VHIrINFy4dmdFejiFml7dHdhMAfi CuMDilzDojdKICkgvbOuVXFqSe7pcx2Anv7FiPi3FiNfgqCdzLt8kopL6kUC/gH3AG58 mhpyCB74ffm9+bM8qJckoeKnxalw0ik4tVgZWvjQSalmHe0Fi4ilhBEGmkwCwoNrwViq dA8g== X-Gm-Message-State: AOAM533D/hQ6rmX/GldvGIbf5U18pv7pJf4C08Q5vqdXjQKNDl5SrsbU kAmnb7XDYfXwtnLtZJ5ukbrqE7j4xEYkUA== X-Google-Smtp-Source: ABdhPJzTIpdaqtYWKMmU9cftxXl1e46ohM3/lGyv8uJinheR2KcFvaDZtNxjNw3U94XLIL9l8+Xg7w== X-Received: by 2002:adf:dc0e:0:b0:20c:8a3f:b523 with SMTP id t14-20020adfdc0e000000b0020c8a3fb523mr1340906wri.201.1651683020058; Wed, 04 May 2022 09:50:20 -0700 (PDT) Received: from axion.fireburn.co.uk ([2a01:4b00:f40e:900::24e]) by smtp.gmail.com with ESMTPSA id t1-20020adfba41000000b0020c6fa5a797sm5930593wrg.91.2022.05.04.09.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 09:50:19 -0700 (PDT) From: Mike Lothian To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/amdgpu/gfx11: Initalise index Date: Wed, 4 May 2022 17:50:08 +0100 Message-Id: <20220504165009.82557-3-mike@fireburn.co.uk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504165009.82557-1-mike@fireburn.co.uk> References: <20220504165009.82557-1-mike@fireburn.co.uk> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This stops clang complaining: drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:376:6: warning: variable 'index' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (ring->is_mes_queue) { ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:433:30: note: uninitialized use occurs here amdgpu_device_wb_free(adev, index); ^~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:376:2: note: remove the 'if' if its condition is always false if (ring->is_mes_queue) { ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:364:16: note: initialize the variable 'index' to silence this warning unsigned index; ^ = 0 Signed-off-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index 184bf554acca..b6fc39edc862 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -361,7 +361,7 @@ static int gfx_v11_0_ring_test_ib(struct amdgpu_ring *ring, long timeout) struct amdgpu_device *adev = ring->adev; struct amdgpu_ib ib; struct dma_fence *f = NULL; - unsigned index; + unsigned index = 0; uint64_t gpu_addr; volatile uint32_t *cpu_ptr; long r; From patchwork Wed May 4 16:50:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Lothian X-Patchwork-Id: 12838192 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 64E3AC433EF for ; Wed, 4 May 2022 16:50:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C50710F955; Wed, 4 May 2022 16:50:25 +0000 (UTC) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3528910F955 for ; Wed, 4 May 2022 16:50:23 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id q23so2844862wra.1 for ; Wed, 04 May 2022 09:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fireburn-co-uk.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Vhf9YHzRt69dn6lic4YAadfvleHRgV3petNDTG/PJk=; b=YTFFFEPgNVZE+b2uRq2momkqdGIL0JX8CDOuxzGHEunbUIcTIKHDp5Xgrp6k8REBZA G4bIcHKqkRkS59TNzzWRvfdWIyBSGBVK1XYbvaNCDUlRRlLm1YOjDLEevf5P4yDpFHr+ B/EvzJpW1MnJVVxuXvZ4WeCm6izWesujWXvfzTP5AFG8QyXXFUlCShysrrO1BY7Advrj IGi7R9cLMhqsbbetxtmdmJzX6OQU4MpJKtlzQlKkZOkGj+ph7uuoShFHhX7P5aBpMgLh 4pqFdDK3QWLynMHmPVBbyRGXOTy82HRtwC4HB90tty+WUtYuGxSmhtiwCVo+kXAUXJ/m jMDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Vhf9YHzRt69dn6lic4YAadfvleHRgV3petNDTG/PJk=; b=DtFzMPdR0xznPGsHdPxuvYNEOk74rPEHduz9lz6TRKYWtw2Urvj7qHtsSbzy+zDLP6 pxV+Bc3QVJH7aKhwQyizHKfjjyFVySOu4fery2lRp6eZLcRDx5V1zQzc6zF25KwiCTk+ KtawbbbgK8FV/73AEzKjgUHLc/QYBXd6q3RujSNY+gkszMmHklvl+SZGgK9Obj/GHPby 5zF8MtYhBKpy4fUpDZVwn9QNyTGmvdClqZc93FQvIASxNd5FFtYghqu5LLfF8y+Yu6gI hxA2aXaLuqIQ7GUgR654YVIQbJyphNtzJCt6sYtxEoyHjKqZLrKFqdRxG3x3vdRp3/cT /g7A== X-Gm-Message-State: AOAM530iJ9r4lwLtF6ixmojDdd3Jf25b32udTh9lQ7IMfMhkJo7sg2ll AIbpZieINHQgfxXt430lnhIeMvG5lS+cUA== X-Google-Smtp-Source: ABdhPJxxVCY7o6nmnvKhBKPKdlEbYWF6E6fJQxupSh9sH6iSZlyfzm/cdWIHGB4NDG/s2uRhNtGLSQ== X-Received: by 2002:a5d:6949:0:b0:20a:e021:f8e0 with SMTP id r9-20020a5d6949000000b0020ae021f8e0mr17746171wrw.231.1651683021177; Wed, 04 May 2022 09:50:21 -0700 (PDT) Received: from axion.fireburn.co.uk ([2a01:4b00:f40e:900::24e]) by smtp.gmail.com with ESMTPSA id t1-20020adfba41000000b0020c6fa5a797sm5930593wrg.91.2022.05.04.09.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 09:50:20 -0700 (PDT) From: Mike Lothian To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/amdgpu/gfx11: Add missing break Date: Wed, 4 May 2022 17:50:09 +0100 Message-Id: <20220504165009.82557-4-mike@fireburn.co.uk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220504165009.82557-1-mike@fireburn.co.uk> References: <20220504165009.82557-1-mike@fireburn.co.uk> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This stops clang complaining: drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c:5895:2: note: insert 'break;' to avoid fall-through default: ^ break; Signed-off-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index b6fc39edc862..e26f97f77db6 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -5892,6 +5892,7 @@ static int gfx_v11_0_set_priv_inst_fault_state(struct amdgpu_device *adev, WREG32_FIELD15_PREREG(GC, 0, CP_INT_CNTL_RING0, PRIV_INSTR_INT_ENABLE, state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0); + break; default: break; }