Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp579302ybl; Wed, 21 Aug 2019 02:14:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0rF0lftTSJUTITt5ewyjxZfiOo3B0zwihAdPAscB1uLjAso6N2iV8Ir18RS4rcJLV602F X-Received: by 2002:a17:90a:f:: with SMTP id 15mr4244671pja.93.1566378840623; Wed, 21 Aug 2019 02:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566378840; cv=none; d=google.com; s=arc-20160816; b=pdbKD7njv8CoaLIzxQaqPq/FiSCUb7Cw+KuGwW9TILpWk5hY2I6IvondlYFM3/yN9P yNBlDSIpzjTk97iEGqGQ8plJgeQDPIXr08oYY0t5fLhJJIffn/ewMSy9eCbXSoviw9lU U4SqZ/vfDtAxQAIqviu3UhjFJpI3wet+9anmPf7a0DCUUkw8Q36TP6VZcBHJh2QU2+E+ NbUD2ch4FkZotrCH9y4nGi7dV7RE/icFnulBlLjQlaUTwWUfX0I75tC4csSYejd56ipp yj+XLa1LZ05IZQtFkq/jAyBHRJVO7XK58njrPV67OR4SlCF8IrOxEQ7GDJNznoBlRKMz HUYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=6zf3R++J3VK5mTOAkxF7P1akjIJtdPkmIojd0IPY5T8=; b=olFGvYf1xD5x/Ff4DffhRa5a9Ys6XU4Hl4cxTypkgF/YtLSGfpQMGPc/HjK4A/DLkQ HjWUVnUiTrTYqcTneglHJ/HqAzSpa8pajARPCH3B1VLAeFXTeN5M2mea03qvD98098rD t8bW/D4e7eJ4gHEgIzZjtXu/pcpi+bPY6bFvq3LeMgwirgROKu7DVT2Icxp1SSTYTcpt LxZO0m240KSXFhq5posxnDgNSVkKkKDaQ4mzQ5YtbbiRx8Ul4iyzgDO9oZ8cTzKJLQ+G dh/q1ENFgn68YZvtVIkCQ8MkHj1L1TkiUMns28h6cfpil96F3UurTroJGEXDVWnxd09K eYJg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t70si13773032pgd.573.2019.08.21.02.13.45; Wed, 21 Aug 2019 02:14:00 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbfHUI57 (ORCPT + 99 others); Wed, 21 Aug 2019 04:57:59 -0400 Received: from foss.arm.com ([217.140.110.172]:54748 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbfHUI57 (ORCPT ); Wed, 21 Aug 2019 04:57:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 082D1337; Wed, 21 Aug 2019 01:57:56 -0700 (PDT) Received: from [10.1.196.133] (e112269-lin.cambridge.arm.com [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CC303F246; Wed, 21 Aug 2019 01:57:55 -0700 (PDT) Subject: Re: [PATCH] drm/panfrost: Queue jobs on the hardware To: Rob Herring Cc: dri-devel , Tomeu Vizoso , "linux-kernel@vger.kernel.org" References: <20190816093107.30518-2-steven.price@arm.com> From: Steven Price Message-ID: <2dbb2b86-c409-1f58-275d-bec054da4dd5@arm.com> Date: Wed, 21 Aug 2019 09:57:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/08/2019 18:02, Rob Herring wrote: > 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: Gah! Sorry - I probably should have pushed this out as an RFC anyway. My DDK-on-Panfrost investigation showed a decent performance improvement, but I hadn't actually tested with the Mesa driver. And as Tomeu has discovered that it actually slows down I guess we need to investigate that before merging. Steve > -: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); > ^ > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel >