Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kernel 5.3.11 patch for FHD-modded Thinkpad X230
diff -ruN v5.3.11/drivers/acpi/pci_root.c v5.3.11-patched/drivers/acpi/pci_root.c
--- v5.3.11/drivers/acpi/pci_root.c 2020-02-11 14:12:53.191125461 +0300
+++ v5.3.11-patched/drivers/acpi/pci_root.c 2020-02-11 14:50:38.568736161 +0300
@@ -505,7 +505,7 @@
} else {
decode_osc_control(root, "OS requested", requested);
decode_osc_control(root, "platform willing to grant", control);
- dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n",
+ dev_info(&device->dev, "_OSC failed (%s); we keep ASPM on anyway\n",
acpi_format_exception(status));
/*
@@ -515,7 +515,6 @@
* flag here, to defer the action until after the ACPI
* root scan.
*/
- *no_aspm = 1;
}
}
@@ -611,8 +610,6 @@
goto remove_dmar;
}
- if (no_aspm)
- pcie_no_aspm();
pci_acpi_add_bus_pm_notifier(device);
device_set_wakeup_capable(root->bus->bridge, device->wakeup.flags.valid);
diff -ruN v5.3.11/drivers/gpu/drm/i915/display/intel_dp.c v5.3.11-patched/drivers/gpu/drm/i915/display/intel_dp.c
--- v5.3.11/drivers/gpu/drm/i915/display/intel_dp.c 2020-02-11 14:12:54.195127716 +0300
+++ v5.3.11-patched/drivers/gpu/drm/i915/display/intel_dp.c 2020-02-11 14:48:19.101440897 +0300
@@ -145,8 +145,7 @@
bool intel_dp_is_edp(struct intel_dp *intel_dp)
{
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
-
- return intel_dig_port->base.type == INTEL_OUTPUT_EDP;
+ return intel_dig_port->base.type == INTEL_OUTPUT_EDP || strncmp(intel_dp->attached_connector->base.name, "DP-3", 4) == 0;
}
static struct intel_dp *intel_attached_dp(struct drm_connector *connector)
@@ -6524,7 +6523,7 @@
if (INTEL_GEN(dev_priv) < 5)
return false;
- if (INTEL_GEN(dev_priv) < 9 && port == PORT_A)
+ if (INTEL_GEN(dev_priv) < 9 && port == PORT_D)
return true;
return intel_bios_is_port_edp(dev_priv, port);
diff -ruN v5.3.11/drivers/gpu/drm/i915/display/intel_lvds.c v5.3.11-patched/drivers/gpu/drm/i915/display/intel_lvds.c
--- v5.3.11/drivers/gpu/drm/i915/display/intel_lvds.c 2020-02-11 14:12:54.199127725 +0300
+++ v5.3.11-patched/drivers/gpu/drm/i915/display/intel_lvds.c 2020-02-11 14:40:50.598893234 +0300
@@ -508,209 +508,10 @@
static const struct dmi_system_id intel_no_lvds[] = {
{
.callback = intel_no_lvds_dmi_callback,
- .ident = "Apple Mac Mini (Core series)",
+ .ident = "modded ThinkPad X230",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Apple"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Apple Mac Mini (Core 2 series)",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Apple"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Macmini2,1"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "MSI IM-945GSE-A",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "MSI"),
- DMI_MATCH(DMI_PRODUCT_NAME, "A9830IMS"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Dell Studio Hybrid",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Dell OptiPlex FX170",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex FX170"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "AOpen Mini PC",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "AOpen"),
- DMI_MATCH(DMI_PRODUCT_NAME, "i965GMx-IF"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "AOpen Mini PC MP915",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
- DMI_MATCH(DMI_BOARD_NAME, "i915GMx-F"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "AOpen i915GMm-HFS",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
- DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "AOpen i45GMx-I",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
- DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Aopen i945GTt-VFA",
- .matches = {
- DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Clientron U800",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Clientron"),
- DMI_MATCH(DMI_PRODUCT_NAME, "U800"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Clientron E830",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Clientron"),
- DMI_MATCH(DMI_PRODUCT_NAME, "E830"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Asus EeeBox PC EB1007",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "EB1007"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Asus AT5NM10T-I",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
- DMI_MATCH(DMI_BOARD_NAME, "AT5NM10T-I"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Hewlett-Packard HP t5740",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, " t5740"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Hewlett-Packard t5745",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "hp t5745"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Hewlett-Packard st5747",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "hp st5747"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "MSI Wind Box DC500",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
- DMI_MATCH(DMI_BOARD_NAME, "MS-7469"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Gigabyte GA-D525TUD",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co., Ltd."),
- DMI_MATCH(DMI_BOARD_NAME, "D525TUD"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Supermicro X7SPA-H",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"),
- DMI_MATCH(DMI_PRODUCT_NAME, "X7SPA-H"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Fujitsu Esprimo Q900",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Q900"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Intel D410PT",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
- DMI_MATCH(DMI_BOARD_NAME, "D410PT"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Intel D425KT",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
- DMI_EXACT_MATCH(DMI_BOARD_NAME, "D425KT"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Intel D510MO",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
- DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Intel D525MW",
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
- DMI_EXACT_MATCH(DMI_BOARD_NAME, "D525MW"),
- },
- },
- {
- .callback = intel_no_lvds_dmi_callback,
- .ident = "Radiant P845",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Radiant Systems Inc"),
- DMI_MATCH(DMI_PRODUCT_NAME, "P845"),
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "2320HMU"),
},
},
diff -ruN v5.3.11/drivers/pci/pci-acpi.c v5.3.11-patched/drivers/pci/pci-acpi.c
--- v5.3.11/drivers/pci/pci-acpi.c 2020-02-11 14:12:55.751131211 +0300
+++ v5.3.11-patched/drivers/pci/pci-acpi.c 2020-02-11 14:42:55.415173589 +0300
@@ -995,8 +995,7 @@
}
if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
- pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n");
- pcie_no_aspm();
+ pr_info("ACPI FADT declares the system doesn't support PCIe ASPM, but we don't give a fuck and keep it enabled\n");
}
ret = register_acpi_bus_type(&acpi_pci_bus);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.