From patchwork Wed Jul 29 08:57:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 6890751 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 81F4C9F38B for ; Wed, 29 Jul 2015 08:57:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAFE1207C8 for ; Wed, 29 Jul 2015 08:57:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EBC43207C2 for ; Wed, 29 Jul 2015 08:57:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 466476E217; Wed, 29 Jul 2015 01:57:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1CEA6E217 for ; Wed, 29 Jul 2015 01:57:33 -0700 (PDT) Received: by wibxm9 with SMTP id xm9so16238262wib.1 for ; Wed, 29 Jul 2015 01:57:32 -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=ZuFhb5qvNsqdPvAKRs12w0ddfljWI2VXaC3YOjlKkFs=; b=cOHHAmdpC+635jbTY9Ms1CANqV/MdT6tBCuIjKLWp54+/9aGran07kqivGjPZ/U6+f OM5/kn5NXOpk9pyF+gdl6IqI/2AYXrD6CRxPHEIh613RfaHLf9whx6kw45q8p5hUjFP2 FGXARGzqGsktMCeFkXpfnL3QicwVEmUTQlw8eyEUr7n/1qLtvfnHlxssj6ilPE6fSQ6V dXb0cJlHAPtIyJ0TUcSipvA7vA7sCt5O8sg9F2seJRRb420f19ADrpNkI9TSAWjSxQJf 6YCmipIguoUUc3RHQjLY7zSic/SCpYTPiKc+54z5OJfrHvXdAS951nL51FS4UxSZ0qoZ y/rQ== X-Received: by 10.194.201.71 with SMTP id jy7mr77802178wjc.93.1438160251915; Wed, 29 Jul 2015 01:57:31 -0700 (PDT) Received: from odedg-tlv.tlv.redhat.com (nat-pool-tlv-t.redhat.com. [209.132.186.36]) by smtp.gmail.com with ESMTPSA id c11sm23201007wib.1.2015.07.29.01.57.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jul 2015 01:57:31 -0700 (PDT) From: Oded Gabbay To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/2] drm/amdgpu: fix bug when amdkfd destroys hqd Date: Wed, 29 Jul 2015 11:57:29 +0300 Message-Id: <1438160249-27719-1-git-send-email-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.4.3 Cc: dan.carpenter@oracle.com 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=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 The wrong define was used to check if the hqd is still active v2: Don't use SHIFT as the MASK is already shifted Signed-off-by: Oded Gabbay Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c index 2daad33..dd2037b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c @@ -450,7 +450,7 @@ static int kgd_hqd_destroy(struct kgd_dev *kgd, uint32_t reset_type, while (true) { temp = RREG32(mmCP_HQD_ACTIVE); - if (temp & CP_HQD_ACTIVE__ACTIVE__SHIFT) + if (temp & CP_HQD_ACTIVE__ACTIVE_MASK) break; if (timeout == 0) { pr_err("kfd: cp queue preemption time out (%dms)\n",