From nobody Mon Oct 19 21:41:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4j7prh1h7Rz6wQlk; Mon, 19 Oct 2026 21:41:08 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4j7prh11Tqz4MX5; Mon, 19 Oct 2026 21:41:08 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792446068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fjv8ex9goPxlt5EeGO3sDUR3CiU6GcXNdzCDJmXXUmU=; b=vLjL0zxsAnT0peny6R4hXs6NJQRAJ1toa+PICDwKmvB5lFxNM2XCV1BXfMw576HthKamfs 7/004yqSmOT+8XMxRTtN5aI2IGxo7/I6vVdbXhmA5/MAbvAOOESUcQXhp0PGiILQFQmkB5 PuppxbuswuyMQPEjAgHhGnd0CqLBISBEDTkuXU+nbiNP346O0df2VBZdGVO9/JMJCfuahS oHTGzmx7P728vssnGLg6lWGtBP2qXWyA7aBuBeFDx/xQ+PRopwyEqgiE+fMTnwLG6BZVO6 LfBxGi7mkoYpmw5moTrKv8DZ8t56nb3wzMQnekI74YCEYff0IuCyIKirdn+kkw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1792446068; b=vYUyK8PSG738Qi970I4ngohDlTAzwX81ZcAhsggCbJuVR/ERNsq0Kx3tUSZhKOn2deFyI+ IOxDy76DXHff7K1vp3tXLFzgdamjjj5WuZ8GL2Vlgh26SLXLvjO0J3GDtWN2RHvgSBP5fk 60bpVl517iEReCzbkfR7GcF4RCGuiOJSrnGoUjzCEEDyuGbFtnFuA+0b3mpfzqGNo1RkkH jizujVHCXiAOtuf7sxmAsh16pwI6vGMRi01lOjlEMhMldeEM6gSTmJXbJOnsWwnTQrz9AA /CM/pZn/BbVhelckwBYlaAsON2h3k8XRnDxF4RntOBYAvgJwVITvNX7qH0Qfkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1792446068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fjv8ex9goPxlt5EeGO3sDUR3CiU6GcXNdzCDJmXXUmU=; b=s4Tnbs/EqHcD4dJG4NJDHWgEKDXh3CXM39fXeF6rgEFiOgnuTy209bmzhr4K947qTyQ+zV 8YiszRDohX+68OQO3auaqomYyzbKdQrkjrKww69dp8xr/B/0nBJbrxxw/EFs1WnXbJ47o9 18jxAbvtBPmjx1QkXTeJbrdM6rZFmDenSmeUum2tGxpgPgfrDl35s2g4Sc7rrbk3zFaucQ Y/oyYWOK7HahhkVhjSjqvjUPAQ40g2WEGiRLANkkzI2xmGRwfhKwC8Om6J2sDqWMWmxlpq 2CWxATbmTW+Z2knLz7vcDd+A3cNTxrWdKN2AYJw7iaPCzawXl84t/ubFcbsuRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "YE2" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4j7prg6WPZz1KXS; Mon, 19 Oct 2026 21:41:07 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id C58F86195707; Mon, 19 Oct 2026 21:41:05 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A3C2F2D029ED; Mon, 19 Oct 2026 21:41:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id MjFwfifDdJeo; Mon, 19 Oct 2026 21:41:02 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CB0952D029D8; Mon, 19 Oct 2026 21:41:02 +0000 (UTC) Date: Mon, 19 Oct 2026 21:41:01 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Johnston cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 863fe7ae5152 - main - LinuxKPI: re-implement pm_runtime.h In-Reply-To: Message-ID: <619s077-rq35-5799-51r-32rpo954218s@serrofq.bet> References: <6aca83ee.22d35.367468dc@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Mon, 19 Oct 2026, Mark Johnston wrote: > On Sat, Oct 10, 2026 at 06:29:02PM +0000, Bjoern A. Zeeb wrote: >> The branch main has been updated by bz: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=863fe7ae5152926fab0380a78ba26b6ba4a2d65f >> >> commit 863fe7ae5152926fab0380a78ba26b6ba4a2d65f >> Author: Bjoern A. Zeeb >> AuthorDate: 2026-07-11 14:36:06 +0000 >> Commit: Bjoern A. Zeeb >> CommitDate: 2026-10-10 18:28:32 +0000 >> >> LinuxKPI: re-implement pm_runtime.h >> >> The original implementation was based on OpenBSD under public domain >> but just defined the functions to void. >> FreeBSD later extended the file with more inline functions or dealing >> with differences in Linux versions. >> >> This rework tries to group some functions, adds properly typed arguments >> and return values in some cases. >> It further adjusts return values based on the !CONFIG_PM expectations. >> >> Lastly pr_debug() calls are added so we could see if/how much these >> functions are used in new/other works rather than code just compiling >> but the functions entirely being ignored without the knowledge of the >> person porting code. >> >> Sponsored by: The FreeBSD Foundation >> MFC after: 3 days >> Reviewed by: dumbbell >> Differential Revision: https://reviews.freebsd.org/D58169 > > This commit makes Xorg+i915 unusable for me. All text on my desktop is > corrupted. > > I traced this down to the change to pm_runtime_get_if_active(): if it > goes back to returning 1, then the problem goes away. Can you tell me which drm-kmod version you are using? I am asking as in drm-kmod master, 6.12-lts, and 6.6-lts the only use for i915 is behind a `if (IS_ENABLED(CONFIG_PM)) { }` check. Oh doh, PM gets set in drm-kmod kconfig.mk. That's very likely not intentional for the pm_runtime parts as LinuxKPI has no notion of dev->power state tracking (apart from device_set_wakeup_capable() which was simple enough to implement as a start). The question then is pm_runtime_get_if_active() returns no PM support, why does the driver not do the right thing? It would have to assume that PM runtime support is enabled for the device based on ??? I assume the cleanest and easiest solution would be to put pm_runtime_get_if_active() under #ifdef CONFIG_PM in the file and leave a comment for that case returning 1 not being the proper implementation? I wonder what effect that will have on drivers/gpu/drm/amd/pm/amdgpu_pm.c in drm-kmod master? Can you test/review D60878? /bz -- For there shall arise false Christs, and false prophets, and shall shew great signs and wonders; insomuch that, if it were possible, they shall deceive the very elect. Behold, I have told you before. [Mat. 24:24-25]