Commit ad2fd53a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'platform-drivers-x86-v6.4-2' of...

Merge tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:
 "Nothing special to report just various small fixes:

   - thinkpad_acpi: Fix profile (performance/bal/low-power) regression
     on T490

   - misc other small fixes / hw-id additions"

* tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/mellanox: fix potential race in mlxbf-tmfifo driver
  platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
  platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet
  platform/x86: thinkpad_acpi: Add profile force ability
  platform/x86: thinkpad_acpi: Fix platform profiles on T490
  platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct
  platform/x86/intel-uncore-freq: Return error on write frequency
  platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield
parents 16a88291 3d43f9f6
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -784,7 +784,7 @@ static void mlxbf_tmfifo_rxtx(struct mlxbf_tmfifo_vring *vring, bool is_rx)
	fifo = vring->fifo;

	/* Return if vdev is not ready. */
	if (!fifo->vdev[devid])
	if (!fifo || !fifo->vdev[devid])
		return;

	/* Return if another vring is running. */
@@ -980,9 +980,13 @@ static int mlxbf_tmfifo_virtio_find_vqs(struct virtio_device *vdev,

		vq->num_max = vring->num;

		vq->priv = vring;

		/* Make vq update visible before using it. */
		virtio_mb(false);

		vqs[i] = vq;
		vring->vq = vq;
		vq->priv = vring;
	}

	return 0;
@@ -1302,6 +1306,9 @@ static int mlxbf_tmfifo_probe(struct platform_device *pdev)

	mod_timer(&fifo->timer, jiffies + MLXBF_TMFIFO_TIMER_INTERVAL);

	/* Make all updates visible before setting the 'is_ready' flag. */
	virtio_mb(false);

	fifo->is_ready = true;
	return 0;

+1 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ struct bios_rfkill2_state {
static const struct key_entry hp_wmi_keymap[] = {
	{ KE_KEY, 0x02,    { KEY_BRIGHTNESSUP } },
	{ KE_KEY, 0x03,    { KEY_BRIGHTNESSDOWN } },
	{ KE_KEY, 0x270,   { KEY_MICMUTE } },
	{ KE_KEY, 0x20e6,  { KEY_PROG1 } },
	{ KE_KEY, 0x20e8,  { KEY_MEDIA } },
	{ KE_KEY, 0x2142,  { KEY_MEDIA } },
+5 −1
Original line number Diff line number Diff line
@@ -44,14 +44,18 @@ static ssize_t store_min_max_freq_khz(struct uncore_data *data,
				      int min_max)
{
	unsigned int input;
	int ret;

	if (kstrtouint(buf, 10, &input))
		return -EINVAL;

	mutex_lock(&uncore_lock);
	uncore_write(data, input, min_max);
	ret = uncore_write(data, input, min_max);
	mutex_unlock(&uncore_lock);

	if (ret)
		return ret;

	return count;
}

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ static int intel_scu_pci_probe(struct pci_dev *pdev,

static const struct pci_device_id pci_ids[] = {
	{ PCI_VDEVICE(INTEL, 0x080e) },
	{ PCI_VDEVICE(INTEL, 0x082a) },
	{ PCI_VDEVICE(INTEL, 0x08ea) },
	{ PCI_VDEVICE(INTEL, 0x0a94) },
	{ PCI_VDEVICE(INTEL, 0x11a0) },
+19 −5
Original line number Diff line number Diff line
@@ -10318,6 +10318,7 @@ static atomic_t dytc_ignore_event = ATOMIC_INIT(0);
static DEFINE_MUTEX(dytc_mutex);
static int dytc_capabilities;
static bool dytc_mmc_get_available;
static int profile_force;

static int convert_dytc_to_profile(int funcmode, int dytcmode,
		enum platform_profile_option *profile)
@@ -10580,6 +10581,21 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
	if (err)
		return err;

	/* Check if user wants to override the profile selection */
	if (profile_force) {
		switch (profile_force) {
		case -1:
			dytc_capabilities = 0;
			break;
		case 1:
			dytc_capabilities = BIT(DYTC_FC_MMC);
			break;
		case 2:
			dytc_capabilities = BIT(DYTC_FC_PSC);
			break;
		}
		pr_debug("Profile selection forced: 0x%x\n", dytc_capabilities);
	}
	if (dytc_capabilities & BIT(DYTC_FC_MMC)) { /* MMC MODE */
		pr_debug("MMC is supported\n");
		/*
@@ -10593,11 +10609,6 @@ static int tpacpi_dytc_profile_init(struct ibm_init_struct *iibm)
				dytc_mmc_get_available = true;
		}
	} else if (dytc_capabilities & BIT(DYTC_FC_PSC)) { /* PSC MODE */
		/* Support for this only works on AMD platforms */
		if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
			dbg_printk(TPACPI_DBG_INIT, "PSC not support on Intel platforms\n");
			return -ENODEV;
		}
		pr_debug("PSC is supported\n");
	} else {
		dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n");
@@ -11646,6 +11657,9 @@ MODULE_PARM_DESC(uwb_state,
		 "Initial state of the emulated UWB switch");
#endif

module_param(profile_force, int, 0444);
MODULE_PARM_DESC(profile_force, "Force profile mode. -1=off, 1=MMC, 2=PSC");

static void thinkpad_acpi_module_exit(void)
{
	struct ibm_struct *ibm, *itmp;
Loading