Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5028803pxu; Tue, 22 Dec 2020 06:48:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3Ju8C0qGuPj/tXxPlUESBJyG5aTWeYgcI/1fpKp5+afDKDWbRpvPdoOg5cmifjXF/K3up X-Received: by 2002:a17:907:961b:: with SMTP id gb27mr2819909ejc.313.1608648519071; Tue, 22 Dec 2020 06:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608648519; cv=none; d=google.com; s=arc-20160816; b=Gdr1MQB80Z/j3EXp8cuOuonKnK3r8EBvyGrWlyYR4VIFUTgYW7SPAXnlrd5p5OYuY3 ImhLFqil+oaG+pC/Szp9Cd6CcH5Q1ZwatHVoTIb+6e2cPJUiIPmICY9B1lJdIBrkPvEi wVhS3gxexhQxwusTmrNeaLj7zr42PPuF/mU7UZytf99QKwFpyUgzgc7jj4Ja+lVk1BGl XGNQYWDZ9w2AkOtimM7donTRLif/qFkwH6BTJnsgs0uPf6HT9rNY91hV7V18x9Jtlexm LUhjP2GNosuqRMyzbo7m666blMGWclFXvTzp7D3i+t24Yvt0ByZdIkDU6Kkl8He4wY6G jPvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=oK0KHyHrllXp9mlvp62Hjo60DSBu0nlR06sAv6zFIUA=; b=Egy8WPOHD5Ve6vPn7y/5Gq8+e5dKRcRIwJO79o921c6nJOpUIkUTIPXmYiPRlEC44G AUKD7mZGJP4kxnSrXNBSF8pv+ENes2I+QtgZiXwLeN7r26ZwJJgDx9J4yW7gYOhc6UwP Ke/VVhVth1iLCrXLbnYG36pbpMKJOxXnFwA0zfrOjcwzbimW1iitIWvSQYwmTkKi2Apd Ka2i54RLYK2CuAcq2DjuiZBJ0gBg5Ezf8RDrOEvn1zdZYXNahmADbaji9MS4xRyYrvwB GOHp8zAS53OlLqHAzrcBF3iX9koF77DEt5L0qChdqcQ/ENWYGjTXwAxvHqbp+2DVQP5R Qgtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si10575413ejc.177.2020.12.22.06.48.16; Tue, 22 Dec 2020 06:48:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727764AbgLVOqR (ORCPT + 99 others); Tue, 22 Dec 2020 09:46:17 -0500 Received: from mail.ispras.ru ([83.149.199.84]:44244 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbgLVOqQ (ORCPT ); Tue, 22 Dec 2020 09:46:16 -0500 Received: from monopod.intra.ispras.ru (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 823CD40D4004; Tue, 22 Dec 2020 14:45:27 +0000 (UTC) Date: Tue, 22 Dec 2020 17:45:27 +0300 (MSK) From: Alexander Monakov To: "Deucher, Alexander" cc: "platform-driver-x86@vger.kernel.org" , "S-k, Shyam-sundar" , Hans de Goede , "linux-kernel@vger.kernel.org" Subject: RE: amd-pmc s2idle driver issues In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Dec 2020, Deucher, Alexander wrote: > > I've tried the "platform/x86: amd-pmc: Add AMD platform support for > > S2Idle" > > patch on my Acer Swift SF314-42 laptop (Renoir SoC, Ryzen 4500U CPU) and > > hit the following issues: > > > > 1. The driver doesn't bind to any device. It has the following binding table: > > > > +static const struct acpi_device_id amd_pmc_acpi_ids[] = { > > + {"AMDI0005", 0}, > > + {"AMD0004", 0}, > > + { } > > +}; > > > > This laptop has "AMD0005" instead. Adding it to the list allows the driver to > > successfully probe. > > > > 2. The debugfs interface does not seem to be very helpful. It shows > > > > SMU FW Info: ffffffff > > > > It's not very informative. The code seems to be fetching SMU version from > > mmio, so I guess the file should be saying "FW version" rather than "FW > > Info", and then, I think version number is not supposed to be "-1". > > > > Does your platform support modern standby? You may have to select between > legacy S3 and modern standby in the sbios. Yes. Out-of-the-box it's a "modern standby" laptop. There's a "hidden" bios menu with extra settings that apparently allows to select legacy S3. I did not change it, so I'm testing the "modern" mode. Note that this driver fetches SMU version from MMIO, which looks odd to me: elsewhere (i.e. in the amdgpu driver) SMU version is retrieved by issuing the corresponding SMU command, as far as I can tell. Alexander