Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3610552rdh; Thu, 28 Sep 2023 18:05:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUC3GkM07nRBBItKdmr2cNP7xAGKOzFI1oKf/nYwYeHx6UJ9JUSihY2hICBg7DZoGkBVvy X-Received: by 2002:a05:6358:6f12:b0:13c:eea2:d021 with SMTP id r18-20020a0563586f1200b0013ceea2d021mr2212557rwn.9.1695949551074; Thu, 28 Sep 2023 18:05:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695949551; cv=pass; d=google.com; s=arc-20160816; b=cyG2mcTrhxpAmBwVxs1mcd7aMf0XwfYk6r+IVo2FUvqV3bNCRCYLoCrXyULjfbEEx0 8cdSS3LydCAZlvY/V6svHTsRnfjL11OzZlPCXoKPPJkWM5suvML1DoppzwKgYLTXTMzJ MUJFJTlL/G8IFoNwK1yXNe3A3arll094WF+3GDx6szUtXeQJdb1Lxaoi2/qH6Sxw1qAA mRYWGqWvNROXQPeviUzX0v44M60/Ja96QtKhSNVbfM72Q3wca5iuAPi6Ia5DJ8gpxoQC 4IyM8qkohynhbbMftVmqWQ5gqaHh2t56c44ZqYYu3ZZxJsumu6/8LkEd+QiUNv97q8EV hEqw== 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 :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature; bh=CNll4Let09F7CJcRI9yjdJ5Bbn0Vx18tRKrxMbx7kzs=; fh=h7T5Krqi2WdtNGCRQhttioCP/TsqVE3K37cC2eiUVSA=; b=rqf/ILzch3vB1cT0xUGddoMaOOUpxgnG8lneHwcmAjEjw79Mk7Ic1GogKoU5j9TKVZ ZDt8TDHs4CdNBdY33mYLLodsbwkIcWC8iYJ1IXHppaUXCvJATayfMnenaOJ5/O5ZX30l uwDmlTb2g63+AupCmrs72E11BbcaEWHNKFIIMZ7toafpndYirYJYCdQ82azGYhoAVALN U+IGdm06TRMr1Gs1FxpX5hCPsKPkJYwr+90N8vBZOfNTX0YqJ17OnXp0JOaE+jpg5fIB GcDMFhVivG9agVeFlTPoDX23fqoXvKiU6AMRg++np1BcQOAuuNUyUM/HYzfiVIskc5Rn q2hQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=SZrajnv8; 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:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id k70-20020a638449000000b005859ed0e6efsi446567pgd.533.2023.09.28.18.05.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 18:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=SZrajnv8; 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:6 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 pete.vger.email (Postfix) with ESMTP id 474C08026BF7; Thu, 28 Sep 2023 11:53:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbjI1Sxi (ORCPT + 99 others); Thu, 28 Sep 2023 14:53:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbjI1Sxg (ORCPT ); Thu, 28 Sep 2023 14:53:36 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2048.outbound.protection.outlook.com [40.107.101.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997F119D for ; Thu, 28 Sep 2023 11:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oR1R2DAR/QqaTvpid49tZewWfNOh1ccPI101JPgb6KxK96OKAjXheo9vTFW8aNYNb8/5tYSjTSiTQAdWR3UKAe6OTrScNhv8Q9EI/0Y7PAqu5dX6+I8riHfcahroxm9XwhxLzYwIwHTxibNBD5hXuIg/n5FqcwHxrFIgRQeCdLUFncqN9U5Ao4y/PwC7mRviNZZmoIS9lE/G2wjxBqMe5CbF8MRaawY89fla8N3SFTeMF0gVgv/M8lUbEiKpgHJ1+NGSrpC6lbCngtGcHEVZafwWjOyLqltWeKUYikZrQbyLLaODKzMmWod1mgz4N1DzOJflMW1RVAr+eDFnd1l1Lg== 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=CNll4Let09F7CJcRI9yjdJ5Bbn0Vx18tRKrxMbx7kzs=; b=euxVuDCJnHBxFO3j04r82ewfpMxBRifoychze019951M4O2SuKeUqBIxM7VHC3Q9E2t0uNBiC7hV/bqVUOYlAjt1q2HloiTdcJKlR/0Q8uHV+/mR5bkoNEFJfN4fK/34JLnznqR0AGnITicJUrTvq4WWGxXymzE7NUs1l4Aya1qUNPBgMBO4HdAwHqbJF9WUnr3xDsr9MMOQ1SDzG7Kj2wYMpme/3WDZ0cfpDSwhsft95RpUQyBiy7oSmTF6tSgc7iNXQj24KPIaT9bLKzU8zov6JvqejRdxAsLCN9hcm+Yb8aLqP/W35PiPhHWxvNNzL+g9NYc9IWIrghAUA0eJJw== 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=CNll4Let09F7CJcRI9yjdJ5Bbn0Vx18tRKrxMbx7kzs=; b=SZrajnv8yStKk8lgqasdaJ1uyMd66W0u8cMzrDw4XER2UzBoNNpjK6qBxR04fNdfdsPeVwewSjOo4cZ41xcWGoi2Rr8+9wtf50cg967bXPDgxm3mXgADktJ7DvYdK608vaE/xG3LXnmsnU3bR7DHhtEGfpYeeI5t6PFuiU3Nb3Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN9PR12MB5115.namprd12.prod.outlook.com (2603:10b6:408:118::14) by BY5PR12MB4100.namprd12.prod.outlook.com (2603:10b6:a03:200::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.25; Thu, 28 Sep 2023 18:53:32 +0000 Received: from BN9PR12MB5115.namprd12.prod.outlook.com ([fe80::2e40:ffd7:e752:644f]) by BN9PR12MB5115.namprd12.prod.outlook.com ([fe80::2e40:ffd7:e752:644f%6]) with mapi id 15.20.6838.024; Thu, 28 Sep 2023 18:53:32 +0000 Message-ID: <2f56333d-4549-3118-5cd0-3ad2be025b66@amd.com> Date: Thu, 28 Sep 2023 14:53:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 1/1] drm/amdkfd: Fix unaligned doorbell absolute offset for gfx8 Content-Language: en-US To: Shashank Sharma , "Joshi, Mukul" , "Yadav, Arvind" , "Koenig, Christian" , "Deucher, Alexander" , "Pan, Xinhui" , "airlied@gmail.com" , "daniel@ffwll.ch" Cc: "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" References: <20230928095427.4337-1-Arvind.Yadav@amd.com> <20230928095427.4337-2-Arvind.Yadav@amd.com> <8cd0539d-5d5e-e670-9577-7db72393b784@amd.com> <8c9c3b5b-ba1e-ba07-3001-242eab9ca1a6@amd.com> From: Felix Kuehling Organization: AMD Inc. In-Reply-To: <8c9c3b5b-ba1e-ba07-3001-242eab9ca1a6@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: YQZPR01CA0032.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:86::12) To BN9PR12MB5115.namprd12.prod.outlook.com (2603:10b6:408:118::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN9PR12MB5115:EE_|BY5PR12MB4100:EE_ X-MS-Office365-Filtering-Correlation-Id: e5168708-810b-4812-e102-08dbc05435ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3f1cm9pyrUD3VbgurN9e+eqW3E2GkCLBKtUBfhQOi4kyL6xxMwvEvBBu6Orlv32m1x/74h6kDW55PGEkFvvfORyIWAaQ57L5Or1q6Ol1ik4s8ZLgkfUcIFScSIIUpJB1dc3hQ7BpVmb/Mlk/xb1p9Uo5ECF4twsLFhKykNKfVQ7/3YzzQqa7W4vt4HFYyl74ribKX16Y4jQivUcyUuMhAwxbADKIM9TgEaosMuepqz7nzjtF8tUqKDzhzNlkeIXgSBQXjSYQpafiiY7XkwCPSFez8J3PqBjY3DksE2nz6pctf6PwgsaI18fieSn57WRdqgreIxSlV9aIU6oeskJRWsISOYGIRYf03Wox+zrOVv7gWxJX7RssJR01NNXpJkh6TNvCivWT0ye31q3jdpJiDr7rPOLnDD+Rm9vElF9r1r0xmSjPfizoSGb1OC57jELYP/z67P4rOUMkp/ctt9Uvh1GOZLOu6CxnaKF0dLBXzKwq4cG3exyslRPywLgk4sr2okXeQVI9K0RFZyqjdWkxpmFUlaypp5Hbfww9ZrVpRsLdw+DVXmp+k8L7fRAXjXHPQJyrUZUj4DIfNlvQNwVedK0ElQkjvcRWFhPkTLfQ2ELx6Axxs6izNn2Q8tGOKRyzIIwj3k31cK7wjIhenXayEBclkTKr93ctHhx3TGpYcRs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR12MB5115.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(136003)(376002)(366004)(39860400002)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(31686004)(36916002)(6486002)(6506007)(6666004)(478600001)(53546011)(2616005)(38100700002)(31696002)(86362001)(921005)(41300700001)(83380400001)(2906002)(26005)(6512007)(66946007)(110136005)(66556008)(36756003)(66476007)(5660300002)(316002)(44832011)(54906003)(8676002)(8936002)(4326008)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dzBiMitsMlhpK2p6bE8zalg0enV6Q2h4UHZWUndUa0lYeHhxWmhrZmU0dEla?= =?utf-8?B?M01KWThWUjdlY0lSOXdUeTN0eGd4cUVKZlBLR3JGK0wwYm9kbmJqVkRjZUxQ?= =?utf-8?B?N3hQL3VKQlZudjRZMWord3JwNDI3WTgyZHBIcjRs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cwMGtRdzlMRGJyRG5OQVp5Y3k1SWJ0WDVM?= =?utf-8?B?bzRmOTRZSm1jMDc0ZFZIUVFpZmxHWFlpcXpwVkg0L1pYTnk5eHh2ejIvMUdU?= =?utf-8?B?dGJNeS96YVVxazJtbFpSZG5NUmt4d0lxMzBQREVSMVJRb2ZSV29LcHFqeFcv?= =?utf-8?Q?COT/jhLE6/W6qPuyWv2CmOba4?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5168708-810b-4812-e102-08dbc05435ef X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5115.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 18:53:31.9895 (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: FSgoMJdDAbtBof+PnkvKFfOX1Tx0oPjuHyMars1bsGziwFrsLb3WXGhUOVPRDTcbAmGZqHh/DwNil0zOwD88JA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4100 X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 pete.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 (pete.vger.email [0.0.0.0]); Thu, 28 Sep 2023 11:53:49 -0700 (PDT) On 2023-09-28 11:38, Shashank Sharma wrote: > Hello Felix, Mukul, > > On 28/09/2023 17:30, Felix Kuehling wrote: >> On 2023-09-28 10:30, Joshi, Mukul wrote: >>> [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 >>>> offset >>>> 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 = 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 >>> doorbells. >>> Shouldn't it work for both 32-bit and 64-bit doorbells considering >>> this is common >>> doorbell manager code? > > > Yes, You are right that the calculations to find a particular doorbell > in the doorbell page considers a doorbell width of 64-bit. > >> >> I could see this argument going either way. KFD is the only one that >> cares about managing doorbells for user mode queues on GFXv8 GPUs. >> This is not a use case that amdgpu cares about. So I'm OK with KFD >> doing its own address calculations to make sure doorbells continue to >> work on GFXv8. >> >> It may not be worth adding complexity to the common doorbell manager >> code to support legacy GPUs with 32-bit doorbells. > > > I was thinking about adding an additional input parameter which will > indicate if the doorbell width is 32-bit vs 64-bit (like > is_doorbell_64_bit), and doorbell manager can alter the multiplier > while calculating the final offset. Please let me know if that will > work for both the cases. Yes, that would work for KFD because we already have the doorbell size in our device-info structure. Instead of making it a boolean flag, you could make it a doorbell_size parameter, in byte or dword units to simplify the pointer math. Regards,   Felix > > - Shashank > >> >> >> Regards, >>   Felix >> >> >>> >>> Thanks, >>> Mukul >>> >>>> +     /* Adjust the absolute doorbell offset against the doorbell id >>>> considering >>>> +      * the doorbell size of 32/64 bit. >>>> +      */ >>>> +     q->properties.doorbell_off += q->doorbell_id * >>>> + dev->kfd->device_info.doorbell_size / 4; >>>> + >>>>        return 0; >>>>   } >>>> >>>> -- >>>> 2.34.1