Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6419552rwi; Mon, 24 Oct 2022 00:42:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4feQZFNLaJZ8rbmVeJ2jASG8x1MT045oRnMT8lYGASz1LyOwijnXTLsBD5vSAmsmt0IRqb X-Received: by 2002:a17:90a:e548:b0:211:2c0c:cb74 with SMTP id ei8-20020a17090ae54800b002112c0ccb74mr27079882pjb.69.1666597333603; Mon, 24 Oct 2022 00:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666597333; cv=none; d=google.com; s=arc-20160816; b=e5WnbJ9SuP2EvY9HEFciaaxsGK2XYrEiVwXGX4ZLbUHHys4uhglZ92Kjf3Nx9r8K6c xO9KF1ZX8qpgNSXfQ6CymOvp7fiJhkfHmEmhSO0awyW0VYK9Rh/20lxwNtZcb982mHOn eRalURMoXlmzoomDIN5vkSYtiVCDLCoiWec1cj7FUcTvQat7qPbZFCbLRDxNLmEjINZW sGMpbE/sI+HX4CdYhA52xgkZuvh7elgkc4QryVM52i+JXKZOYht8JonkjRFf46yt9PFZ LQFMqvHgPESRYYRM8etHb+KIoNz5XN0g4XMQSa7i8F45Xvf0r7KLOHE0BEhjiP1RGyod UeCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lTJvygj+7fV9SANs/1qVFjZJz9/HS9Cwg0sEAqiSEPw=; b=RV3YroTZmkwEPcPem0OJn8oG3PYeYjs97KC/xb9yrtYUq9riy06R/i5rFEFHX8s9Yn BAprBMBgpuRJ20Q7wJf9+qbUiRYFnMF98jwIzwIe4eziooOFKvxBzHnEDgiQqwijJtk4 hdESBW6EZzlNCg2hvLtwKp9XDlGN0M7mrbLIsFPeCXgY3agjP4R5nUpvyGjwpdBDyBUD AGg++zc4jlcJ/enYww403ZqBXf2XxIcjTYWK9PglQ2SWEvNXw31oqtxKkBPlpoePXGrK 7/kdFp5dp9Lfj2Z2gBzFFx708GdX8H+IUo9f2HsozxEmQFC4cZ7PaKONBqfFv3RdspzP zcFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FOHUHrXU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q6-20020a170902788600b001782da3312asi31502111pll.299.2022.10.24.00.42.02; Mon, 24 Oct 2022 00:42:13 -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=@kernel.org header.s=k20201202 header.b=FOHUHrXU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbiJXHYM (ORCPT + 99 others); Mon, 24 Oct 2022 03:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230488AbiJXHYJ (ORCPT ); Mon, 24 Oct 2022 03:24:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 151205C9F2 for ; Mon, 24 Oct 2022 00:24:08 -0700 (PDT) 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 A65226103C for ; Mon, 24 Oct 2022 07:24:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15FC6C43148 for ; Mon, 24 Oct 2022 07:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666596247; bh=oMp4bDmweM0zCRQHLAKdcIPSEe7hySM9WY0ly2HUhW0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FOHUHrXU0bSCZUrz8P+wq7MieRM/XVj6uCuOGtnmvw5euG2A9m8AA9JP4rrWpj/AS 12fxLTdDMivX8I+OBOd2z8uTADBdgC/mmeQ1r5JRVKN7MCpKkWi9PFiN7rhLBRwZ3a hi06VhZqexpO1GhBGV/97oVBQPHxqmF/QdvfIUYuS0ybjO893vSdD6e5tBoel2aXF3 NnTpaJsIzMoTVY4oQZRRgC0AVl5CI9FYc+5a8kCcDkxbLuLJwvkyRdJZMvguZRrJWW gKLZUiJOuDb4OGcEiZC9wt0iuhHWW3KxUyRPcXqea94NoVgH+kbMImrmvT3G0pG1mD n79UOcBDz4W0w== Received: by mail-ed1-f54.google.com with SMTP id a67so27796801edf.12 for ; Mon, 24 Oct 2022 00:24:07 -0700 (PDT) X-Gm-Message-State: ACrzQf20FjBGu59tB/1iy8YlWNejXuv1ZaLO+VweeOI2d0LzJiIAhvuO KI/kkLvBRY6lxQjXCSDFNz/I0kTzHjt4vNfbTfo= X-Received: by 2002:a05:6402:42c6:b0:45c:fc58:bd0f with SMTP id i6-20020a05640242c600b0045cfc58bd0fmr29969691edc.19.1666596245318; Mon, 24 Oct 2022 00:24:05 -0700 (PDT) MIME-Version: 1.0 References: <20221022214622.18042-1-ogabbay@kernel.org> <20221022214622.18042-4-ogabbay@kernel.org> In-Reply-To: From: Oded Gabbay Date: Mon, 24 Oct 2022 10:23:38 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices To: Greg Kroah-Hartman Cc: David Airlie , Daniel Vetter , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Sun, Oct 23, 2022 at 3:41 PM Greg Kroah-Hartman wrote: > > On Sun, Oct 23, 2022 at 12:46:22AM +0300, Oded Gabbay wrote: > > +/** > > + * accel_open - open method for ACCEL file > > + * @inode: device inode > > + * @filp: file pointer. > > + * > > + * This function must be used by drivers as their &file_operations.open method. > > + * It looks up the correct ACCEL device and instantiates all the per-file > > + * resources for it. It also calls the &drm_driver.open driver callback. > > + * > > + * RETURNS: > > + * > > + * 0 on success or negative errno value on failure. > > + */ > > +int accel_open(struct inode *inode, struct file *filp) > > +{ > > + struct drm_minor *minor; > > + > > + minor = drm_minor_acquire(iminor(inode), true); > > + if (IS_ERR(minor)) > > + return PTR_ERR(minor); > > + > > + return __drm_open(inode, filp, minor); > > +} > > +EXPORT_SYMBOL(accel_open); > > EXPORT_SYMBOL_GPL() please. > > And again, this should probably to into drivers/accel/ not here. Got it, will do. Thanks, Oded > > thanks, > > greg k-h