Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2399703rwb; Mon, 7 Nov 2022 12:50:35 -0800 (PST) X-Google-Smtp-Source: AMsMyM5gDUKxzZpqV1G5BBtWGWGjOj6fC6TNpplyAZJNxNUkqOj6m7sWSjYKOa9lzG8brHquE/xX X-Received: by 2002:a17:907:2063:b0:7ad:fa6b:e84b with SMTP id qp3-20020a170907206300b007adfa6be84bmr31296615ejb.69.1667854235757; Mon, 07 Nov 2022 12:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667854235; cv=none; d=google.com; s=arc-20160816; b=AFQdgWgJudLmis0033ViREx5RVJhRqds15vcFP6mksD5PibciQDT2LtnVsqI605Ylk 9o+gwE0j5A64C7+P0LWzXVNernHLKIq9C1Z3ueqXeeemusxhWiaII7EgXkLxy1qu0sBh iDIbv+R0/qJVjaHaUojzmwXDuDDo2xCaxC2Ee9kA7iPxi4D4zX4nFhfnwGSPZVYM1t7N YrITjunx7Tko2NYyEC0qvQY5ISDeVVH4o3j9tDycxeLChhBW/zf/1L73S+uXGYLkhTiz 9zpokRj9b7TkUoCg0R0Wusxa02csOIUCNv1H7fHCu02Q2nzt15EDHBVFT4samcLsx3Sa aBTA== 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=tQ12e4GxkKyFcKEY5nkb37j7G30vKsrEMR9/r8hrDJ0=; b=FhnbuyJ2M8ARDaS85k/ae/Lx2GKdeE0B17pvxQ1dmBtMd89npNum15JCNhlnuc6anq SYD641ob4yYWEJs0KNWL9iuotsjEGzBKCcwJK/JSXgymBYOLmnjKrvm9BCiaiuMIUMlV ORo9Y3f5D9k80POPoCZ5HfA9lteu7ZU/qwPuEBynN/FP/Xqro1Qw+bxHZT6lZgrf+a0C KBL81GJP2ODM1UtvXAQRPBbYvWFFl/i+vNPeBOyOxsprAPN/58IOuWQcmvXVwR4LpXoo 08zpVvLjydRUAMuWV3TXMaV7kuTaRN1i01yzn1h5zoYCqPcAqgNZfdyHCo5ZPNySZKJD 6DHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qOA73a9B; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb36-20020a170907162400b007940226fd21si11597141ejc.903.2022.11.07.12.50.12; Mon, 07 Nov 2022 12:50:35 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=qOA73a9B; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbiKGUdm (ORCPT + 93 others); Mon, 7 Nov 2022 15:33:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbiKGUdi (ORCPT ); Mon, 7 Nov 2022 15:33:38 -0500 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AB6286C4 for ; Mon, 7 Nov 2022 12:33:36 -0800 (PST) Received: by mail-qk1-x72d.google.com with SMTP id g10so7922838qkl.6 for ; Mon, 07 Nov 2022 12:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tQ12e4GxkKyFcKEY5nkb37j7G30vKsrEMR9/r8hrDJ0=; b=qOA73a9Bu14wWQY9g3t4J1/QCrXaAC0kVgEP7vGn7s/hrSLZK1U5lSJdfg2csQ6fAK WwKqBdSf89jpNfxi2VzukRNviRsgtuVPSIMhup7OeZHHqpG5OSPrl0DXf4dSSli7uiim 1ggrG3Hq8LIxqvz5HH/ip0y8FBKwNlk3dMGK1cun8A4sMzX7BcASPDkxk6Hv40GJeJKZ DOcJVRMK545RBtSxA+LQdBLupe342yB1UI515gfRhUBaglQQy2nwZvBfUqR91ayy8M3G Tu5CcIwxmd643GZbxFCoCcwmyLvUtWsgpSCNRPmH9VR8qa7ZtAhGUPAO7GhyZU8nkYmk ctpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tQ12e4GxkKyFcKEY5nkb37j7G30vKsrEMR9/r8hrDJ0=; b=VNcaUp3rx75JmOidsB56NXJTz4ZunyxGHP8aUIOE6NePNdzCW5FcjPJrJ6d/ZdhoRx g5k6m9RYgsrDIxr1JWy5HZ2nPWtG9nXkEYwYmee9qMr2LOVoRPkb8r7sk/lL1hgLjKpf 385nydCdWwJWmsXd0nTbjJRW2Cer5KMJZEYk1P8I7H0y8SofrU9BCxizc+dNVSiVtsq6 iRUuJdRsDov6s9Kx2aNgHr6+1gMBSHfVZARvjqnrmvIJW6v4P8mAjrk5nRNyEOvTh4Ks c+J8Hw5gI9SRBxy4/EnkAs0cDXoc2kqLvVs6wS7XekkzIwa8be1GFAOtZLFeKdxVdEO8 6MOA== X-Gm-Message-State: ACrzQf0nWS6ka5wyeEFb8f212TVLa7M99lAr3QTSS/Ar9Fnrb0opPRfw fbwTmzat1apzMQtyOSizds5Md6Z+E+C0FHIUEn0= X-Received: by 2002:a05:620a:1009:b0:6fa:1245:ce4 with SMTP id z9-20020a05620a100900b006fa12450ce4mr37596615qkj.483.1667853215067; Mon, 07 Nov 2022 12:33:35 -0800 (PST) MIME-Version: 1.0 References: <20221102203405.1797491-2-ogabbay@kernel.org> In-Reply-To: From: Dave Airlie Date: Tue, 8 Nov 2022 06:33:23 +1000 Message-ID: Subject: Re: [RFC PATCH v2 1/3] drivers/accel: define kconfig and register a new major To: Jason Gunthorpe Cc: Oded Gabbay , Greg Kroah-Hartman , Daniel Vetter , Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 > > > > > > "drm_minor" is not necessary anymore. Strictly managing minor numbers > > > lost its value years ago when /dev/ was reorganized. Just use > > > dynamic minors fully. > > drm minor is not just about handling minor numbers. It contains the > > entire code to manage devices that register with drm framework (e.g. > > supply callbacks to file operations), manage their lifecycle, > > resources (e.g. automatic free of resources on release), sysfs, > > debugfs, etc. > > This is why you are having such troubles, this is already good library > code. You don't need DRM to wrapper debugfs APIs, for instance. We > have devm, though maybe it is not a good idea, etc > > Greg already pointed out the sysfs was not being done correctly > anyhow. > > I don't think DRM is improving on these core kernel services. Just use > the normal stuff directly. At plumbers we decided a direction, I think the direction is good, if there is refactoring to be done, I'd rather it was done in tree with a clear direction. Coming in now and saying we should go down a different path isn't really helpful. We need to get rolling on this, we have drivers that want to land somewhere now, which means we need to just get a framework in place, leveraging drm code is the way to do it. There is no need to an "accel" module, what does that even buy you, the idea is to have an accel subsystem that allows drivers to use drm features, not an accel subsystem that refactors drm features, that would take years. There are already drivers for this subsystem wanting to use GEM, and I don't think holding them up for a year to refactor something that we don't have a clear reason or goal behind refactoring. If there is a problem with the drm subsystem interactions with the kernel standard implementations then let's go fix that and accel will also get fixed, but there's no reason to start going down that road at the same time as introducing accel. Also with the idr/xarray stuff, this isn't the patchset to be introducing a bunch of new and divergent work, if this patchset identifies deficiencies then let's document them and work on them in parallel instead of blocking the initial landing in favour of some future refactors with no in-tree users. Dave.