Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Dec 2025 10:27:14 -0500
From:      Austin Shafer <ashafer@FreeBSD.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org
Subject:   Re: git: 5287dd47b5b6 - stable/14 - linuxkpi: add stub implementation of pm_vt_switch_(un)register
Message-ID:  <629adec7-02e8-47d2-9ceb-65d0b11589b2@FreeBSD.org>
In-Reply-To: <CAJ-VmonpfEPw5xMQeRG4eQz7PDUsZj%2BPo7MA5_fADxVXkygKeg@mail.gmail.com>
References:  <693750e9.387bb.3a5268c@gitrepo.freebsd.org> <CAJ-VmonpfEPw5xMQeRG4eQz7PDUsZj%2BPo7MA5_fADxVXkygKeg@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

In the default behavior I believe it does. The reason for it is that
the VT switch path triggers the driver to save app contexts and video
memory and the like, so historically (on Linux too) having the VT
switch triggered that shared path to get things ready before doing
the suspend.

I don't think I've tested with turning that off, I'm not sure exactly
why you'd want to. I haven't heard of that sysctl actually.

Thanks,
	Austin

On 12/8/25 5:58 PM, Adrian Chadd wrote:
> .. does it? There's a sysctl to turn on vt switching on/off for
> suspend/resume, no?
> 
> 
> 
> -a
> 
> On Mon, 8 Dec 2025 at 14:27, Austin Shafer <ashafer@freebsd.org> wrote:
>>
>> The branch stable/14 has been updated by ashafer:
>>
>> URL: https://cgit.FreeBSD.org/src/commit/?id=5287dd47b5b643baba645cde51bf39f787c738d6
>>
>> commit 5287dd47b5b643baba645cde51bf39f787c738d6
>> Author:     Austin Shafer <ashafer@FreeBSD.org>
>> AuthorDate: 2025-10-28 17:03:18 +0000
>> Commit:     Austin Shafer <ashafer@FreeBSD.org>
>> CommitDate: 2025-12-08 20:46:48 +0000
>>
>>     linuxkpi: add stub implementation of pm_vt_switch_(un)register
>>
>>     This adds empty implementations of pm_vt_switch_(un)register which
>>     are used by nvidia-drm. We do not need to specify anything here as
>>     a VT switch always happens on suspend/resume.
>>
>>     Sponsored by:   NVIDIA
>>     Reviewed by:    kbowling (mentor), emaste
>>     Differential Revision:  https://reviews.freebsd.org/D53400
>>
>>     (cherry picked from commit 75aa13c64aba71f6f26d05e8fcf96e3862d44cde)
>> ---
>>  sys/compat/linuxkpi/common/include/linux/pm.h | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h
>> index c8d943027909..932697e0eda8 100644
>> --- a/sys/compat/linuxkpi/common/include/linux/pm.h
>> +++ b/sys/compat/linuxkpi/common/include/linux/pm.h
>> @@ -97,4 +97,18 @@ pm_wakeup_event(struct device *dev __unused, unsigned int x __unused)
>>         pr_debug("%s: TODO\n", __func__);
>>  }
>>
>> +/*
>> + * We do not need to specify anything here as a VT switch always happens on
>> + * suspend/resume.
>> + */
>> +static inline void
>> +pm_vt_switch_required(struct device *dev __unused, bool required __unused)
>> +{
>> +}
>> +
>> +static inline void
>> +pm_vt_switch_unregister(struct device *dev __unused)
>> +{
>> +}
>> +
>>  #endif /* _LINUXKPI_LINUX_PM_H */
>>



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?629adec7-02e8-47d2-9ceb-65d0b11589b2>