From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C656C4332F for ; Tue, 8 Nov 2022 12:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234276AbiKHMtA (ORCPT ); Tue, 8 Nov 2022 07:49:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbiKHMst (ORCPT ); Tue, 8 Nov 2022 07:48:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14F81928B for ; Tue, 8 Nov 2022 04:48:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0FA3061522 for ; Tue, 8 Nov 2022 12:48:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78680C4314F for ; Tue, 8 Nov 2022 12:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667911725; bh=/C+b508gAj/Q+BmeIpxPFXFveLDZojLGt927GrLKC/s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=T5XI5kDaxuWTZFlRoTxCxMjci3972mvKPT1Js/gWkB4QwmGvSLR9AwDBnJK2CZOvs BpwvKvfXohfo44tUC4z7BDUfwN7o/4TG2+sVrKWmcuAssZ9lKqCVJTMJdTMqsBN8Sw jSEBWQHBJJN221ZCDrWEAH3SAdopIIwNkZiQCFH7V19QjvVfWMXoNAH2fPCkgQUIOf OqmjawYaRAToWUNGQg0XyvXtMeYb8HWpxyCKY8T7jOZqBbrSTA8VG31nARZqhIThup yxF/ydBFHmxSrqHbX9W7ihHn/V+TW6EfUq7F0sL8CLT8hWGDrL2mb+nCpOPobmUnVi s3wtUuAIC5eBw== Received: by mail-yb1-f174.google.com with SMTP id n85so11619892yba.1 for ; Tue, 08 Nov 2022 04:48:45 -0800 (PST) X-Gm-Message-State: ANoB5pllAJAXpAYrAGHsrfSS27+SSIuxgR6ibImSLCXdPZo4tiMyP2Oc pY6oyyLRN5pfYydGTJHpKTA0hY/ZO1LdF5PLhHg= X-Google-Smtp-Source: AA0mqf6aAqrZKqRWPUmWG7Y6EiQsDi9ZjRKXAfj/lEixKDnfne0KRvlHho7AtHsaSH9EO35/AhsJIFG/EbpEjWqqjdI= X-Received: by 2002:a25:2389:0:b0:6d8:7f81:edaf with SMTP id j131-20020a252389000000b006d87f81edafmr7102372ybj.443.1667911724199; Tue, 08 Nov 2022 04:48:44 -0800 (PST) MIME-Version: 1.0 References: <20221106210225.2065371-1-ogabbay@kernel.org> <20221106210225.2065371-2-ogabbay@kernel.org> <20221108124614.GA6397@linux.intel.com> In-Reply-To: <20221108124614.GA6397@linux.intel.com> From: Oded Gabbay Date: Tue, 8 Nov 2022 14:48:17 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v3 1/3] drivers/accel: define kconfig and register a new major To: Stanislaw Gruszka Cc: David Airlie , Daniel Vetter , Arnd Bergmann , Greg Kroah-Hartman , 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 , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 8, 2022 at 2:46 PM Stanislaw Gruszka wrote: > > On Sun, Nov 06, 2022 at 11:02:23PM +0200, Oded Gabbay wrote: > > Add a new Kconfig for the accel subsystem. The Kconfig currently > > contains only the basic CONFIG_DRM_ACCEL option that will be used to > > decide whether to compile the accel registration code. Therefore, the > > kconfig option is defined as bool. > > > > The accel code will be compiled as part of drm.ko and will be called > > directly from the DRM core code. The reason we compile it as part of > > drm.ko and not as a separate module is because of cyclic dependency > > between drm.ko and the separate module (if it would have existed). > > This is due to the fact that DRM core code calls accel functions and > > vice-versa. > > > > The accelerator devices will be exposed to the user space with a new, > > dedicated major number - 261. > > > > The accel init function registers the new major number as a char device > > and create corresponding sysfs and debugfs root entries, similar to > > what is done in DRM init function. > > > > I added a new header called drm_accel.h to include/drm/, that will hold > > the prototypes of the drm_accel.c functions. In case CONFIG_DRM_ACCEL > > is set to 'N', that header will contain empty inline implementations of > > those functions, to allow DRM core code to compile successfully > > without dependency on CONFIG_DRM_ACCEL. > > > > I Updated the MAINTAINERS file accordingly with the newly added folder > > and I have taken the liberty to appropriate the dri-devel mailing list > > and the dri-devel IRC channel for the accel subsystem. > > > > Signed-off-by: Oded Gabbay > > Tested-by: Stanislaw Gruszka > > I tested those patches with intel_vpu driver. After initial troubles, > I got things worked with our driver and user mode components. > > Regards > Stanislaw Thanks! Great to hear that. Oded