From patchwork Tue Oct 8 06:27:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arto Merilainen X-Patchwork-Id: 3000911 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 55BEB9F243 for ; Tue, 8 Oct 2013 06:36:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 788DE2017E for ; Tue, 8 Oct 2013 06:36:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2CF6720176 for ; Tue, 8 Oct 2013 06:36:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5A4CEE68FD for ; Mon, 7 Oct 2013 23:36:00 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D937E68B5 for ; Mon, 7 Oct 2013 23:31:54 -0700 (PDT) Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Mon, 07 Oct 2013 23:31:53 -0700 Received: from hqemhub03.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Mon, 07 Oct 2013 23:31:53 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 07 Oct 2013 23:31:53 -0700 Received: from amerilainen-lnx.Nvidia.com (172.20.144.16) by hqemhub03.nvidia.com (172.20.150.15) with Microsoft SMTP Server (TLS) id 8.3.327.1; Mon, 7 Oct 2013 23:31:52 -0700 From: Arto Merilainen To: , Subject: [PATCHv4 2/5] gpu: host1x: shuffle job APIs Date: Tue, 8 Oct 2013 09:27:25 +0300 Message-ID: <1381213648-5931-3-git-send-email-amerilainen@nvidia.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1381213648-5931-1-git-send-email-amerilainen@nvidia.com> References: <1381213648-5931-1-git-send-email-amerilainen@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, mkulkarni@nvidia.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amerilainen@nvidia.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mayuresh Kulkarni This patch moves function host1x_job_submit() to job.c file where all other host1x_job_* functions are placed. This patch also introduces function host1x_job_complete(). Signed-off-by: Mayuresh Kulkarni Signed-off-by: Arto Merilainen --- drivers/gpu/host1x/cdma.c | 2 ++ drivers/gpu/host1x/channel.c | 8 -------- drivers/gpu/host1x/channel.h | 1 - drivers/gpu/host1x/job.c | 12 ++++++++++++ drivers/gpu/host1x/job.h | 3 +++ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index de72172..910087b 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -252,6 +252,8 @@ static void update_cdma_locked(struct host1x_cdma *cdma) signal = true; } + host1x_job_complete(job); + list_del(&job->list); host1x_job_put(job); } diff --git a/drivers/gpu/host1x/channel.c b/drivers/gpu/host1x/channel.c index 83ea51b..c381441 100644 --- a/drivers/gpu/host1x/channel.c +++ b/drivers/gpu/host1x/channel.c @@ -21,7 +21,6 @@ #include "channel.h" #include "dev.h" -#include "job.h" /* Constructor for the host1x device list */ int host1x_channel_list_init(struct host1x *host) @@ -37,13 +36,6 @@ int host1x_channel_list_init(struct host1x *host) return 0; } -int host1x_job_submit(struct host1x_job *job) -{ - struct host1x *host = dev_get_drvdata(job->channel->dev->parent); - - return host1x_hw_channel_submit(host, job); -} - struct host1x_channel *host1x_channel_get(struct host1x_channel *channel) { int err = 0; diff --git a/drivers/gpu/host1x/channel.h b/drivers/gpu/host1x/channel.h index 48723b8..8401f25 100644 --- a/drivers/gpu/host1x/channel.h +++ b/drivers/gpu/host1x/channel.h @@ -44,7 +44,6 @@ struct host1x_channel *host1x_channel_request(struct device *dev); void host1x_channel_free(struct host1x_channel *channel); struct host1x_channel *host1x_channel_get(struct host1x_channel *channel); void host1x_channel_put(struct host1x_channel *channel); -int host1x_job_submit(struct host1x_job *job); #define host1x_for_each_channel(host, channel) \ list_for_each_entry(channel, &host->chlist.list, list) diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index c4e1050..3928b4e 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/host1x/job.c @@ -585,3 +585,15 @@ void host1x_job_dump(struct device *dev, struct host1x_job *job) dev_dbg(dev, " NUM_SLOTS %d\n", job->num_slots); dev_dbg(dev, " NUM_HANDLES %d\n", job->num_unpins); } + +int host1x_job_submit(struct host1x_job *job) +{ + struct host1x *host = dev_get_drvdata(job->channel->dev->parent); + + return host1x_hw_channel_submit(host, job); +} + +int host1x_job_complete(struct host1x_job *job) +{ + return 0; +} diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h index fba45f2..e0249c3 100644 --- a/drivers/gpu/host1x/job.h +++ b/drivers/gpu/host1x/job.h @@ -159,4 +159,7 @@ void host1x_job_unpin(struct host1x_job *job); */ void host1x_job_dump(struct device *dev, struct host1x_job *job); +int host1x_job_submit(struct host1x_job *job); +int host1x_job_complete(struct host1x_job *job); + #endif