From patchwork Wed Dec 13 20:45:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10110893 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 8035E60327 for ; Wed, 13 Dec 2017 20:45:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7532928C4E for ; Wed, 13 Dec 2017 20:45:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67B6328B7A; Wed, 13 Dec 2017 20:45:54 +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_SIGNED, 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 E1A6828B7A for ; Wed, 13 Dec 2017 20:45:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D8D76E5C9; Wed, 13 Dec 2017 20:45:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D11689624; Wed, 13 Dec 2017 20:45:50 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1D3BB60850; Wed, 13 Dec 2017 20:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1513197950; bh=cjWuxBq+QhhJv7Ru4Mnmgq3rhfRyI5ylvJHN7eUugGI=; h=From:To:Cc:Subject:Date:From; b=JphIEGI4LAzDDRRuHBnc3KbUtJmSPfRSwD22Ggm6WaDqIPVXXRHChkGW4eIFuIEHQ IWOUjZmBjS1S1xHACn5rYi8XkPd4XCTqouy3AbI5BO7lP8ygvLKnoJfmHMZssE65h9 LxUde0nPIRRxdVlxUhLpix98YPEoNressw0J1g6s= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 115B0604BE; Wed, 13 Dec 2017 20:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1513197948; bh=cjWuxBq+QhhJv7Ru4Mnmgq3rhfRyI5ylvJHN7eUugGI=; h=From:To:Cc:Subject:Date:From; b=Ketq2t6FUm4SB7WXagfVnHBB0skG8GSbaHYk7f4dwzZvjCdYMnI9ef5PDsG1PgXoO e+DzS+6ewVEXaEPAsIKUZ4GUWvU580SglJR+BFuJ4S6Wwd0tm0X8FhsC7d0iezsLGG 7Lcrx7Hng64GJ8r03c0Dr7Guf3MiDy2QNqc1KRrk= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 115B0604BE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/msm: gpu: Only sync fences on rings that exist Date: Wed, 13 Dec 2017 13:45:44 -0700 Message-Id: <1513197944-23125-1-git-send-email-jcrouse@codeaurora.org> X-Mailer: git-send-email 1.9.1 Cc: linux-arm-msm@vger.kernel.org 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-Virus-Scanned: ClamAV using ClamSMTP The fault recovery code tries to sync fences on all possible rings instead of only the rings that actually exist which will fault the kernel when the number of rings are less than the maximum amount. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index a335ad4..6fbc2fc 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -308,7 +308,7 @@ static void recover_worker(struct work_struct *work) * needs to happen after msm_rd_dump_submit() to ensure that the * bo's referenced by the offending submit are still around. */ - for (i = 0; i < ARRAY_SIZE(gpu->rb); i++) { + for (i = 0; i < gpu->nr_rings; i++) { struct msm_ringbuffer *ring = gpu->rb[i]; uint32_t fence = ring->memptrs->fence;