From patchwork Tue Aug 7 13:07:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10563431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BEFC14C0 for ; Sat, 11 Aug 2018 12:06:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEE852A2B8 for ; Sat, 11 Aug 2018 12:06:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D34532A529; Sat, 11 Aug 2018 12:06:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E9F82A2B8 for ; Sat, 11 Aug 2018 12:06:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F4956E1C0; Sat, 11 Aug 2018 12:05:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id D283A6E3FC for ; Tue, 7 Aug 2018 13:09:31 +0000 (UTC) Received: by mail-pl0-x244.google.com with SMTP id u11-v6so7116076plq.5 for ; Tue, 07 Aug 2018 06:09:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lsOtx16AxfbBHSko8SMIaVbUyhKMO7+gBiA+J7XcJzs=; b=SXdDIfyedxmbdD3JKBVel7DQTxVygJWcbuHR7enm1DBHV9g8ngy0yHiVtVSmBPDAzb 6PD89jAV9x/VwqtFWZ14I1FAzOfFZ5bgLcWPSN6byHyb95ciegs1OVO4QmCsyj7IUCIi GVt/FjhzNO6/cVxfXDF/gozK1fGQQ8goze7oyD469SyJrgJON/JNImJps0z336hmToc2 MujGNjmNXU5sQ56eJU0rsxlvx5LQgHqy9WslyTzDA0lVdpE5Ik8YDaTRyOYdcbSFw2ze QVrXVPtxRJVW3FaAYp7f3IDcW+wvztbvxxrv+rlhGblvVkV8FOi2hxrQ83uaMX+E1taa OXiQ== X-Gm-Message-State: AOUpUlHDBeAbV+UWwdcl7+0bHsC/wY7xYHBCxtu+7Sb1ikwA/Y73wdHC dIvHAiWwgmhV1rOxbwLvp+fx5Xzv X-Google-Smtp-Source: AAOMgpeVxDmnx5gABr39DOCCY9o8CrvjYZpJ7FIxsJ0/ZI8Z1QMIhMCvcCJ+P+l5ybw8Gwh0uZ7fvg== X-Received: by 2002:a17:902:9a01:: with SMTP id v1-v6mr18059215plp.20.1533647371539; Tue, 07 Aug 2018 06:09:31 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id 73-v6sm5339229pfu.20.2018.08.07.06.09.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 06:09:31 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen Subject: [PATCH v2 1/3] gpu: host1x: Cancel only job that actually got stuck Date: Tue, 7 Aug 2018 16:07:11 +0300 Message-Id: <20180807130713.1016-2-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807130713.1016-1-digetx@gmail.com> References: <20180807130713.1016-1-digetx@gmail.com> X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:12 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Host1x doesn't have information about jobs inter-dependency, that is something that will become available once host1x will get a proper jobs scheduler implementation. Currently a hang job causes other unrelated jobs to be canceled, that is a relic from downstream driver which is irrelevant to upstream. Let's cancel only the hanging job and not to touch other jobs in queue. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen --- drivers/gpu/host1x/cdma.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index 91df51e631b2..75f339f5df6f 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -348,13 +348,11 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, } /* - * Walk the sync_queue, first incrementing with the CPU syncpts that - * are partially executed (the first buffer) or fully skipped while - * still in the current context (slots are also NOP-ed). + * Increment with CPU the remaining syncpts of a partially executed job. * - * At the point contexts are interleaved, syncpt increments must be - * done inline with the pushbuffer from a GATHER buffer to maintain - * the order (slots are modified to be a GATHER of syncpt incrs). + * Syncpt increments must be done inline with the pushbuffer from a + * GATHER buffer to maintain the order (slots are modified to be a + * GATHER of syncpt incrs). * * Note: save in restart_addr the location where the timed out buffer * started in the PB, so we can start the refetch from there (with the @@ -362,20 +360,15 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, * properly for this buffer and resources are freed. */ - dev_dbg(dev, "%s: perform CPU incr on pending same ctx buffers\n", - __func__); + dev_dbg(dev, "%s: perform CPU incr on pending buffers\n", __func__); if (!list_empty(&cdma->sync_queue)) restart_addr = job->first_get; else restart_addr = cdma->last_pos; - /* do CPU increments as long as this context continues */ - list_for_each_entry_from(job, &cdma->sync_queue, list) { - /* different context, gets us out of this loop */ - if (job->client != cdma->timeout.client) - break; - + /* do CPU increments for the remaining syncpts */ + if (job) { /* won't need a timeout when replayed */ job->timeout = 0; @@ -388,20 +381,8 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, host1x_hw_cdma_timeout_cpu_incr(host1x, cdma, job->first_get, syncpt_incrs, job->syncpt_end, job->num_slots); - - syncpt_val += syncpt_incrs; } - /* - * The following sumbits from the same client may be dependent on the - * failed submit and therefore they may fail. Force a small timeout - * to make the queue cleanup faster. - */ - - list_for_each_entry_from(job, &cdma->sync_queue, list) - if (job->client == cdma->timeout.client) - job->timeout = min_t(unsigned int, job->timeout, 500); - dev_dbg(dev, "%s: finished sync_queue modification\n", __func__); /* roll back DMAGET and start up channel again */ From patchwork Tue Aug 7 13:07:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10563455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89F5214C0 for ; Sat, 11 Aug 2018 12:08:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 659632A187 for ; Sat, 11 Aug 2018 12:08:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 593952A3D9; Sat, 11 Aug 2018 12:08:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12AAF2A187 for ; Sat, 11 Aug 2018 12:08:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 692B96E1F7; Sat, 11 Aug 2018 12:05:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 999286E400 for ; Tue, 7 Aug 2018 13:09:36 +0000 (UTC) Received: by mail-pl0-x244.google.com with SMTP id w19-v6so5457922ply.8 for ; Tue, 07 Aug 2018 06:09:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YyMJ2d0R6Lf3v4hLqW7T4yKhfoNobcq/IuYXkVtYiy4=; b=c5E7z2UYlOyXzq84YqWp498l9mEbdD8gUclf01gDc7rcQUtwqy5RJJ3bboERbliWn6 adHz/iDFEA7adPOR3TlSpIfmRliKCXWtGAgCT5lDthz7ZnTh5BJS6fdBLN7vKwdrnzJK A3t05gxiblisYN9MbaMIb4anhiqZKBzVbj0Xm3uB0fIGGKPOhtC8pc+tfjO5UfmCXbzP VZk4WEdAOMRnVHSb2U6t/TbuGMo2MF4WDmlR2pV4Kfw4kyhBeFN+wx5eDwP8F7/leWzI Dy/R4no5iX9fno9kHI52e6oO93dpjR1jSitSx6+IiYngsGeN5VnIMO+iYjK1svHuKhjB f2Jw== X-Gm-Message-State: AOUpUlHbyNu80RofKyiwkiKjOOEORFsdjdUfTFHtj36CLsi93BhHjyWs /yKhd+7zkfG+2VFoMmLSCsI= X-Google-Smtp-Source: AAOMgpdchsX8aTAPu4Cd6HOb7Ec7G4knB5u0gOrnFPI6FCdm/RDNs6G35FHqgt0qB6S6tGZ7u5DcVg== X-Received: by 2002:a17:902:d68d:: with SMTP id v13-v6mr5898768ply.278.1533647376305; Tue, 07 Aug 2018 06:09:36 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id 73-v6sm5339229pfu.20.2018.08.07.06.09.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 06:09:35 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen Subject: [PATCH v2 2/3] gpu: host1x: Don't complete a completed job Date: Tue, 7 Aug 2018 16:07:12 +0300 Message-Id: <20180807130713.1016-3-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807130713.1016-1-digetx@gmail.com> References: <20180807130713.1016-1-digetx@gmail.com> X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:12 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is a chance that the last job has been completed at the time of CDMA timeout handler invocation. In this case there is no need to complete the completed job. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttunen --- drivers/gpu/host1x/cdma.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index 75f339f5df6f..6aa6fa1498e8 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -323,7 +323,7 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, { struct host1x *host1x = cdma_to_host1x(cdma); u32 restart_addr, syncpt_incrs, syncpt_val; - struct host1x_job *job = NULL; + struct host1x_job *job; syncpt_val = host1x_syncpt_load(cdma->timeout.syncpt); @@ -342,11 +342,16 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, list_for_each_entry(job, &cdma->sync_queue, list) { if (syncpt_val < job->syncpt_end) - break; + goto syncpt_incr; host1x_job_dump(dev, job); } + /* all jobs have been completed */ + job = NULL; + +syncpt_incr: + /* * Increment with CPU the remaining syncpts of a partially executed job. * @@ -359,16 +364,16 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, * modified NOP-ed PB slots). This lets things appear to have completed * properly for this buffer and resources are freed. */ - - dev_dbg(dev, "%s: perform CPU incr on pending buffers\n", __func__); - - if (!list_empty(&cdma->sync_queue)) + if (job) restart_addr = job->first_get; else restart_addr = cdma->last_pos; /* do CPU increments for the remaining syncpts */ if (job) { + dev_dbg(dev, "%s: perform CPU incr on pending buffers\n", + __func__); + /* won't need a timeout when replayed */ job->timeout = 0; @@ -381,9 +386,10 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, host1x_hw_cdma_timeout_cpu_incr(host1x, cdma, job->first_get, syncpt_incrs, job->syncpt_end, job->num_slots); - } - dev_dbg(dev, "%s: finished sync_queue modification\n", __func__); + dev_dbg(dev, "%s: finished sync_queue modification\n", + __func__); + } /* roll back DMAGET and start up channel again */ host1x_hw_cdma_resume(host1x, cdma, restart_addr); From patchwork Tue Aug 7 13:07:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10563447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B484C14C0 for ; Sat, 11 Aug 2018 12:07:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 914412A381 for ; Sat, 11 Aug 2018 12:07:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 858BC2A530; Sat, 11 Aug 2018 12:07:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36BAE2A381 for ; Sat, 11 Aug 2018 12:07:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 198DB6E203; Sat, 11 Aug 2018 12:05:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 677556E400 for ; Tue, 7 Aug 2018 13:09:41 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id k19-v6so8581880pfi.1 for ; Tue, 07 Aug 2018 06:09:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UsaSOYgImjdVqa2SYo+qH8Qx5i9t0zoeiVANgfUOr2c=; b=iKbtDdJj/VA4k4bxV0ZNVQVhuUHRe+2HGsyIxtUl4BDTRUjSVhAr0IWcwYuHmyznMZ WBoBfdmJ3o1WFio4b0C4ssdQ90oMnv/M+/uT4TO9ofpzNInw2rIpQOt2j/oA3HaYrtGP D5EfBHHx93BquaI5sEWc04R9RDC+X0+LEv3ZegkuyjbeDz+37leoF30J0FXOfqN9fQyO MwAf0qGPoDQHIGkQ5UonzKJXIAvpUhLRV+3oENJGUgvc11CaU17a8W3taDMmiqg/7wox 5KBNlgg6qAl//wYfv8d4o5sxdn2+eyG2KJCaMbmkkd5e6Uew1ra0WRa9RkjSASct1imF HQmA== X-Gm-Message-State: AOUpUlGuifqkr1PEHeY3GZVIEUrTRZdSXlh0vrKDult2q7zR39xC3HWO 17puDlXvpuUZ4KkiNwWAJy4= X-Google-Smtp-Source: AAOMgpemEG2a2AMdCFBiCkUennj6fM0+lQSKUG4o8f2m+gM0ccyvY/MTkmRCXV4Qoq62w53CNm5kDQ== X-Received: by 2002:a63:1126:: with SMTP id g38-v6mr18416792pgl.122.1533647381018; Tue, 07 Aug 2018 06:09:41 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id 73-v6sm5339229pfu.20.2018.08.07.06.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 06:09:40 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Mikko Perttunen Subject: [PATCH v2 3/3] gpu: host1x: Continue CDMA execution starting with a next job Date: Tue, 7 Aug 2018 16:07:13 +0300 Message-Id: <20180807130713.1016-4-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807130713.1016-1-digetx@gmail.com> References: <20180807130713.1016-1-digetx@gmail.com> X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:12 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently gathers of a hung job are getting NOP'ed and a restarted CDMA executes the NOP'ed gathers. There shouldn't be a reason to not restart CDMA execution starting with a next job, avoiding the unnecessary churning with gathers NOP'ing. Signed-off-by: Dmitry Osipenko Reviewed-by: Mikko Perttnuen --- drivers/gpu/host1x/cdma.c | 23 +++++++++++------------ drivers/gpu/host1x/hw/cdma_hw.c | 13 ------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index 6aa6fa1498e8..9e4f01c7f663 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -323,7 +323,7 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, { struct host1x *host1x = cdma_to_host1x(cdma); u32 restart_addr, syncpt_incrs, syncpt_val; - struct host1x_job *job; + struct host1x_job *job, *next_job = NULL; syncpt_val = host1x_syncpt_load(cdma->timeout.syncpt); @@ -341,8 +341,13 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, __func__); list_for_each_entry(job, &cdma->sync_queue, list) { - if (syncpt_val < job->syncpt_end) + if (syncpt_val < job->syncpt_end) { + + if (!list_is_last(&job->list, &cdma->sync_queue)) + next_job = list_next_entry(job, list); + goto syncpt_incr; + } host1x_job_dump(dev, job); } @@ -355,17 +360,11 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma, /* * Increment with CPU the remaining syncpts of a partially executed job. * - * Syncpt increments must be done inline with the pushbuffer from a - * GATHER buffer to maintain the order (slots are modified to be a - * GATHER of syncpt incrs). - * - * Note: save in restart_addr the location where the timed out buffer - * started in the PB, so we can start the refetch from there (with the - * modified NOP-ed PB slots). This lets things appear to have completed - * properly for this buffer and resources are freed. + * CDMA will continue execution starting with the next job or will get + * into idle state. */ - if (job) - restart_addr = job->first_get; + if (next_job) + restart_addr = next_job->first_get; else restart_addr = cdma->last_pos; diff --git a/drivers/gpu/host1x/hw/cdma_hw.c b/drivers/gpu/host1x/hw/cdma_hw.c index ce320534cbed..bc203532ae6d 100644 --- a/drivers/gpu/host1x/hw/cdma_hw.c +++ b/drivers/gpu/host1x/hw/cdma_hw.c @@ -40,7 +40,6 @@ static void cdma_timeout_cpu_incr(struct host1x_cdma *cdma, u32 getptr, u32 syncpt_incrs, u32 syncval, u32 nr_slots) { struct host1x *host1x = cdma_to_host1x(cdma); - struct push_buffer *pb = &cdma->push_buffer; unsigned int i; for (i = 0; i < syncpt_incrs; i++) @@ -48,18 +47,6 @@ static void cdma_timeout_cpu_incr(struct host1x_cdma *cdma, u32 getptr, /* after CPU incr, ensure shadow is up to date */ host1x_syncpt_load(cdma->timeout.syncpt); - - /* NOP all the PB slots */ - while (nr_slots--) { - u32 *p = (u32 *)(pb->mapped + getptr); - *(p++) = HOST1X_OPCODE_NOP; - *(p++) = HOST1X_OPCODE_NOP; - dev_dbg(host1x->dev, "%s: NOP at %pad+%#x\n", __func__, - &pb->dma, getptr); - getptr = (getptr + 8) & (pb->size - 1); - } - - wmb(); } /*