Commit d945085a authored by Hans de Goede's avatar Hans de Goede
Browse files

Merge tag 'platform-drivers-x86-v6.11-3' into review-hans

Merge 'platform-drivers-x86-v6.11-3' into review-hans to avoid conflicts
when merging further ideapad-laptop patches.

platform-drivers-x86 for v6.11-3

Fixes:
- ideapad-laptop / lenovo-ymc: Protect VPC calls with a mutex
- amd/pmf: Query HPD data also when ALS is disabled

The following is an automated shortlog grouped by driver:

amd/pmf:
 -  Fix to Update HPD Data When ALS is Disabled

ideapad-laptop:
 -  add a mutex to synchronize VPC commands
 -  introduce a generic notification chain
 -  move ymc_trigger_ec from lenovo-ymc
parents 61b74964 7cc06e72
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -130,12 +130,12 @@ data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility:

Due to a peculiarity in how Windows handles the ``CreateByteField()`` ACPI operator (errors only
happen when a invalid byte field is ultimately accessed), all methods require a 32 byte input
buffer, even if the Binay MOF says otherwise.
buffer, even if the Binary MOF says otherwise.

The input buffer contains a single byte to select the subfeature to be accessed and 31 bytes of
input data, the meaning of which depends on the subfeature being accessed.

The output buffer contains a singe byte which signals success or failure (``0x00`` on failure)
The output buffer contains a single byte which signals success or failure (``0x00`` on failure)
and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.

WMI method Get_EC()
@@ -147,7 +147,7 @@ data contains a flag byte and a 28 byte controller firmware version string.
The first 4 bits of the flag byte contain the minor version of the embedded controller interface,
with the next 2 bits containing the major version of the embedded controller interface.

The 7th bit signals if the embedded controller page chaged (exact meaning is unknown), and the
The 7th bit signals if the embedded controller page changed (exact meaning is unknown), and the
last bit signals if the platform is a Tigerlake platform.

The MSI software seems to only use this interface when the last bit is set.
+1 −0
Original line number Diff line number Diff line
@@ -477,6 +477,7 @@ config LENOVO_YMC
	tristate "Lenovo Yoga Tablet Mode Control"
	depends on ACPI_WMI
	depends on INPUT
	depends on IDEAPAD_LAPTOP
	select INPUT_SPARSEKMAP
	help
	  This driver maps the Tablet Mode Control switch to SW_TABLET_MODE input
+2 −0
Original line number Diff line number Diff line
@@ -764,6 +764,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
	case AMD_CPU_ID_CB:
	case AMD_CPU_ID_PS:
	case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
	case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
		return MSG_OS_HINT_RN;
	}
	return -EINVAL;
@@ -967,6 +968,7 @@ static const struct pci_device_id pmc_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
	{ }
};

+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev);
#define AMD_CPU_ID_PS			0x14E8
#define AMD_CPU_ID_SP			0x14A4
#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
#define PCI_DEVICE_ID_AMD_MP2_STB	0x172c

#endif /* PMC_H */
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#define AMD_CPU_ID_RMB			0x14b5
#define AMD_CPU_ID_PS			0x14e8
#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT	0x1507
#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT	0x1122

#define PMF_MSG_DELAY_MIN_US		50
#define RESPONSE_REGISTER_LOOP_MAX	20000
@@ -249,6 +250,7 @@ static const struct pci_device_id pmf_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RMB) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PS) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
	{ }
};

@@ -382,6 +384,7 @@ static const struct acpi_device_id amd_pmf_acpi_ids[] = {
	{"AMDI0102", 0},
	{"AMDI0103", 0},
	{"AMDI0105", 0},
	{"AMDI0107", 0},
	{ }
};
MODULE_DEVICE_TABLE(acpi, amd_pmf_acpi_ids);
Loading