Commit 3128ff23 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'acpi-processor', 'acpi-pad', 'acpi-resource' and 'acpi-video'

Merge changes in the ACPI processor and ACPI PAD drivers, ACPI
resources management quirks and ACPI backlight (video) driver
changes for 6.11-rc1:

 - Downgrade Intel _OSC and _PDC messages in the ACPI processor driver
   to debug to reduce log noise (Mario Limonciello).

 - Still evaluate _OST when _PUR evaluation fails in the ACPI PAD
   (processor aggregator) driver as per the spec (Armin Wolf).

 - Skip ACPI IRQ override on Asus Vivobook Pro N6506MJ and N6506MU
   platforms (Tamim Khan).

 - Force native mode on some T2 macbooks in the ACPI backlight driver
   and replace strcpy() with strscpy() in it (Orlando Chamberlain,
   Muhammad Qasim Abdul Majeed).

* acpi-processor:
  ACPI: processor: Downgrade Intel _OSC and _PDC messages to debug

* acpi-pad:
  ACPI: acpi_pad: Still evaluate _OST when _PUR evaluation fails

* acpi-resource:
  ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ
  ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU

* acpi-video:
  ACPI: video: force native for some T2 macbooks
  ACPI: video: Use strscpy() instead of strcpy()
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -25,6 +25,10 @@
#define ACPI_PROCESSOR_AGGREGATOR_CLASS	"acpi_pad"
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80

#define ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS	0
#define ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION	1

static DEFINE_MUTEX(isolated_cpus_lock);
static DEFINE_MUTEX(round_robin_lock);

@@ -382,16 +386,23 @@ static void acpi_pad_handle_notify(acpi_handle handle)
		.length = 4,
		.pointer = (void *)&idle_cpus,
	};
	u32 status;

	mutex_lock(&isolated_cpus_lock);
	num_cpus = acpi_pad_pur(handle);
	if (num_cpus < 0) {
		mutex_unlock(&isolated_cpus_lock);
		return;
	}
		/* The ACPI specification says that if no action was performed when
		 * processing the _PUR object, _OST should still be evaluated, albeit
		 * with a different status code.
		 */
		status = ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION;
	} else {
		status = ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS;
		acpi_pad_idle_cpus(num_cpus);
	}

	idle_cpus = acpi_pad_idle_cpus_num();
	acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, 0, &param);
	acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, status, &param);
	mutex_unlock(&isolated_cpus_lock);
}

+2 −2
Original line number Diff line number Diff line
@@ -598,9 +598,9 @@ static bool __init acpi_early_processor_osc(void)
void __init acpi_early_processor_control_setup(void)
{
	if (acpi_early_processor_osc()) {
		pr_info("_OSC evaluated successfully for all CPUs\n");
		pr_debug("_OSC evaluated successfully for all CPUs\n");
	} else {
		pr_info("_OSC evaluation for CPUs failed, trying _PDC\n");
		pr_debug("_OSC evaluation for CPUs failed, trying _PDC\n");
		acpi_early_processor_set_pdc();
	}
}
+4 −4
Original line number Diff line number Diff line
@@ -1128,8 +1128,8 @@ static int acpi_video_bus_get_one_device(struct acpi_device *device, void *arg)
		return -ENOMEM;
	}

	strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
	strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
	strscpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
	strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);

	data->device_id = device_id;
	data->video = video;
@@ -2010,8 +2010,8 @@ static int acpi_video_bus_add(struct acpi_device *device)
	}

	video->device = device;
	strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
	strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
	strscpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
	strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
	device->driver_data = video;

	acpi_video_bus_find_cap(video);
+14 −0
Original line number Diff line number Diff line
@@ -524,6 +524,20 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "N6506MV"),
		},
	},
	{
		/* Asus Vivobook Pro N6506MU */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_BOARD_NAME, "N6506MU"),
		},
	},
	{
		/* Asus Vivobook Pro N6506MJ */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_BOARD_NAME, "N6506MJ"),
		},
	},
	{
		/* LG Electronics 17U70P */
		.matches = {
+16 −0
Original line number Diff line number Diff line
@@ -539,6 +539,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
		DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"),
		},
	},
	{
	 .callback = video_detect_force_native,
	 /* Apple MacBook Air 9,1 */
	 .matches = {
		DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
		DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir9,1"),
		},
	},
	{
	 /* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
	 .callback = video_detect_force_native,
@@ -548,6 +556,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
		DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"),
		},
	},
	{
	 .callback = video_detect_force_native,
	 /* Apple MacBook Pro 16,2 */
	 .matches = {
		DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
		DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"),
		},
	},
	{
	 .callback = video_detect_force_native,
	 /* Dell Inspiron N4010 */