Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp832999pxr; Mon, 11 Apr 2022 08:18:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsPRvu4L29nYM8maHFjsDLpJQhV5ckf4fkTIsm35hNFkGSGGzDPrOMknUBSLttZPg0Pprk X-Received: by 2002:a17:907:728c:b0:6e8:a052:4f03 with SMTP id dt12-20020a170907728c00b006e8a0524f03mr1527287ejc.344.1649690317422; Mon, 11 Apr 2022 08:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649690317; cv=none; d=google.com; s=arc-20160816; b=0bbGwjKkOReBHSavt0slr8fhM1Ir0UQvwlm7VPaQOKeSlx7A7Nv8Xh1aY2QIqPiUnH 2g5Y2NM5975qeoteXMXVCKypD4qtWs1pJGi4+yBsOzYOmImERSj16CmS0dMwLZXwcJi+ cwwpO7UjxT0S1v+haF8kPcjLhfzBf7wbyv0GEJ8D0xtP3OaG1xq2pigh/c8t1tyx76o7 w97PWxlE5GIvb3oXGQKmA/248lZnxgSVfumzZrase8dIOCyC2smrdM4v1CsIxybyKmlT 4UXgxh1tAqDeyjmCWNp6VCvKwAHdUKBwfgJE8b4uqqzeFTRn0lSTM6yWSGnCe4EWFLaO lGyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NVt9zQ5epwlrSvoMeShV1kYIiF5qT44eNDTkjicb+jA=; b=wyRnaLWN9tC4PqNtB0QUEVIIqXppXVc6wXR4rVkCkCFkJkBm2lpxoZ4lt8g6OOkqXk R0oweSKYp5eIJR+bB0a25TpzVfGC+syExeLyHls10sTU7vlvy2jPov/Rnazol7d0pR2s KHa0k/LROzAofpBDPIxVT/OqQ1BxI0TiZpiJ3b5ulhJI1OsWgxWnXXzBvQudksE8eQew ccF0kZJyR9+umEEVdfON9FUkyUHyEQVKHcUcVf03lanWrcKrqpQ/Bul0NNRfzDMrm00E rX6Ds5MtZzbkawpC5jya60pRwXQLmS+bZiJEV1w/oAxGQp2sh/ZT3adu+cE6Z2t9wCfH y5Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gs+lbsdQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa30-20020a1709076d1e00b006e4b4049463si9068250ejc.429.2022.04.11.08.18.10; Mon, 11 Apr 2022 08:18:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gs+lbsdQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233970AbiDHUxP (ORCPT + 99 others); Fri, 8 Apr 2022 16:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbiDHUxO (ORCPT ); Fri, 8 Apr 2022 16:53:14 -0400 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FE8C2EF154 for ; Fri, 8 Apr 2022 13:51:10 -0700 (PDT) Received: by mail-oi1-x234.google.com with SMTP id e4so10071055oif.2 for ; Fri, 08 Apr 2022 13:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NVt9zQ5epwlrSvoMeShV1kYIiF5qT44eNDTkjicb+jA=; b=Gs+lbsdQG9zot9bavDh0f7Tzv1cgCzIaSTYNoJnG+JGf8L2F7mx9Bq67eEK9shk0vt y7afXfvK0GMevHxdbn3BlZPf/3IghJpNXQwVgrhQPrw3I6sU1RgwW31J/UE6rEPXf4FS FrEzbh4BmrgvFE+QnTZ4M0CpJhVm9fZybIeLq84oZqRE3Xj4R7vw5mkebm5BSh8/UEPP Y9s5PZ4/H6Ey+k0hBuLcZAJ+Qoxw5PlpFvRyTT3xiLrT/g19tAEj1Kw8gMwSAmGM5Gss 4PsATYK9QTYti51gLYiPBG+KiRu2XBvzINfEPtVlNm5h78VCIkZ94ox+FcuYu9kzCGXm Hx0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NVt9zQ5epwlrSvoMeShV1kYIiF5qT44eNDTkjicb+jA=; b=0ESoKuUZh9VdkxKQTjoGSdEx8b4TVX27KJQRwVsELvsITnPma1pOPt047vjpYOPf3N G9fwi5UsLoQSdWxRI/N/GX7r4E9Zkn81k+Gz3g5nxTzqjGzwBq8T2K3GF3hzuKmBKkUE FCD+PSpG6RsV6YnrMfSQwjIGVVjL31LJDHq5+vGoMZ9jbEKFjVclGatGvNyhVYcYGnpA i9llh73wvqMne6r8T3y8f1Kh/uo1F7ummok1gimpbtlB/+IJ0ZxCuAF0XX4XRJnE4uqZ aHqzaBrYcPBpHTownG/sKaLRGImQKCuM2SJEZ4egWC7fbOlhaNIIZkZAGKtgq8/S+jDC REEQ== X-Gm-Message-State: AOAM5309dKwSqNKmvB3DQ4Zz3ik/FYGb3BoDVnY3ZzCAho25yG9miPvp 2rlYoIxH7RCMKQH15B3yprEyEjwAAYu6mJTKQTw= X-Received: by 2002:a05:6808:199e:b0:2f9:d699:6ad0 with SMTP id bj30-20020a056808199e00b002f9d6996ad0mr741374oib.200.1649451069431; Fri, 08 Apr 2022 13:51:09 -0700 (PDT) MIME-Version: 1.0 References: <20220408075820.10396-1-h0tc0d3@gmail.com> In-Reply-To: <20220408075820.10396-1-h0tc0d3@gmail.com> From: Alex Deucher Date: Fri, 8 Apr 2022 16:50:58 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Fix incorrect enum type To: Grigory Vasilyev Cc: "Siqueira, Rodrigo" , Melissa Wen , Lijo Lazar , Yifan Zhang , Tao Zhou , Chengming Gui , Guchun Chen , "Pan, Xinhui" , LKML , amd-gfx list , yipechai , David Airlie , Victor Skvortsov , Huang Rui , Maling list - DRI developers , Joseph Greathouse , Alex Deucher , Peng Ju Zhou , Evan Quan , =?UTF-8?Q?Christian_K=C3=B6nig?= , Hawking Zhang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! On Fri, Apr 8, 2022 at 3:58 AM Grigory Vasilyev wrote: > > Instead of the 'amdgpu_ring_priority_level' type, > the 'amdgpu_gfx_pipe_priority' type was used, > which is an error when setting ring priority. > This is a minor error, but may cause problems in the future. > > Instead of AMDGPU_RING_PRIO_2 = 2, we can use AMDGPU_RING_PRIO_MAX = 3, > but AMDGPU_RING_PRIO_2 = 2 is used for compatibility with > AMDGPU_GFX_PIPE_PRIO_HIGH = 2, and not change the behavior of the > code. > > Signed-off-by: Grigory Vasilyev > --- > drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > index b3081c28db0a..1d9120a4b3f5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c > @@ -4745,7 +4745,7 @@ static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, > + ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec) > + ring->pipe; > hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ? > - AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL; > + AMDGPU_RING_PRIO_2 : AMDGPU_RING_PRIO_DEFAULT; > /* type-2 packets are deprecated on MEC, use type-3 instead */ > r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > hw_prio, NULL); > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > index 5554084ec1f1..9bc26395f833 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c > @@ -1929,7 +1929,7 @@ static int gfx_v8_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, > + ring->pipe; > > hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ? > - AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_RING_PRIO_DEFAULT; > + AMDGPU_RING_PRIO_2 : AMDGPU_RING_PRIO_DEFAULT; > /* type-2 packets are deprecated on MEC, use type-3 instead */ > r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > hw_prio, NULL); > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > index 71cf025a2bbd..029c97c92463 100644 > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c > @@ -2278,7 +2278,7 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, > + ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec) > + ring->pipe; > hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ? > - AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL; > + AMDGPU_RING_PRIO_2 : AMDGPU_RING_PRIO_DEFAULT; > /* type-2 packets are deprecated on MEC, use type-3 instead */ > return amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type, > hw_prio, NULL); > -- > 2.35.1 >