From patchwork Sun Sep 29 22:10:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Link Mauve X-Patchwork-Id: 13815265 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 C1A9FCF6495 for ; Sun, 29 Sep 2024 22:18:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3A6910E175; Sun, 29 Sep 2024 22:18:27 +0000 (UTC) X-Greylist: delayed 468 seconds by postgrey-1.36 at gabe; Sun, 29 Sep 2024 22:18:26 UTC Received: from luna.linkmauve.fr (luna.linkmauve.fr [82.65.109.163]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4714D10E175 for ; Sun, 29 Sep 2024 22:18:26 +0000 (UTC) Received: by luna.linkmauve.fr (Postfix, from userid 1000) id EB548153F903; Mon, 30 Sep 2024 00:10:35 +0200 (CEST) From: Emmanuel Gil Peyrot To: Cc: Emmanuel Gil Peyrot , Christian Brauner , Jeff Layton , Jan Kara , Boris Brezillon , Steven Price , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/panthor: Set FMODE_UNSIGNED_OFFSET in fop_flags Date: Mon, 30 Sep 2024 00:10:31 +0200 Message-ID: <20240929221034.1889572-1-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-BeenThere: dri-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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This fixes a regression introduced in commit 641bb4394f405cba498b100b44541ffc0aed5be1. No panthor device, card or render node, could be open() since this commit, returning EINVAL instead. This prevented Mesa from working on SoCs such as the rk3588 which contains a Mali-G610 GPU. The commit mentions which drivers must be changed to set that flag, but panthor seemingly got forgotten, triggering the WARN_ON_ONCE() added in drm_open_helper(). --- drivers/gpu/drm/panthor/panthor_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c index 34182f67136c..c520f156e2d7 100644 --- a/drivers/gpu/drm/panthor/panthor_drv.c +++ b/drivers/gpu/drm/panthor/panthor_drv.c @@ -1383,6 +1383,7 @@ static const struct file_operations panthor_drm_driver_fops = { .read = drm_read, .llseek = noop_llseek, .mmap = panthor_mmap, + .fop_flags = FOP_UNSIGNED_OFFSET, }; #ifdef CONFIG_DEBUG_FS