Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2968859ybl; Mon, 19 Aug 2019 10:03:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyEyQzZyIvp6+pgyk3knjLA83LtW3PmgHu77QZRbaXhpgbe3FXz1hMHot/yUSmwcHKG1s+ X-Received: by 2002:a17:902:8f81:: with SMTP id z1mr23176086plo.290.1566234218086; Mon, 19 Aug 2019 10:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566234218; cv=none; d=google.com; s=arc-20160816; b=ezNiPOHL3BH44zX28orq3HrsEy5YSH8NckM/ADMh8WYeI/KABI1NEPqBmscMkN/0Ji /U+r0GxKcX0ifsxk9VEgMFb3+vttU7k4PAkUpCsiQScoYuC0Chk59/19VbBNL4u1BxYS M/qVSaX4Vp6XliQuXzrxJ3Qt+eOp7y7MdasM3ozl6kMEchWdV7k7podFpO0KCeEaCYBa qnBWvuGh84GmBM9qYuaKNyOxjkLqToG2rl8hbqXwFwpTeJxOP0wiJR3Mp7h6MbwYSzk9 BPRKNqEjtdytpXVPsuS1l5vHtVts0U5FM7kLgPUAhOFVVH7KE1dPRANVUOTHOb7ao2z+ 5cTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gHyWH6sNpUYJEtnumGtwENk3C7Gem+9biPVaofPHK7I=; b=AMvlFn/DuGtwpGpcO46ni+kAqxvjuoIKgGL6RDQLzinBmUmlCRIDGw0yqlhpqRPyp0 5xeW360ijHOI5nuFImmDFe7TpruG33zsrx46oggetdfBwTAx11eS/QeyQjYXLjeT9LY+ WGaORvJMQyDbBuLZo0hxEDmUOY4oipVOXYQNazfQmB/RjGp+WAGldVRh4efXfkwIlm0h ZR34AcEeif4gCkA03paprLhMwRLMIxvU/+nfbaJQdiBC/F1ZwceC7LC40DNbhOtSoiZ0 UaVSkYfDHqyU3wWM0b9fL2nXqf0uy+z2dvcxvZpSlfeJT9/fxwTqOdSh7STaGCPwxNK3 DqPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Jhhx8s4L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o29si10150098pgm.380.2019.08.19.10.03.22; Mon, 19 Aug 2019 10:03:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Jhhx8s4L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727819AbfHSRC3 (ORCPT + 99 others); Mon, 19 Aug 2019 13:02:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:52916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbfHSRC3 (ORCPT ); Mon, 19 Aug 2019 13:02:29 -0400 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32BA022CE9 for ; Mon, 19 Aug 2019 17:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566234148; bh=X1SmKw8+Qs82soC95f0giRHZ3qgpvQWn1B0nZevQGCw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Jhhx8s4L2e65Oshpsk6mO5CmzknalE1g0DQzH/FgoJHwUR2tHIQ7w13sMBZoFeaio 8QeKVxDc3AkLVjzBMdHu5j5//Y20mAFIv7tRRAI0BxzwdM4lRd0PGC0xfaRvXTsvP4 iSfPHpwPY1OdCVaLcsEkbPXai6Vnbmgd6PAktpdk= Received: by mail-qt1-f169.google.com with SMTP id y26so2679269qto.4 for ; Mon, 19 Aug 2019 10:02:28 -0700 (PDT) X-Gm-Message-State: APjAAAVOwbJDXuzewKK7lME9QtiK0qiewIgfXGkii5ENE+JLf1cI0ZwF 6kdM2Mo3xKgESnXt3UECOJ/uihQghQMc3i7P0A== X-Received: by 2002:a0c:9782:: with SMTP id l2mr11504993qvd.72.1566234147247; Mon, 19 Aug 2019 10:02:27 -0700 (PDT) MIME-Version: 1.0 References: <20190816093107.30518-2-steven.price@arm.com> In-Reply-To: From: Rob Herring Date: Mon, 19 Aug 2019 12:02:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/panfrost: Queue jobs on the hardware To: Steven Price Cc: Tomeu Vizoso , dri-devel , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 11:58 AM Rob Herring wrote: > > On Fri, Aug 16, 2019 at 4:31 AM Steven Price wrote: > > > > The hardware has a set of '_NEXT' registers that can hold a second job > > while the first is executing. Make use of these registers to enqueue a > > second job per slot. > > > > Signed-off-by: Steven Price > > --- > > Note that this is based on top of Rob Herring's "per FD address space" > > patch[1]. > > > > [1] https://marc.info/?i=20190813150115.30338-1-robh%20()%20kernel%20!%20org > > > > drivers/gpu/drm/panfrost/panfrost_device.h | 4 +- > > drivers/gpu/drm/panfrost/panfrost_job.c | 76 ++++++++++++++++++---- > > drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- > > 3 files changed, 67 insertions(+), 15 deletions(-) > > LGTM, but I'll give Tomeu a chance to comment. Though checkpatch reports some style nits: -:46: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!pfdev->jobs[slot][0]" #46: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:143: + if (pfdev->jobs[slot][0] == NULL) -:48: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!pfdev->jobs[slot][1]" #48: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:145: + if (pfdev->jobs[slot][1] == NULL) -:53: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #53: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:150: +static struct panfrost_job *panfrost_dequeue_job( -:67: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!pfdev->jobs[slot][0]" #67: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:164: + if (pfdev->jobs[slot][0] == NULL) { -:71: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "pfdev->jobs[slot][1]" #71: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:168: + WARN_ON(pfdev->jobs[slot][1] != NULL); -:160: ERROR:SPACING: space prohibited before that '--' (ctx:WxO) #160: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:497: + jobs --; ^ -:165: ERROR:SPACING: space required one side of that '--' (ctx:WxW) #165: FILE: drivers/gpu/drm/panfrost/panfrost_job.c:500: + while (jobs -- > active) { ^ -:204: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) #204: FILE: drivers/gpu/drm/panfrost/panfrost_mmu.c:150: + WARN_ON(en >= NUM_JOB_SLOTS*2); ^