From patchwork Fri Jul 14 05:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huzhi001@208suo.com X-Patchwork-Id: 13313040 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 485FCEB64DC for ; Fri, 14 Jul 2023 07:15:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68B9910E7E7; Fri, 14 Jul 2023 07:14:59 +0000 (UTC) Received: from mail.208.org (unknown [183.242.55.162]) by gabe.freedesktop.org (Postfix) with ESMTPS id 878A710E128 for ; Fri, 14 Jul 2023 05:21:25 +0000 (UTC) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R2KZp4vgxzBR9sc for ; Fri, 14 Jul 2023 13:21:22 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1689312082; x=1691904083; bh=7scmTbQs/wsjbW5FBE+Ka8Is++h 9WlnkMEr/CtGidh8=; b=cFZG1dXUYbwthyU8KAwnnjyKMoFPv8SYl8iJ9XuQRRZ FdcoYJpsx0yyDaiZhNIQ25XPr9iH0kvY4VOA+yXQkt7nfktYTQJ0Y9NzYJ5/d9Vr DaVmgsBxGj/kw+XgwJlNdBLEjaFpLFS1Sm3WFuYiXRav3Iu7X9EtlaDtVX5lhDIe tHxDrfKBXGb/JBq88QJYi0sCGQMCQ0TYXEFf3TowxOfHEWvOdoPZQymojfE8af/s iciuDn0LAwc2rMe9xXBFKr6FS7+Zo6XPR17yKAfjxCEMkVUxGUh9L6H+KageMXp1 WtQoDIqwMqSY5qEub/qRE8L0BfX2Kr8CKafo11SYj2A== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yjSEqWHeskod for ; Fri, 14 Jul 2023 13:21:22 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R2KZp226wzBHXhS; Fri, 14 Jul 2023 13:21:22 +0800 (CST) MIME-Version: 1.0 Date: Fri, 14 Jul 2023 13:21:22 +0800 From: huzhi001@208suo.com To: bskeggs@redhat.com, kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch Subject: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line In-Reply-To: References: User-Agent: Roundcube Webmail Message-ID: X-Sender: huzhi001@208suo.com X-Mailman-Approved-At: Fri, 14 Jul 2023 07:14:54 +0000 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: , Cc: nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: ZhiHu --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210;