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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE208C11F68 for ; Fri, 2 Jul 2021 15:34:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CFA561423 for ; Fri, 2 Jul 2021 15:34:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CFA561423 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 070096E0D7; Fri, 2 Jul 2021 15:34:15 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 689896E13C for ; Fri, 2 Jul 2021 15:34:13 +0000 (UTC) Received: from maud (unknown [IPv6:2600:8800:8c04:8c00::912b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: alyssa) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 5B6ED1F44F53; Fri, 2 Jul 2021 16:34:08 +0100 (BST) Date: Fri, 2 Jul 2021 11:34:01 -0400 From: Alyssa Rosenzweig To: Steven Price Subject: Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches Message-ID: References: <20210702143225.3347980-1-boris.brezillon@collabora.com> <20210702143225.3347980-6-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Ekstrand , Tomeu Vizoso , dri-devel@lists.freedesktop.org, Rob Herring , Boris Brezillon , Alyssa Rosenzweig , Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > Better, but I was hoping we can mostly delete panfrost_ioctl_submit(), > leaving something along the lines of: > > static int panfrost_ioctl_submit(struct drm_device *dev, void *data, > struct drm_file *file) > { > struct panfrost_submitqueue *queue; > struct drm_panfrost_submit *args = data; > struct drm_panfrost_job submit_args = { > .head = args->jc, > .bos = args->bo_handles, > .in_syncs = args->in_syncs, > .out_syncs = &args->out_sync, // FIXME > .in_sync_count = args->in_sync_count, > .out_sync_count = args->out_sync > 0 ? 1 : 0, > .bo_count = args->bo_handle_count, > .requirements = args->requirements > }; > int ret; > > queue = panfrost_submitqueue_get(file->driver_priv, 0); > > ret = panfrost_submit_job(dev, file, queue, &submit_args, > sizeof(u32), ...); > > return ret; > } > > But obviously the out_sync part needs special handling as we can't just > pass a kernel pointer in like that ;) This, a dozen times this.