Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932152AbaAWRiJ (ORCPT ); Thu, 23 Jan 2014 12:38:09 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:45948 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753054AbaAWRiH (ORCPT ); Thu, 23 Jan 2014 12:38:07 -0500 MIME-Version: 1.0 Reply-To: kusmabite@gmail.com In-Reply-To: <1389124986-32501-1-git-send-email-kusmabite@gmail.com> References: <1389124986-32501-1-git-send-email-kusmabite@gmail.com> From: Erik Faye-Lund Date: Thu, 23 Jan 2014 18:31:22 +0100 Message-ID: Subject: Re: [PATCH] gpu: host1x: do not check previously handled gathers To: linux-tegra@vger.kernel.org Cc: thierry.reding@gmail.com, tbergstrom@nvidia.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Erik Faye-Lund Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping? On Tue, Jan 7, 2014 at 9:03 PM, Erik Faye-Lund wrote: > When patching gathers, we don't need to check against > gathers with lower indices than the current one, as > they are guaranteed to already have been handled. > > Signed-off-by: Erik Faye-Lund > --- > > Here's a trivial optimization I have been running with for a while. > > drivers/gpu/host1x/job.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c > index de5ec33..e965805 100644 > --- a/drivers/gpu/host1x/job.c > +++ b/drivers/gpu/host1x/job.c > @@ -534,7 +534,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev) > > g->base = job->gather_addr_phys[i]; > > - for (j = 0; j < job->num_gathers; j++) > + for (j = i + 1; j < job->num_gathers; j++) > if (job->gathers[j].bo == g->bo) > job->gathers[j].handled = true; > > -- > 1.8.1.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/