Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2486175rwb; Mon, 7 Nov 2022 14:00:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM7LnZsJsBTYU++vDJN3uW8S+VuVoQtiwiuUwW2RLX2Ogvg03nd+BcTUFOV2DQT/lnzysdTo X-Received: by 2002:a62:19cd:0:b0:56b:6a55:ffba with SMTP id 196-20020a6219cd000000b0056b6a55ffbamr52801438pfz.85.1667858450483; Mon, 07 Nov 2022 14:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667858450; cv=none; d=google.com; s=arc-20160816; b=nZlSFW10/mTBy8WWu4iGUKkCBXDpJZa0ziAYoRyvv8UzJFw20N9YMt6bzINYwVmPNR JEDUyinb3HXUDyLuF/s+IdzIH6KSCq+rNRb3CD/C6ORG2xk//EnKoqZPD1gLynlP9FzW /priSXBTT+4T079Z3udqrJNsFhMB2AZ9HaiFUnDmrI2WC3kg2nQV//ONTV4Vmm/MSp9U HQuw7g80/ZxjQ/+N8/oOTJHAFxddjih1hUnpiC7VjQLePapXdy1yHevmSt1fLg+qDOQa uSgIbwSbTig7o7DzwlZy1bkcNiQh5GneDWYXonb1v7+NBQwN+eozFwjYVtOdF9BdlKON Aq9g== 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=ThYCTUJ2rhfkOykU44rij2CzEMb8ETBAJg8XqzL7PtQ=; b=y4vr3rL8jErxSm8LdzdOgGXoe6gR/eLJQQgYZbLrY8IJZA7arThQAWO49tP5vGPHM7 EWgrgA5hSUTGpEGOMijqvaq6z1SxLCGnkYqNtf+77AzRhY6CryxuI+u3tYnhiME3Uode TR5xaKx1cPNIlGGFQXUp/DogKmSif6q2Ig9jOarR0mIMqCfJLlUTTIMQ1VInkZ6In/9K wa7/2tWfKjCSRn45/opZLs0TQ1USOYBjdAHcSAcP/8+KaHe434el2x5BM4PtWvmi8dv4 Sn5Cp4ImWqaNYgs6SGsfJtIgkkZw/cRW/fOxcnFgvPYeNCl4eibYDR5k3WDoJ0OTFTt2 3IiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EKoBGIv2; 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 l5-20020a17090270c500b00186a6b63515si10714351plt.214.2022.11.07.14.00.38; Mon, 07 Nov 2022 14:00:50 -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=@kernel.org header.s=k20201202 header.b=EKoBGIv2; 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 S233298AbiKGVKL (ORCPT + 91 others); Mon, 7 Nov 2022 16:10:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233348AbiKGVJn (ORCPT ); Mon, 7 Nov 2022 16:09:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610842E68D for ; Mon, 7 Nov 2022 13:07:10 -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 D677061321 for ; Mon, 7 Nov 2022 21:07:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B49FC43146 for ; Mon, 7 Nov 2022 21:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667855228; bh=35Kt7RfXTGrpmnm+A+6ICvQbAqN4Rh+f2zdGLkqxYlQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EKoBGIv2z25CaP2ZaTUHxI2NDsDw2pq7HU2Pi3V+xT6qKnFVdplEQ8Gt1Zb2YI2Ko DxHI1sKGDggo3kOkbtl5m31tGbv3KhW72f3cdiOhBr3EllnT2AV39+nngiR8VeWaCi ESR+Oq8InGTavmbG/omzYfL5Fkbnzd5clbEmXjhQ+2gP1/w1xfmYqD6C4e4gVY+FtN OZX4RuJ+RvsPrKJPeYt9EO2i9OwwDQqTm3vVuJsnEMPFwi5d4puKFOBQA+Vprs/Aay +v/Lxx0w9HuCeFcWxqpT9q3ZRjuBdgKAe/jdET1gaYomVf6+4SKOcsto9DzbXJkFdp R11xlsjNhRemg== Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-3704852322fso116372457b3.8 for ; Mon, 07 Nov 2022 13:07:08 -0800 (PST) X-Gm-Message-State: ACrzQf2no4eQ1vquiU1z1laXHVzOryAMkrSRGainn4Md2hOmX1l5yV+r 6fCbqoL0QDo4HInA2J0ModuAyXVzdR+1aUb8LVo= X-Received: by 2002:a05:690c:825:b0:36a:b160:21b with SMTP id by5-20020a05690c082500b0036ab160021bmr50210487ywb.211.1667855227298; Mon, 07 Nov 2022 13:07:07 -0800 (PST) MIME-Version: 1.0 References: <20221106210225.2065371-1-ogabbay@kernel.org> <20221106210225.2065371-3-ogabbay@kernel.org> <2f415e77-9332-2d66-cd59-05db8d5790ea@quicinc.com> In-Reply-To: <2f415e77-9332-2d66-cd59-05db8d5790ea@quicinc.com> From: Oded Gabbay Date: Mon, 7 Nov 2022 23:06:41 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v3 2/3] accel: add dedicated minor for accelerator devices To: Jeffrey Hugo 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 , Christoph Hellwig , Kevin Hilman , Jagan Teki , Jacek Lawrynowicz , Maciej Kwapulinski , Stanislaw Gruszka , Randy Dunlap Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 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 Mon, Nov 7, 2022 at 6:20 PM Jeffrey Hugo wrote: > > On 11/6/2022 2:02 PM, Oded Gabbay wrote: > > --- a/drivers/accel/drm_accel.c > > +++ b/drivers/accel/drm_accel.c > > @@ -8,14 +8,25 @@ > > > > #include > > #include > > +#include > > If we are not using xarray at this time, do we still need this include? > > > > > #include > > +#include > > +#include > > +#include > > #include > > #include > > > > +static DEFINE_SPINLOCK(accel_minor_lock); > > +static struct idr accel_minors_idr; > > I beleive we should have an explicit include for the IDR header. > > > --- a/include/drm/drm_accel.h > > +++ b/include/drm/drm_accel.h > > @@ -8,12 +8,56 @@ > > #ifndef DRM_ACCEL_H_ > > #define DRM_ACCEL_H_ > > > > -#define ACCEL_MAJOR 261 > > +#include > > + > > +#define ACCEL_MAJOR 261 > > +#define ACCEL_MAX_MINORS 256 > > This diff seems really weird. The changes to the ACCEL_MAJOR define > could get pushed to the previous patch, no? > > > @@ -23,9 +67,31 @@ static inline void accel_core_exit(void) > > > > static inline int __init accel_core_init(void) > > { > > + /* Return 0 to allow drm_core_init to complete successfully */ > > Move to previous patch? > > > --- a/include/drm/drm_drv.h > > +++ b/include/drm/drm_drv.h > > @@ -94,6 +94,14 @@ enum drm_driver_feature { > > * synchronization of command submission. > > */ > > DRIVER_SYNCOBJ_TIMELINE = BIT(6), > > + /** > > + * @DRIVER_COMPUTE_ACCEL: > > + * > > + * Driver supports compute acceleration devices. This flag is mutually exclusive with > > + * @DRIVER_RENDER and @DRIVER_MODESET. Devices that support both graphics and compute > > + * acceleration should be handled by two drivers that are connected using auxiliry bus. > > auxiliry -> auxiliary > All comments will be fixed. Thanks, Oded