From patchwork Wed Jan 11 22:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Brace X-Patchwork-Id: 13097293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0476C46467 for ; Wed, 11 Jan 2023 22:46:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF0EB10E16F; Wed, 11 Jan 2023 22:46:07 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D68210E143 for ; Wed, 11 Jan 2023 22:46:04 +0000 (UTC) Received: from localhost.localdomain ([174.232.190.8]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N0G1n-1os0J83ap5-00xKQV; Wed, 11 Jan 2023 23:45:59 +0100 From: Kevin Brace To: Somalapuram Amaranath , dri-devel@lists.freedesktop.org Subject: [PATCH 0/1] DRM commit e3c92eb causes OpenChrome DRM to crash during boot Date: Wed, 11 Jan 2023 16:45:43 -0600 Message-Id: <20230111224544.4837-1-kevinbrace@gmx.com> X-Mailer: git-send-email 2.38.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:rxngWwhy6YRIy8yAV01qBWEGuEtrougIY83YiNW/X+obw6rLrXt Ipz0qPCHP6iLzuKn3NWie4a/e8XNrsigRp3Tym4twSl7+/LCBB6n9860PaxKJPb47oNzcpa swVSBZZKZsrXMCuzbHjx3T8dOEUscj3ZDX+K/DJ/oTVDGqGrQvrB5Bjm0XTuBhIKpyY1rYa y2xoTEMFEW6to8q9q8fh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ri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Brace , =?utf-8?q?Christian_K?= =?utf-8?q?=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Kevin Brace Hi, I work on an out of the kernel tree DRM module for VIA Technologies Chrome integrated graphics (https://cgit.freedesktop.org/openchrome/drm-openchrome/), and DRM commit e3c92eb4a84fb0f00442e6b5cabf4f11b0eaaf41 (drm/ttm: rework on ttm_resource to use size_t type) definitely breaks my code. The bug is 100% reproducible. It took me about 2 1/2 weeks to track down the bad commit due to the general difficulty of debugging DRM code since it gets loaded by the OS way before sysklogd service is even up and running to record a crash. For this bug, bug check did not come on, so this made it very hard to track down the bad commit. After reversing many commits, I was able to see a difference in the behavior of the code if this particular commit was reversed. I am including a patch that I think correctly fixes the erroneous code, and OpenChrome DRM works correctly (i.e., OS now boots properly) if the patch is applied. Please be more careful tinkering with TTM in the future since it tends to be very fragile. --- Kevin Brace (1): drm/ttm: Fix of rework on ttm_resource to use size_t type commit drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)