From nobody Mon Oct 06 22:17:35 2025 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 4cgYYT6q9pz6BgrS for ; Mon, 06 Oct 2025 22:17:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cgYYT3BzJz3dCX for ; Mon, 06 Oct 2025 22:17:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-46e4f2696bdso66748075e9.0 for ; Mon, 06 Oct 2025 15:17:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759789068; x=1760393868; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RJ7oQ8PIKurEDWjjjW2bzlEXykU2GVSJ7ABZFfsW/pQ=; b=P31bH82/48rNEP8c36S5W8rh2xQ1pb5RslMXZUPvMZUSuHWkZl+VluanjED0NdtLBY +JgsPx5WHB8qRC3JorUTH/nl39C8xhMjrV051qWG3bAkhbLXOWZ4pwrd+qFZRR0iNZrM 8Y0OMpE5KUHVdQ24L97NWUMGdNPRBMgPRqi/lZefjPI33I1TumpsF8/4LdjGVQuge3bg WixHnRuO14m7Ba60ljAeauhpMtLUFH1q+dDGtLOj2U4V6ff2uKyEXTTUJuALNx2YXL2s uZEdCvo4Q9gb3zxBOSG7HZ7DuHaUZnTVdEyxPF4mctDrShl6u4UC2kwqNHmKwRlge0TU ELWQ== X-Forwarded-Encrypted: i=1; AJvYcCX4k4q8yeua32ivXxxaxmegDdlNj5dvW1p2Cbd02h2wHsEyekjhrATtTaKDBU5v3mI11xAe18DC0njn5RzzVLCE2DIHAw==@freebsd.org X-Gm-Message-State: AOJu0YyaLfDzPRZPZBj+c07cXQ0urSkQORuAJ2fp8DSJdTDo48KPEsg9 WzukScn5+uS/MSepnJj4MJAFDHjx/BqVwkoMo2Osu3hd7BKCPCGtueO0FEzncjoH2vvtqX2GH0e 5fgG0EHU= X-Gm-Gg: ASbGnctkEejqcQrnnoPEZeDTJJzot1wAk0pxJsN+ffYLjQyiPIWQYdsi9QUWSfskeXI AtzzigA0092bZs3pnHWNjI2usrWiz0om3JyIPIqiGXSfhlJYfyUrBnR/5h3l8V8WYk8EjDCM1lS Lv1nnbQKtTH6xEhvO0M7ya+rKHqE40H7+Xas4SX/cEkjPDVI7vipaq9ArnFlOoQBJWfNPFI823s 8lpsg1QhTKErP/ev2YyrkBnR/SvAtAO2V9AVY4h7bLSiBXESFUQyDejKvRUu4XpLti0x07OdFBO 936G5H1zb5c3WtD4FfTk3lKXxw5H8weTZDR5VmZLZGCHiSvT9oCWlUPIGmsGStjpN+CmNmjwSbv fulYBTsf5+s4jLUavbCn/HOU6zzNwql3RXwChqwJcUl7IlxiZcUdpSJi6Ha63zgI6Fw4THUyOPZ n8fUQxHl9c5DGv1CU6Q7jGg80= X-Google-Smtp-Source: AGHT+IHfYCjq/7e9ydOTIUiGGl3L6DXDa3O6QZ0esNuReZ9UIMR3t6li6hY9QUkrbiIS5hcZS1IqVw== X-Received: by 2002:a05:600c:c092:b0:46e:36f9:c574 with SMTP id 5b1f17b1804b1-46e717411b9mr69226845e9.23.1759789067113; Mon, 06 Oct 2025 15:17:47 -0700 (PDT) Received: from smtpclient.apple (nat-184-7.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8f0170sm23133611f8f.49.2025.10.06.15.17.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Oct 2025 15:17:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.100.1.1.5\)) Subject: Re: git: a25cfcab9a9d - main - linuxkpi: Support s2idle in `pm_suspend_target_state` From: Jessica Clarke In-Reply-To: Date: Mon, 6 Oct 2025 23:17:35 +0100 Cc: Aymeric Wibo , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <579A2FBE-5EBD-41D4-97D4-14638A6120D4@freebsd.org> References: <202510062150.596LoDYv072197@gitrepo.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.3864.100.1.1.5) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cgYYT3BzJz3dCX On 6 Oct 2025, at 23:02, Bjoern A. Zeeb wrote: >=20 > On Mon, 6 Oct 2025, Aymeric Wibo wrote: >=20 >> The branch main has been updated by obiwac: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Da25cfcab9a9d2c7d733b85bf04b50436= 9623de1c >>=20 >> commit a25cfcab9a9d2c7d733b85bf04b504369623de1c >> Author: Aymeric Wibo >> AuthorDate: 2025-10-06 21:38:58 +0000 >> Commit: Aymeric Wibo >> CommitDate: 2025-10-06 21:49:54 +0000 >>=20 >> linuxkpi: Support s2idle in `pm_suspend_target_state` >>=20 >> When going to s2idle, set Linux' pm_suspend_target_state to >> PM_SUSPEND_TO_IDLE instead of setting PM_SUSPEND_MEM (for S3) in = all >> cases. >>=20 >> This is necessary because more recent versions of the amdgpu DRM = drivers >> have different paths for when entering s2idle & S0ix is supported = than >> S3. >>=20 >> Reviewed by: bz >> Approved by: bz >=20 > I cannot apporve them; I am neither a mentor, srcmgr, re, or other = entity in this case. Having a src commit bit not under mentorship is enough. Jessica > But thank you for splitting them up into two logical chunks (with the = only bit that adding > the enum here should have been part of the other half so each of them = would have compiled > independently). >=20 >=20 >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D51591 >> --- >> sys/compat/linuxkpi/common/src/linux_acpi.c | 30 = +++++++++++++++++++---------- >> 1 file changed, 20 insertions(+), 10 deletions(-) >>=20 >> diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c = b/sys/compat/linuxkpi/common/src/linux_acpi.c >> index 60e14cfc98c5..c7d62c745c7e 100644 >> --- a/sys/compat/linuxkpi/common/src/linux_acpi.c >> +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c >> @@ -119,17 +119,27 @@ acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const = guid_t *guid, >> } >>=20 >> static void >> -linux_handle_power_suspend_event(void *arg __unused, >> - enum power_stype stype __unused) >> +linux_handle_power_suspend_event(void *arg __unused, enum = power_stype stype) >> { >> - /* >> - * Only support S3 for now. >> - * acpi_sleep_event isn't always called so we use = power_suspend_early >> - * instead which means we don't know what state we're switching to. >> - * TODO: Make acpi_sleep_event consistent >> - */ >> - linux_acpi_target_sleep_state =3D ACPI_STATE_S3; >> - pm_suspend_target_state =3D PM_SUSPEND_MEM; >> + switch (stype) { >> + case POWER_STYPE_SUSPEND_TO_IDLE: >> + /* >> + * XXX: obiwac Not 100% sure this is correct, but >> + * acpi_target_sleep_state does seem to be set to >> + * ACPI_STATE_S3 during s2idle on Linux. >> + */ >> + linux_acpi_target_sleep_state =3D ACPI_STATE_S3; >> + pm_suspend_target_state =3D PM_SUSPEND_TO_IDLE; >> + break; >> + case POWER_STYPE_SUSPEND_TO_MEM: >> + linux_acpi_target_sleep_state =3D ACPI_STATE_S3; >> + pm_suspend_target_state =3D PM_SUSPEND_MEM; >> + break; >> + default: >> + printf("%s: sleep type %d not yet supported\n", >> + __func__, stype); >> + break; >> + } >> } >>=20 >> static void >>=20 >=20 > --=20 > Bjoern A. Zeeb = r15:7