Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2349016rwi; Thu, 3 Nov 2022 16:09:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6dTWtxbpdm4tCIWCnj4gN4fMFvma0UenKpSUn0MAtBnMATeeRukrUv99rtcr37iEflWS5z X-Received: by 2002:a17:907:7e95:b0:78d:e9cf:82c7 with SMTP id qb21-20020a1709077e9500b0078de9cf82c7mr32750244ejc.724.1667516947935; Thu, 03 Nov 2022 16:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667516947; cv=none; d=google.com; s=arc-20160816; b=BERVHWjjvUcDLcaxlzVOLLBQL6/uXyaUPVKaS6oyPri5pZs4XAqJjz6V6ry23153d5 vMfdBR8zAhCBjBfzfz4AwKo9sPFqVBVpWGx3aAfeX8NsakDvxEGd+bUz8G1dEqplKoi/ cBN1RvhMINf9S/sjoXYoucsxBWIN8o1JIaEaHlDLWC0V3haZVdCOTws5FaB0DrcVn6Ep K7YXOUg7G087HyNqt8RFNzb0ZcuML/fkR9YXu2Qsi6KvhcfE90m+gFUQYv5qTnxRBh+D 6+2LnmJUtdHFON39FECudOLQEwz8rbmb14sWb92lzZ1v4JvQc0reNODqyvptkCa1tl+Z mZBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BZusuybS/G3fqSyQufc4XqFjVIDA6e/RCUhyIeA4pkk=; b=uXL2PLnXlwqXv4d7YQng8nhzrAjqjU9uvQltH1JPcMG4BsrUb/2eQioloqlh8G4hOR Mfw5VFcGA74s962ABW8aqfm0u2L/dlQq1KxkOofcQL9hcOTEzashA/WZfUETXSS68sJC LbSGf5/z0MPgxkZREdo8Q4Tx83DUB8h1kN+8sISISEIUHWcOwHt38ai2wQF7mJ31t20n OnJplERZtpexSpMdWOeIak9WAPEGtOXP5ef9Qtt4MrV0JQ6pDWjV94Gb82f216iuqFYh uRfzvqx+Xn6FUh+UVsfWv7MVU2Pxwk3S+ua3fVDdZGnjlfiywWJf61AOAtJBD5NxwDVd YWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=4e0jSjJy; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk19-20020a1709077f9300b0073c14b6560bsi3366186ejc.177.2022.11.03.16.08.44; Thu, 03 Nov 2022 16:09:07 -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=@infradead.org header.s=bombadil.20210309 header.b=4e0jSjJy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231185AbiKCXBW (ORCPT + 97 others); Thu, 3 Nov 2022 19:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiKCXBT (ORCPT ); Thu, 3 Nov 2022 19:01:19 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A063D1FCFA for ; Thu, 3 Nov 2022 16:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=BZusuybS/G3fqSyQufc4XqFjVIDA6e/RCUhyIeA4pkk=; b=4e0jSjJyo3uSGmUDYr4bVaykkA eKL9EwcPpusUgmkt8bqAa00Em2tbw6QGmG3xywMaHUiGhGhsYknTO1c92517h9IWKEYhjs1ZKWboI DAjEwIH7KUskZkSyUcqNLsYwKoxfzBsHXfVdOVvyQpF5dMWbLnsgZEfXZjjg5VMWCpQD8HWk9YCGf qDrmIppKZkvBoCUhdQptfDoqi7AttzXgRm7ne5oWRa4wV1OM8yLgjkvuA6pIJolVeN0UVe3SpoJ1x t9KMSN2JX/4BLjCmYKxm4OwcpmQuXBTvc4ef6yxEELlBJJSElG3vVGWS+eCo/4MUPf1JJF6C3OxKi 8F8L3O3Q==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqjCx-001wBw-4n; Thu, 03 Nov 2022 23:01:11 +0000 Message-ID: Date: Thu, 3 Nov 2022 16:01:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major Content-Language: en-US To: Oded Gabbay , Greg Kroah-Hartman , David Airlie , Daniel Vetter Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jason Gunthorpe , John Hubbard , Alex Deucher , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Yuji Ishikawa , Jiho Chu , Daniel Stone , Tvrtko Ursulin , Jeffrey Hugo , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski , stanislaw.gruszka@intel.com References: <20221102203405.1797491-1-ogabbay@kernel.org> <20221102203405.1797491-2-ogabbay@kernel.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On 11/3/22 13:39, Oded Gabbay wrote: > On Thu, Nov 3, 2022 at 3:31 PM Oded Gabbay wrote: >> >> On Thu, Nov 3, 2022 at 2:31 AM Greg Kroah-Hartman >> wrote: >>> >>> On Wed, Nov 02, 2022 at 10:34:03PM +0200, Oded Gabbay wrote: >>>> --- /dev/null >>>> +++ b/drivers/accel/Kconfig >>>> @@ -0,0 +1,24 @@ >>>> +# SPDX-License-Identifier: GPL-2.0-only >>>> +# >>>> +# Compute Acceleration device configuration >>>> +# >>>> +# This framework provides support for compute acceleration devices, such >>>> +# as, but not limited to, Machine-Learning and Deep-Learning acceleration >>>> +# devices >>>> +# >>>> +menuconfig ACCEL >>>> + tristate "Compute Acceleration Framework" >>>> + depends on DRM >>>> + help >>>> + Framework for device drivers of compute acceleration devices, such >>>> + as, but not limited to, Machine-Learning and Deep-Learning >>>> + acceleration devices. >>>> + If you say Y here, you need to select the module that's right for >>>> + your acceleration device from the list below. >>>> + This framework is integrated with the DRM subsystem as compute >>>> + accelerators and GPUs share a lot in common and can use almost the >>>> + same infrastructure code. >>>> + Having said that, acceleration devices will have a different >>>> + major number than GPUs, and will be exposed to user-space using >>>> + different device files, called accel/accel* (in /dev, sysfs >>>> + and debugfs) >>> >>> Module name if "M" is chosen? >> Will add > So, unfortunately, the path of doing accel as a kernel module won't > work cleanly (Thanks stanislaw for pointing this out to me). > The reason is the circular dependency between drm and accel. drm calls > accel exported symbols during init and when devices are registering > (all the minor handling), and accel calls drm exported symbols because > I don't want to duplicate the entire drm core code. But DRM is a tristate symbol, so during drm init (loadable module), couldn't it call accel init code (loadable module)? Or are you saying that they only work together if both of them are builtin? > I'll keep this menuconfig to provide the ability to disable this code > for people who think it is too "experimental". And in the future, when > drivers will join this subsystem, they will need this place for their > kconfig. > > Thanks, > Oded -- ~Randy