Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp59814pxh; Thu, 7 Apr 2022 13:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9Cx2mQzXHOUE1ICD9gtFOEYXUXtZeAAO4yIW6mq6FxkX9AaM8Dio5DGsctfRBze1ZwVLP X-Received: by 2002:a63:3fc7:0:b0:398:aad3:3ce1 with SMTP id m190-20020a633fc7000000b00398aad33ce1mr12574157pga.461.1649365097154; Thu, 07 Apr 2022 13:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649365097; cv=none; d=google.com; s=arc-20160816; b=iYXY87dHeeOrwG8PUjKZz81NobmPGSgPQlZAl0NE8YuI4MEf990xZwBgQ35Uxm9A/8 9RMVoyVhqavEzYyMElmRlLZMDeT+IWmTjGb/Hglk9db3FISVG10crRYa/RrhqPJdC8uE 582j/T+JevIkbTvVR2C3HZaGDWjj5aSbFBxDUcUJ/yI8JcSWLkwas+OPi0+R06HvBwpd GyqSFSky5I5HqEnGMK7BxZdrzcW0lIEVVQjMeAXSGw3iXTaXDhOdWciX5mMWP9jWT61t 24QzDwbJ6d6E98CkDAScgBbPpY6rCoky6xkd0cqiwz5xCu6leL3lxftP23Ddm9aA9mFm aHpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=efsOEK74uxQH0g4CA1QrPFjgXzWZd0T4aU7euJISdQs=; b=aNxWlO2/1yNceUBaWeOwQVPXGr4HApcbbCNTQEodI2TqmQg9ltE5bbgUxwihsu3vyw Eq1tNpQvt+VLSN7iMpvC3pwnos36uAOTjwRMHANLJLDnQc2DR3MBXpWrjHTlPr4b+/BE 3ppVurX30MExSyHUo3skFIbgq79FDeYkyOYQqni9ywN2VL8sQjg+/lr3iOeOBn8LLVym PijY3zyogPHFX8rpmSPwW0RcgQV0liCUtJx1AitdugWb3cG53u+2sLy6Z9Q4oW4aXn8a 8PaF6vcsssiYEUb9/DEsTFSOLjKzBec7KK42ZGJlPG+gWY8y9Rx+fOrhVkhWEHqhKO5o gshQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qHBU2iY1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id pf6-20020a17090b1d8600b001bd14e030c0si2777474pjb.152.2022.04.07.13.58.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qHBU2iY1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB26A41557C; Thu, 7 Apr 2022 13:01:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243909AbiDGSiO (ORCPT + 99 others); Thu, 7 Apr 2022 14:38:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233629AbiDGSiL (ORCPT ); Thu, 7 Apr 2022 14:38:11 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69040559D for ; Thu, 7 Apr 2022 11:36:08 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id dr20so12608185ejc.6 for ; Thu, 07 Apr 2022 11:36:08 -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:content-transfer-encoding; bh=efsOEK74uxQH0g4CA1QrPFjgXzWZd0T4aU7euJISdQs=; b=qHBU2iY1gdx/BaLr7O+TicPwlIUJq0P588uTeJuPqy+p4jbqR3GT1rpakWQ1FwYg6H 9vCwzfhEX0k156qWY/2XNSeYGmSd+MeAcVfgmpSZkWEEDrVAlSYDO1bJf4GsKoiTaRjf Fa6uMjaxFuznkMDuOwUBW9mfx0E4B415zukgiJ+u43lIQ1HG073zu3bRGzQNn8jh3/xu BacDAA/ttzHu3krCFUSLk7uV7HDep2eeb1v4hh9429ZgHcZioQUz/CXJMUrpgF/V/bPz GF9VD56SR/TnQU6QN1TXCBYbCC+grCuIO7qj6fgtCqnT+705f9ajUuS6Zy6AG4OIQpWZ UBnQ== 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:content-transfer-encoding; bh=efsOEK74uxQH0g4CA1QrPFjgXzWZd0T4aU7euJISdQs=; b=4bJY4i3VSH6AXZIPS1aNnEmF+ZHjRztwsRQrXYoTd0zBeAvV++1gm6WC1+IghMJNVO FiztAqWv6l4d4ydguE8un6URomIPkfH0zbajYLF6A1mbnhHEKe7+EBXw1jiQTAvQbrLe 8Pd8EdAqOGx32orFYw5+waazioIUdGXdXYk/bLMlUOuB523MI3B6x7U6MFapfUPjEfmg cbqrm+M+yWrD3XPzDNx/u+nvtVhkD61ABMdKBCXEIZN9gHEiZitAJLAjCnbMFLuAD3/H ZTIQSsBoh50zqfOTfo3Ut8lpiT8k4RFeXt0z7WpOa4wwO/WtRy0S3jrrMR2mnYu/lzdr cR0g== X-Gm-Message-State: AOAM533i+Z6EQdyP/uy7l0KC9oW6nRGQ9K2UC5BGwkKLoa+Yi+PI+VtH RxRrFkJ0v+s/avgiXT74NzsOkaD225SEL2YB/ms= X-Received: by 2002:a17:906:7947:b0:6da:892f:2503 with SMTP id l7-20020a170906794700b006da892f2503mr14421854ejo.710.1649356566868; Thu, 07 Apr 2022 11:36:06 -0700 (PDT) MIME-Version: 1.0 References: <20220406165057.97492-1-h0tc0d3@gmail.com> <26951c45-f742-2f0e-f4a6-281a031c3471@gmail.com> In-Reply-To: From: =?UTF-8?B?0JPRgNC40LPQvtGA0LjQuQ==?= Date: Thu, 7 Apr 2022 21:36:05 +0300 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Fix code with incorrect enum type To: Alex Deucher Cc: =?UTF-8?Q?Christian_K=C3=B6nig?= , Rodrigo Siqueira , Melissa Wen , Daniel Vetter , Guchun Chen , David Airlie , "Pan, Xinhui" , LKML , amd-gfx list , Maling list - DRI developers , Joseph Greathouse , Alex Deucher , Evan Quan , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Alex Deucher I will do it. Initially, I came across an error that different enum types are used. Now I looked at the files, and indeed AMDGPU_GFX_PIPE_PRIO_* is used instead of AMDGPU_RING_PRIO_*. The question remains whether it is worth increasing the priority to AMDGPU_RING_PRIO_MAX=3D3 ? Regards, Grigory. =D1=87=D1=82, 7 =D0=B0=D0=BF=D1=80. 2022 =D0=B3. =D0=B2 20:46, Alex Deucher= : > > On Thu, Apr 7, 2022 at 2:21 AM Christian K=C3=B6nig > wrote: > > > > Am 06.04.22 um 18:50 schrieb Grigory Vasilyev: > > > 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 =3D 2, we can use AMDGPU_RING_PRIO_MAX = =3D 3, > > > but AMDGPU_RING_PRIO_2 =3D 2 is used for compatibility with > > > AMDGPU_GFX_PIPE_PRIO_HIGH =3D 2, and not change the behavior of the > > > code. > > > > > > Signed-off-by: Grigory Vasilyev > > > > Good catch, Acked-by: Christian K=C3=B6nig > > > > > --- > > > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > 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 am= dgpu_device *adev, int ring_id, > > > + ring->pipe; > > > > > > hw_prio =3D amdgpu_gfx_is_high_priority_compute_queue(adev, rin= g) ? > > > - AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_RING_PRIO_DE= FAULT; > > > + AMDGPU_RING_PRIO_2 : AMDGPU_RING_PRIO_DEFAULT; > > gfx_v8_0.c, gfx_v9_0.c, gfx_v10_0.c all do this. Care to fix them all up= ? > > Alex > > > > /* type-2 packets are deprecated on MEC, use type-3 instead */ > > > r =3D amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, ir= q_type, > > > hw_prio, NULL); > >