From patchwork Mon Oct 30 13:59:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 10032683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1683C60291 for ; Mon, 30 Oct 2017 13:59:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D57A2621B for ; Mon, 30 Oct 2017 13:59:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 121AA26CFC; Mon, 30 Oct 2017 13:59:48 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 AF1102621B for ; Mon, 30 Oct 2017 13:59:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC7EE6E397; Mon, 30 Oct 2017 13:59:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45E956E397; Mon, 30 Oct 2017 13:59:45 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id t139so16665129wmt.1; Mon, 30 Oct 2017 06:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=tlPcRu9krc0Qi0Qybyg+4NVId8lHJgZa01v28gGUNoE=; b=dDfqdDwlMbDkd0Nj2dXRuJSwW8VHlaHCSqV5s8Qhoj/KZT6JTEos9wF0i/a/tY3JzR 1LT5idtkqA9AAVh3pkcjp5PLq9hFQtagDqt9RlTxDOW/76c/rCEVvrwgnKjalycD1TIo fpmEPcCVpkQ+Py07fV5QtcjAgspdmFw6if9qZk5on41CLjfurcjHyuVKYure9VhmSy+I hj9jz28DQyeQehaLMp9ni/0ewL4tgqODewGZxrbL2xrAIUFGp3UDjMfBZcQjuZYHb6My TftUg+1DfxApeBCecK6WdRE+tuC1426O1K9VZsqu3L4SudTIRMJxLdaDlH9tmwxiTVvO LvYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=tlPcRu9krc0Qi0Qybyg+4NVId8lHJgZa01v28gGUNoE=; b=WwmL42tSVSeDLZBx2Tvhch6fyNEhcQHMgiYc0P+CzS35mtYlVxbMXutjnywcbB5PU5 BUjjs+bv7anIX/6TjzGOxFvE6s8fUbI2EawHKutekgSAAogr/wXoVGhf9d/iZpmQo+Ae /ls53QoMyHR3WIe9NznkBpDthrP2LLyR6BvAxvTM5li0VCIsHnFohXo9rbmq4jkPwUK0 DdPYTIb2tmyTSAFOGUSBwJTLWFUiEvYGIaEKG6Prl+AXpvNXc/5u971j9IMRpSEcP7DE WHyRwU1Vu8i9htYWotcRpw2gXp3o54Bu0oRCnwH5znOuWBxwnxq0vVLqVfqq2D95iBvp 3RcA== X-Gm-Message-State: AMCzsaVIj9QrsVru+l8dF3zcBYZlxuxPB12DXbYMMKRtlp/9ewfOhrLq AynBqtOANz+ucRPVlHeeXKas5A== X-Google-Smtp-Source: ABhQp+TRcSMAJ97SbHTvxDM7Euq5Ebu5dXXtz6uZIyCMJ6gdYM8kTXuC6o6J3CxOBpH+a6v/Ld3q7A== X-Received: by 10.28.141.211 with SMTP id p202mr3376685wmd.61.1509371983667; Mon, 30 Oct 2017 06:59:43 -0700 (PDT) Received: from localhost.localdomain ([2a02:908:1251:7981:7dea:e6ff:9c90:f1e3]) by smtp.gmail.com with ESMTPSA id u52sm21768842wrb.68.2017.10.30.06.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 06:59:43 -0700 (PDT) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: once more fix ttm_buffer_object_transfer Date: Mon, 30 Oct 2017 14:59:40 +0100 Message-Id: <20171030135940.12778-1-deathsimple@vodafone.de> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Christian König When the mutex is locked just in the moment we copy it we end up with a warning that we release a locked mutex. Fix this by properly reinitializing the mutex. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_bo_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 78cb99be7146..e7a519f1849b 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -474,6 +474,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, INIT_LIST_HEAD(&fbo->lru); INIT_LIST_HEAD(&fbo->swap); INIT_LIST_HEAD(&fbo->io_reserve_lru); + mutex_init(&fbo->wu_mutex); fbo->moving = NULL; drm_vma_node_reset(&fbo->vma_node); atomic_set(&fbo->cpu_writers, 0);