From patchwork Thu Jul 10 21:54:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 4528381 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 87598BEEAA for ; Thu, 10 Jul 2014 23:33:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEE75201D5 for ; Thu, 10 Jul 2014 23:33:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F2AEA2011D for ; Thu, 10 Jul 2014 23:33:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D13476E789; Thu, 10 Jul 2014 16:33:22 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by gabe.freedesktop.org (Postfix) with ESMTP id C730C6E524 for ; Thu, 10 Jul 2014 14:57:26 -0700 (PDT) Received: by mail-wg0-f50.google.com with SMTP id n12so190505wgh.33 for ; Thu, 10 Jul 2014 14:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2U+sQozPMXQVC0qaAhUMbOR9aOpq+YuxNbJkTDU0vWQ=; b=J7fNpvyBG+VtdLl6RlxOmjELRUuWvrkasDDA+XGOIBeBghK2jKtfIvHlNbLQkGvJA1 UmZat087g7VrNj4+P8Br346rKxi3i/vGxHKlKfZ/mUMUrnOzo/SLS8s7iaPAoRUX8Jn8 hWKUokQ/fJ9nF+xGCqAcjWUSj2He9AbJm3fYF9f1R+EXPtP1dCaA4s1Qviyqyr0U+H+8 5xw0q0FCf5UOe2XaIMhqjllO/42js+KLPsmA+T7V96dDtlZlEB9io1En8VsGlrnik+BJ uGqMVJLrxYX9owK5vNdclUMMumzY9yc9tTr5A+RqNk20303oIJIXS+o98fyIEy7LPEbf oCaQ== X-Received: by 10.180.228.106 with SMTP id sh10mr22291921wic.51.1405029445045; Thu, 10 Jul 2014 14:57:25 -0700 (PDT) Received: from localhost.localdomain ([77.127.59.49]) by mx.google.com with ESMTPSA id pq9sm831097wjc.35.2014.07.10.14.57.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Jul 2014 14:57:24 -0700 (PDT) From: Oded Gabbay X-Google-Original-From: Oded Gabbay To: David Airlie , Alex Deucher , Jerome Glisse Subject: [PATCH 75/83] hsa/radeon: Fixing minor issues with kernel queues (DIQ) Date: Fri, 11 Jul 2014 00:54:31 +0300 Message-Id: <1405029279-6894-47-git-send-email-oded.gabbay@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> References: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> X-Mailman-Approved-At: Thu, 10 Jul 2014 16:33:12 -0700 Cc: Andrew Lewycky , Ben Goz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Ben Goz * re-execute runlist on kernel queues destruction. * delete kernel queues from pqm's queues list on pqm unint Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/hsa/radeon/kfd_device_queue_manager.c | 4 ++++ drivers/gpu/hsa/radeon/kfd_process_queue_manager.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c index 4c53e57..12b8b33 100644 --- a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c +++ b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c @@ -759,6 +759,10 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm, { BUG_ON(!dqm || !kq); + pr_debug("kfd: In %s\n", __func__); + + dqm->destroy_queues(dqm); + mutex_lock(&dqm->lock); list_del(&kq->list); dqm->queue_count--; diff --git a/drivers/gpu/hsa/radeon/kfd_process_queue_manager.c b/drivers/gpu/hsa/radeon/kfd_process_queue_manager.c index 89461ab..5d7c46d 100644 --- a/drivers/gpu/hsa/radeon/kfd_process_queue_manager.c +++ b/drivers/gpu/hsa/radeon/kfd_process_queue_manager.c @@ -273,10 +273,10 @@ int pqm_destroy_queue(struct process_queue_manager *pqm, unsigned int qid) if (retval != 0) return retval; - list_del(&pqn->process_queue_list); uninit_queue(pqn->q); } + list_del(&pqn->process_queue_list); kfree(pqn); clear_bit(qid, pqm->queue_slot_bitmap);