From patchwork Tue May 5 08:40:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 6335911 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D031EBEEE1 for ; Tue, 5 May 2015 08:40:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44D6F20376 for ; Tue, 5 May 2015 08:40:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6824C2034F for ; Tue, 5 May 2015 08:40:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2E466E004; Tue, 5 May 2015 01:40:54 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 71C3F6E004 for ; Tue, 5 May 2015 01:40:52 -0700 (PDT) Received: by oift201 with SMTP id t201so136331632oif.3 for ; Tue, 05 May 2015 01:40:52 -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; bh=e/JTtZ1B/Zj15gSnxRXcagGg04kDiczW6UZqOq5Ll3I=; b=gKy8gtH1l3lM8CIVbZ0Iu6PazegaLi9GPYF8iJ1HwXLoB1PhIIN9xd+cJPUZtOhHRw mO3zFJEvQ77nFLyt5RgdxCnwZbAIyZr2CEbQ9M96XwpU7bjQuxqWdc57SESvwSUtg2Ch Ma/8BV3NcMUQ1aiDQK3RxDme+J6HX7JtCduR3rpzFrRbZIIlxppob49cPizYURvG7Scs hOQ5VMOIEaJa50Ii9m+djiIAChfCu2aT5gm0xU2kRDDPnBkMjefGOyGAYxLmzRulFr2r REX158QNP7N3svGFQNS/jswLlBXBZB1uPX+K/EMnI8Csvh20RkStxhpydi5hZyyJ+Dvb Ca/w== X-Received: by 10.202.216.87 with SMTP id p84mr2552701oig.133.1430815252130; Tue, 05 May 2015 01:40:52 -0700 (PDT) Received: from tlv-gabbay-ws.amd.com ([2.52.13.244]) by mx.google.com with ESMTPSA id y62sm9217504oif.12.2015.05.05.01.40.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 01:40:51 -0700 (PDT) From: Oded Gabbay To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/amdkfd: Initialize sdma vm when creating sdma queue Date: Tue, 5 May 2015 11:40:41 +0300 Message-Id: <1430815241-22650-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Xihan Zhang X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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: Xihan Zhang This patch fixes a bug where sdma vm wasn't initialized when an sdma queue was created in HWS mode. This caused GPUVM faults to appear on dmesg and it is one of the causes that SDMA queues are not working. Signed-off-by: Xihan Zhang Reviewed-by: Ben Goz Signed-off-by: Oded Gabbay Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 7b1d510..596ee5c 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c @@ -883,6 +883,8 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q, return -ENOMEM; } + init_sdma_vm(dqm, q, qpd); + retval = mqd->init_mqd(mqd, &q->mqd, &q->mqd_mem_obj, &q->gart_mqd_addr, &q->properties); if (retval != 0)