Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3128ff2

Browse files
committed
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()
5 parents fa0d938 + 83c2ec7 + 117478c + e2e7f03 + d010a02 commit 3128ff2

File tree

5 files changed

+51
-10
lines changed

5 files changed

+51
-10
lines changed

drivers/acpi/acpi_pad.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad"
2626
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
2727
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
28+
29+
#define ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS 0
30+
#define ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION 1
31+
2832
static DEFINE_MUTEX(isolated_cpus_lock);
2933
static DEFINE_MUTEX(round_robin_lock);
3034

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

386391
mutex_lock(&isolated_cpus_lock);
387392
num_cpus = acpi_pad_pur(handle);
388393
if (num_cpus < 0) {
389-
mutex_unlock(&isolated_cpus_lock);
390-
return;
394+
/* The ACPI specification says that if no action was performed when
395+
* processing the _PUR object, _OST should still be evaluated, albeit
396+
* with a different status code.
397+
*/
398+
status = ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION;
399+
} else {
400+
status = ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS;
401+
acpi_pad_idle_cpus(num_cpus);
391402
}
392-
acpi_pad_idle_cpus(num_cpus);
403+
393404
idle_cpus = acpi_pad_idle_cpus_num();
394-
acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, 0, &param);
405+
acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, status, &param);
395406
mutex_unlock(&isolated_cpus_lock);
396407
}
397408

drivers/acpi/acpi_processor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ static bool __init acpi_early_processor_osc(void)
598598
void __init acpi_early_processor_control_setup(void)
599599
{
600600
if (acpi_early_processor_osc()) {
601-
pr_info("_OSC evaluated successfully for all CPUs\n");
601+
pr_debug("_OSC evaluated successfully for all CPUs\n");
602602
} else {
603-
pr_info("_OSC evaluation for CPUs failed, trying _PDC\n");
603+
pr_debug("_OSC evaluation for CPUs failed, trying _PDC\n");
604604
acpi_early_processor_set_pdc();
605605
}
606606
}

drivers/acpi/acpi_video.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,8 @@ static int acpi_video_bus_get_one_device(struct acpi_device *device, void *arg)
11281128
return -ENOMEM;
11291129
}
11301130

1131-
strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
1132-
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
1131+
strscpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
1132+
strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
11331133

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

20122012
video->device = device;
2013-
strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
2014-
strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
2013+
strscpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
2014+
strscpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
20152015
device->driver_data = video;
20162016

20172017
acpi_video_bus_find_cap(video);

drivers/acpi/resource.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,20 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
524524
DMI_MATCH(DMI_BOARD_NAME, "N6506MV"),
525525
},
526526
},
527+
{
528+
/* Asus Vivobook Pro N6506MU */
529+
.matches = {
530+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
531+
DMI_MATCH(DMI_BOARD_NAME, "N6506MU"),
532+
},
533+
},
534+
{
535+
/* Asus Vivobook Pro N6506MJ */
536+
.matches = {
537+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
538+
DMI_MATCH(DMI_BOARD_NAME, "N6506MJ"),
539+
},
540+
},
527541
{
528542
/* LG Electronics 17U70P */
529543
.matches = {

drivers/acpi/video_detect.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
539539
DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"),
540540
},
541541
},
542+
{
543+
.callback = video_detect_force_native,
544+
/* Apple MacBook Air 9,1 */
545+
.matches = {
546+
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
547+
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir9,1"),
548+
},
549+
},
542550
{
543551
/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
544552
.callback = video_detect_force_native,
@@ -548,6 +556,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
548556
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"),
549557
},
550558
},
559+
{
560+
.callback = video_detect_force_native,
561+
/* Apple MacBook Pro 16,2 */
562+
.matches = {
563+
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
564+
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"),
565+
},
566+
},
551567
{
552568
.callback = video_detect_force_native,
553569
/* Dell Inspiron N4010 */

0 commit comments

Comments
 (0)