Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3574835rdh; Thu, 28 Sep 2023 16:31:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhFK93ObadN6cKeim4S1LOpS8KL0ODSiAt/qksyttPTpXPOUgVqt3RXJG+leGfP0kcfTQu X-Received: by 2002:a05:6870:c114:b0:1d5:f22f:7a00 with SMTP id f20-20020a056870c11400b001d5f22f7a00mr2975913oad.27.1695943869684; Thu, 28 Sep 2023 16:31:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695943869; cv=pass; d=google.com; s=arc-20160816; b=NY3EZLRB1dS5+mG4s7mA+2FUNUFaE9WK2JQDyQicpjTKHXvHTJAmDtXB3KGvc8Dzbe +FrA+K7y1W2ZXnG0AfL0QzUtao43X80W9eb4p75EugPU8ePuLadHg/iF4h4Igejz2Tdb iVkRjwmBRk467dxndcu2rUUWXN6Jtxl+boD8YuQh1NsyWYtz8lWGeJoRwkDd0+VnmyEj 0W1+EV83PfeVw8T4zP7CyN/HOLsOQx+riK8zzIabwNCB2vOpHZ7efCFIZ5KxqT7GtoxG aGDH37kVsb0vzOdQtasydQpjd0bVhLcuSbxmr86CHQZUBRXB1IoNpG7jHg4iZf8U2K/K h4UA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=85wjYwr3Ns/UtT7dhip8QiITG+sFDnmNg9IuixAWdog=; fh=baRE5/4jCuYkGjcIorexMrW7XsQWhwIHQ9Gi0CST0ZI=; b=WkctU7YksnXpMfQb9zDtdLmxV8qihWsjC6cflNjP+/o5hAJxHRMb2S0Ic/AFzWa4Ec 8Yv2zasxMiaCHCIMa/imHcN8r0WrgCyyPq6fsKVWj3uakNL+3gIUmPJntmTET9STlN9u PEb/RWcio+8Gi7zPBsKCEasztK9zXb22CIYdRFHAtpSyALKG0E+OSSZTHsLpPoJxNx6R HtenDyzDqCm8l9dgJ0I45Cmju1GKIOoJQckPHroSQ6EBfQ37+ESAzY91QBl21OVDWWr/ jw4B/bckefvyaB2UvroVwj/BvyzP2jWl4noE9EmIvBQup/JuM77d6nzMVMK5NM74uQCs o9eg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IXeq7qaM; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id w8-20020a63f508000000b0057760853700si748928pgh.579.2023.09.28.16.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 16:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=IXeq7qaM; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 63B2480465EE; Thu, 28 Sep 2023 07:31:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232202AbjI1Oa4 (ORCPT + 99 others); Thu, 28 Sep 2023 10:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231480AbjI1Oay (ORCPT ); Thu, 28 Sep 2023 10:30:54 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2043.outbound.protection.outlook.com [40.107.220.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF0D7F5 for ; Thu, 28 Sep 2023 07:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i8Krt9bHv6rysnyy0z9b1Ssz+ppdUnZW1lWS7HVILrulC4J99g+ffL5ZlT6UkiAy4GcnGPYjc0IX798bljPwIEe8Ap8pkdV1TMeMZi/MDUm62Rsm0VIP8bmFOpgV+71potHEviMgm1yXylYB1urJ3iyA4NsFil9dH0mWm3zYMfZOK3ZtKo80pwPLZngb+w+8u+yo6VW0ANu8Rn8ABYqPp/L48vuDoyzPPmoOwkpxu+xPn0RD3qyaZff6Yvf0jbdjZbk/SjwslPd1WrP/bvRcVUMxUrTyFBZl0o01qF3ieT/MqjGktZfAgnZqe96aTsSNXDX74TlRjyWpUnF/O6fvAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=85wjYwr3Ns/UtT7dhip8QiITG+sFDnmNg9IuixAWdog=; b=RQ9T5LhQUMp40hMEpa4T011OtvvGMXC22YfOtGP0YBQP6fP/TEba/FitmndumLAT6BB/69YW0p9FHqAnsKFlwLkj9X9go4jyLn+mwW9o9Vph3DCmsVPmdMx0so2FYMCw+A1FEOd9cM0kJnjTfwSWo9YJaHCglDWpPlPluy6BhD1++I+M4vtcSP/h5/5njCt0BgB8QQLXQzFfpEbKR1WztUDaJnl5TZRbQ9uO/GkncZmmF2EERrufSegnmb3GFnP7oVc7CUdEgl6TbZ09unZuvvHT6JU45Cgk3k3egRxCDVhLnRzEGRG+n6tFDwXzG6Pu0EE5NGcSdpKmIzlkhiKEuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=85wjYwr3Ns/UtT7dhip8QiITG+sFDnmNg9IuixAWdog=; b=IXeq7qaMPxFaULmXVEol9OpLSmJtzfgGA3jGNMTW728puYRb/zUL2o/mYNJjhT+HxLkrGvsmygU1FEKeQZnzs6xk3LPl/Fw53pJHejMLZZ4ld0JhNT1y8a5MOozUBDkajLenFoppbXeMHgFf02ec8DClbe6AXOsXbItYYGW7FcA= Received: from DM4PR12MB6445.namprd12.prod.outlook.com (2603:10b6:8:bd::20) by MN0PR12MB5788.namprd12.prod.outlook.com (2603:10b6:208:377::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Thu, 28 Sep 2023 14:30:47 +0000 Received: from DM4PR12MB6445.namprd12.prod.outlook.com ([fe80::ee5c:5153:5f01:6a00]) by DM4PR12MB6445.namprd12.prod.outlook.com ([fe80::ee5c:5153:5f01:6a00%5]) with mapi id 15.20.6813.024; Thu, 28 Sep 2023 14:30:47 +0000 From: "Joshi, Mukul" To: "Yadav, Arvind" , "Koenig, Christian" , "Deucher, Alexander" , "Sharma, Shashank" , "Kuehling, Felix" , "Pan, Xinhui" , "airlied@gmail.com" , "daniel@ffwll.ch" CC: "amd-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "Koenig, Christian" Subject: RE: [PATCH v2 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8 Thread-Topic: [PATCH v2 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8 Thread-Index: AQHZ8fHg0eQZm//2TkudphXmbY2wz7AwSZIQ Date: Thu, 28 Sep 2023 14:30:47 +0000 Message-ID: References: <20230928095427.4337-1-Arvind.Yadav@amd.com> <20230928095427.4337-2-Arvind.Yadav@amd.com> In-Reply-To: <20230928095427.4337-2-Arvind.Yadav@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=1dc08773-f74e-4a9a-b97c-14478189a0ec;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-09-28T14:19:02Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB6445:EE_|MN0PR12MB5788:EE_ x-ms-office365-filtering-correlation-id: 80a7d418-e197-48ef-81f2-08dbc02f8173 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3OQSQU0Wg9a7Ni9s5RKDZ/Z4+0pTkQTbPOcvyvH3M1vuWlgibYOqNEP/Wph+oH26L57JeugmK+n3zqpNok9iINbGJe6Vh8S7EaHeUUV0VF4O1O/XqOk7Epd2NRtu1mEGQf8BHVORWWPNDizATVIU/Rxy6Pn25ZP9OhzVpBPUF0JwwN9OnNwvqOr2Kn3UzKExIEFjIlIcBHAE8eetI81IZLUGG5ZEqYYaZip028UsmpLP4Nb/KQ41z92D/G+ORNs8WhVyjQic/HF4441kOevquxJ85kT5KrfGwLLZutOaD/Ul0MtNn0fjTyH7oBj2x241H0ici/QfF/H8Q6hlm/ePaPL6LBP3lgpgWyGL+7V9AoMFK8NshG8QoOP3BosEdyHNuTy1i30EXmui1rNiuTAOQkLvK4KmqU7VonwdUzUX3D7hXWjcGJt05+NDUtXGcoXxTBgdYSmvEWArMZJ91NHZN56dI2g4Tuo9ZGwGFZ9YJZVRLzIPp/JA4mghjiWd3UUyRIb65gdNKsHgvhm4mijQfgI+xbyeajAxv4haM/04631Z44pDLjNH4GT2fqcMK+EnJs9C2O94F3tqMMocmxqrRUQcfBMdaP1c2klh65QMa5XrebmarayUZAmh4Yu8D7wSa0dRQWdCWhXxDIzU8Sr28Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB6445.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(366004)(346002)(376002)(396003)(136003)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(2906002)(9686003)(33656002)(6506007)(86362001)(53546011)(7696005)(478600001)(55016003)(71200400001)(8676002)(4326008)(8936002)(41300700001)(38070700005)(38100700002)(83380400001)(122000001)(26005)(5660300002)(921005)(52536014)(76116006)(110136005)(66556008)(66446008)(66946007)(66476007)(316002)(54906003)(64756008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?d/HmNdaYYVeW6PilqtfQ9PbwBAlvfWWnDP4PO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GDVeX7U7/5yimlcuu3POYZSy3w/u1bZSn17YGiUPNrPwyrcJq?= =?us-ascii?Q?VML59JEKL6HrYdQHBZLVZD2ttLbtvq/DaVp9daerrVNh8xfsjqk5GK81DvbD?= =?us-ascii?Q?lQzXSNG/tbq0DdspEaSxhUVwi0JLcVcqomHwZsKoJXpRwJ/L6///Y/zX2r17?= =?us-ascii?Q?nB7BwrcH4i9cgdUkRHDm7tgciFGWJ7bnrBrUwFu2G3UEqOBuP4akpIBzSulD?= =?us-ascii?Q?sWqS+taz2affBZ60cfxQYiC4/NzNPYwDIabXUPr7qIvtqG1TdhXhzXlHoNGj?= =?us-ascii?Q?zCf+IF6Td20finpViF5y2UEse0qR9E8hidh+mP/t/vM48mz4pls/oCZ1ETR8?= =?us-ascii?Q?L9tprSJwymooiz5gS1GIxVkp9Xo1RUYae2+8qfEhnTDRe55YMi5cRHSsPDvR?= =?us-ascii?Q?ScjwucIgzpD1FwB1SrrHi+Ye5PH7yzxdHKy/krwDRZ8Htybf/TnzEi/j5PI2?= =?us-ascii?Q?20yXfTkPFoGkg+mRppBibLVGeRkO+E6tctFt18dR2VtJUSALRdIneFdPC0da?= =?us-ascii?Q?mcj/qED2PUM0f9yA8NM8Ku35pdco2+HHOXPJmzuDnvLYlaM42AG/DA9jCZBX?= =?us-ascii?Q?0L0BpgKbxZbrJOZi8OQBe5DCACXceLyZG1sVaIXn1TujJr7QoGSpG1muysha?= =?us-ascii?Q?Uv3EZAjGRyTbzg3rRAk=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB6445.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80a7d418-e197-48ef-81f2-08dbc02f8173 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2023 14:30:47.0702 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vDXhjIngrSZlWm40Xq35Qoo9wjDkKz6MrSjyWjE9T7wELin6Lh/Gkl8lnI3xd4+wFIqbobkuFiZcwbib6XcpuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5788 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 07:31:07 -0700 (PDT) [AMD Official Use Only - General] > -----Original Message----- > From: Yadav, Arvind > Sent: Thursday, September 28, 2023 5:54 AM > To: Koenig, Christian ; Deucher, Alexander > ; Sharma, Shashank > ; Kuehling, Felix ; > Joshi, Mukul ; Pan, Xinhui ; > airlied@gmail.com; daniel@ffwll.ch > Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux= - > kernel@vger.kernel.org; Yadav, Arvind ; Koenig, > Christian > Subject: [PATCH v2 1/1] drm/amdkfd: Fix unaligned doorbell absolute offse= t > for gfx8 > > This patch is to adjust the absolute doorbell offset against the doorbell= id > considering the doorbell size of 32/64 bit. > > v2: > - Addressed the review comment from Felix. > > Cc: Christian Koenig > Cc: Alex Deucher > Signed-off-by: Shashank Sharma > Signed-off-by: Arvind Yadav > --- > drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > index 0d3d538b64eb..c54c4392d26e 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c > @@ -407,7 +407,14 @@ static int allocate_doorbell(struct > qcm_process_device *qpd, > > q->properties.doorbell_off =3D amdgpu_doorbell_index_on_bar(dev- > >adev, > qpd- > >proc_doorbells, > - q- > >doorbell_id); > + 0); > + It looks like amdgpu_doorbell_index_on_bar() works only for 64-bit doorbell= s. Shouldn't it work for both 32-bit and 64-bit doorbells considering this is = common doorbell manager code? Thanks, Mukul > + /* Adjust the absolute doorbell offset against the doorbell id > considering > + * the doorbell size of 32/64 bit. > + */ > + q->properties.doorbell_off +=3D q->doorbell_id * > + dev->kfd->device_info.doorbell_size /= 4; > + > return 0; > } > > -- > 2.34.1