Skip to content

Commit

Permalink
Merge branches 'acpi-cppc', 'acpi-video' and 'acpi-drivers'
Browse files Browse the repository at this point in the history
* acpi-cppc:
  ACPI: CPPC: clean up acpi_get_psd_map()

* acpi-video:
  ACPI: video: Use native backlight on Acer Aspire 5783z
  ACPI: video: Docs update for "acpi_backlight" kernel parameter options

* acpi-drivers:
  thermal: int340x_thermal: fix: Update Tiger Lake ACPI device IDs
  platform/x86: intel-hid: fix: Update Tiger Lake ACPI device ID
  ACPI: Update Tiger Lake ACPI device IDs
  • Loading branch information
rafaeljw committed Apr 6, 2020
4 parents fd03605 + b17b806 + 1c8fbc1 + 26d8bec commit 33ae7f7
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 38 deletions.
8 changes: 5 additions & 3 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
default: 0

acpi_backlight= [HW,ACPI]
acpi_backlight=vendor
acpi_backlight=video
If set to vendor, prefer vendor specific driver
{ vendor | video | native | none }
If set to vendor, prefer vendor-specific driver
(e.g. thinkpad_acpi, sony_acpi, etc.) instead
of the ACPI video.ko driver.
If set to video, use the ACPI video.ko driver.
If set to native, use the device's native backlight mode.
If set to none, disable the ACPI backlight interface.

acpi_force_32bit_fadt_addr
force FADT to use 32 bit addresses rather than the
Expand Down
33 changes: 7 additions & 26 deletions drivers/acpi/cppc_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,10 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
* domain info.
*/
for_each_possible_cpu(i) {
pr = all_cpu_data[i];
if (!pr)
continue;

if (cpumask_test_cpu(i, covered_cpus))
continue;

pr = all_cpu_data[i];
cpc_ptr = per_cpu(cpc_desc_ptr, i);
if (!cpc_ptr) {
retval = -EFAULT;
Expand Down Expand Up @@ -495,44 +492,28 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
cpumask_set_cpu(j, pr->shared_cpu_map);
}

for_each_possible_cpu(j) {
for_each_cpu(j, pr->shared_cpu_map) {
if (i == j)
continue;

match_pr = all_cpu_data[j];
if (!match_pr)
continue;

match_cpc_ptr = per_cpu(cpc_desc_ptr, j);
if (!match_cpc_ptr) {
retval = -EFAULT;
goto err_ret;
}

match_pdomain = &(match_cpc_ptr->domain_info);
if (match_pdomain->domain != pdomain->domain)
continue;

match_pr->shared_type = pr->shared_type;
cpumask_copy(match_pr->shared_cpu_map,
pr->shared_cpu_map);
}
}
goto out;

err_ret:
for_each_possible_cpu(i) {
pr = all_cpu_data[i];
if (!pr)
continue;

/* Assume no coordination on any error parsing domain info */
if (retval) {
cpumask_clear(pr->shared_cpu_map);
cpumask_set_cpu(i, pr->shared_cpu_map);
pr->shared_type = CPUFREQ_SHARED_TYPE_ALL;
}
cpumask_clear(pr->shared_cpu_map);
cpumask_set_cpu(i, pr->shared_cpu_map);
pr->shared_type = CPUFREQ_SHARED_TYPE_ALL;
}

out:
free_cpumask_var(covered_cpus);
return retval;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/device_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,8 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
*/
static const struct acpi_device_id special_pm_ids[] = {
{"PNP0C0B", }, /* Generic ACPI fan */
{"INT1044", }, /* Fan for Tiger Lake generation */
{"INT3404", }, /* Fan */
{"INTC1044", }, /* Fan for Tiger Lake generation */
{}
};
struct acpi_device *adev = ACPI_COMPANION(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/dptf/dptf_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ static int dptf_power_remove(struct platform_device *pdev)
}

static const struct acpi_device_id int3407_device_ids[] = {
{"INT1047", 0},
{"INT3407", 0},
{"INTC1047", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
Expand Down
8 changes: 4 additions & 4 deletions drivers/acpi/dptf/int340x_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

#define INT3401_DEVICE 0X01
static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INT1040"},
{"INT1043"},
{"INT1044"},
{"INT1047"},
{"INT3400"},
{"INT3401", INT3401_DEVICE},
{"INT3402"},
Expand All @@ -28,6 +24,10 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INT3409"},
{"INT340A"},
{"INT340B"},
{"INTC1040"},
{"INTC1043"},
{"INTC1044"},
{"INTC1047"},
{""},
};

Expand Down
9 changes: 9 additions & 0 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
},
},
{
.callback = video_detect_force_native,
.ident = "Acer Aspire 5738z",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
DMI_MATCH(DMI_BOARD_NAME, "JV50"),
},
},

/*
* Desktops which falsely report a backlight and which our heuristics
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/x86/intel-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alex Hung");

static const struct acpi_device_id intel_hid_ids[] = {
{"INT1051", 0},
{"INT33D5", 0},
{"INTC1051", 0},
{"", 0},
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/intel/int340x_thermal/int3400_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ static int int3400_thermal_remove(struct platform_device *pdev)
}

static const struct acpi_device_id int3400_thermal_match[] = {
{"INT1040", 0},
{"INT3400", 0},
{"INTC1040", 0},
{}
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/intel/int340x_thermal/int3403_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ static int int3403_remove(struct platform_device *pdev)
}

static const struct acpi_device_id int3403_device_ids[] = {
{"INT1043", 0},
{"INT3403", 0},
{"INTC1043", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, int3403_device_ids);
Expand Down

0 comments on commit 33ae7f7

Please sign in to comment.