summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2022-01-05 16:13:50 -0800
committerDouglas Anderson <dianders@chromium.org>2022-01-05 16:13:50 -0800
commitf757b390faab6c38fe0887dc2123dcb615e21953 (patch)
treebd3a7c81a775c362693bccaf00e2cef9e07e2eea /drivers
parent443c053f51f9173042a2b45d0db7271cebe78198 (diff)
parent4c82fd0506b4cc196a375d1200361fb0c5439acd (diff)
Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tip
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/sleep.c21
-rw-r--r--drivers/ata/libata-core.c16
-rw-r--r--drivers/gpu/drm/i915/Kconfig.debug9
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c21
-rw-r--r--drivers/iommu/intel/iommu.c2
-rw-r--r--drivers/net/phy/phy.c7
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/thermal/intel/therm_throt.c8
-rw-r--r--drivers/usb/core/usb-acpi.c24
9 files changed, 87 insertions, 25 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index eaa47753b758..03b911e94df2 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -81,11 +81,16 @@ static int acpi_sleep_prepare(u32 acpi_state)
return 0;
}
+static u8 max_sleep_state = -1;
+
bool acpi_sleep_state_supported(u8 sleep_state)
{
acpi_status status;
u8 type_a, type_b;
+ if (sleep_state > max_sleep_state)
+ return false;
+
status = acpi_get_sleep_type_data(sleep_state, &type_a, &type_b);
return ACPI_SUCCESS(status) && (!acpi_gbl_reduced_hardware
|| (acpi_gbl_FADT.sleep_control.address
@@ -162,6 +167,13 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
return 0;
}
+static int __init init_nosleep(const struct dmi_system_id *d)
+{
+ pr_info("Disabling ACPI suspend\n");
+ max_sleep_state = 0;
+ return 0;
+}
+
bool acpi_sleep_default_s3;
static int __init init_default_s3(const struct dmi_system_id *d)
@@ -374,6 +386,15 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
},
},
+
+ {
+ .callback = init_nosleep,
+ .ident = "samus",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Samus"),
+ },
+ },
{},
};
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index aba0c67d1bd6..7de2d1f2f2cc 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2063,7 +2063,7 @@ static bool ata_identify_page_supported(struct ata_device *dev, u8 page)
* for drives which implement this ATA level or above.
*/
if (ata_id_major_version(dev->id) >= 10)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"ATA Identify Device Log not supported\n");
dev->horkage |= ATA_HORKAGE_NO_ID_DEV_LOG;
return false;
@@ -2135,7 +2135,7 @@ static void ata_dev_config_ncq_send_recv(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_SEND_RECV)) {
- ata_dev_warn(dev, "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev, "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_SEND_RECV,
@@ -2160,8 +2160,8 @@ static void ata_dev_config_ncq_non_data(struct ata_device *dev)
unsigned int err_mask;
if (!ata_log_supported(dev, ATA_LOG_NCQ_NON_DATA)) {
- ata_dev_warn(dev,
- "NCQ Send/Recv Log not supported\n");
+ ata_dev_notice(dev,
+ "NCQ Send/Recv Log not supported\n");
return;
}
err_mask = ata_read_log_page(dev, ATA_LOG_NCQ_NON_DATA,
@@ -2661,14 +2661,14 @@ int ata_dev_configure(struct ata_device *dev)
if (ata_id_is_cfa(id)) {
/* CPRM may make this media unusable */
if (id[ATA_ID_CFA_KEY_MGMT] & 1)
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
snprintf(revbuf, 7, "CFA");
} else {
snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id));
/* Warn the user if the device has TPM extensions */
if (ata_id_has_tpm(id))
- ata_dev_warn(dev,
+ ata_dev_notice(dev,
"supports DRM functions and may not be fully accessible\n");
}
@@ -2822,8 +2822,8 @@ int ata_dev_configure(struct ata_device *dev)
}
if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
- ata_dev_warn(dev, "WARNING: device requires firmware update to be fully functional\n");
- ata_dev_warn(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
+ ata_dev_notice(dev, "WARNING: device requires firmware update to be fully functional\n");
+ ata_dev_notice(dev, " contact the vendor or visit http://ata.wiki.kernel.org\n");
}
return 0;
diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index 47e845353ffa..e7fd3e76f8a2 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -21,6 +21,14 @@ config DRM_I915_DEBUG
depends on DRM_I915
depends on EXPERT # only for developers
depends on !COMPILE_TEST # never built by robots
+ select PCI_MSI # ... for iommu enabled by default
+ select IOMMU_API
+ select IOMMU_IOVA
+ select IOMMU_SUPPORT
+ select NEED_DMA_MAP_STATE
+ select DMAR_TABLE
+ select INTEL_IOMMU
+ select INTEL_IOMMU_DEFAULT_ON
select DEBUG_FS
select PREEMPT_COUNT
select I2C_CHARDEV
@@ -40,6 +48,7 @@ config DRM_I915_DEBUG
select DRM_I915_DEBUG_RUNTIME_PM
select DRM_I915_SW_FENCE_DEBUG_OBJECTS
select DRM_I915_SELFTEST
+ select BROKEN # for prototype uAPI
default n
help
Choose this option to turn on extra driver debugging that may affect
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index c0e6712651f3..5ecc85b96a3d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -495,16 +495,27 @@ eb_unreserve_vma(struct eb_vma *ev)
ev->flags &= ~__EXEC_OBJECT_RESERVED;
}
+static bool platform_has_relocs_enabled(const struct i915_execbuffer *eb)
+{
+ /*
+ * Relocations are disallowed starting from gen12 with Tigerlake
+ * as an exception. To unblock CI, we are temporarily allowing it
+ * for Rocketlake and Alderlake.
+ */
+ if (GRAPHICS_VER(eb->i915) < 12 || IS_TIGERLAKE(eb->i915) ||
+ IS_ROCKETLAKE(eb->i915) || IS_ALDERLAKE_S(eb->i915) ||
+ IS_ALDERLAKE_P(eb->i915))
+ return true;
+
+ return false;
+}
+
static int
eb_validate_vma(struct i915_execbuffer *eb,
struct drm_i915_gem_exec_object2 *entry,
struct i915_vma *vma)
{
- /* Relocations are disallowed for all platforms after TGL-LP. This
- * also covers all platforms with local memory.
- */
- if (entry->relocation_count &&
- GRAPHICS_VER(eb->i915) >= 12 && !IS_TIGERLAKE(eb->i915))
+ if (entry->relocation_count && !platform_has_relocs_enabled(eb))
return -EINVAL;
if (unlikely(entry->flags & eb->invalid_flags))
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index b6a8f3282411..7fa7fc3a9863 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -424,8 +424,6 @@ static int __init intel_iommu_setup(char *str)
no_platform_optin = 1;
pr_info("IOMMU disabled\n");
} else if (!strncmp(str, "igfx_off", 8)) {
- dmar_map_gfx = 0;
- pr_info("Disable GFX device mapping\n");
} else if (!strncmp(str, "forcedac", 8)) {
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
iommu_dma_forcedac = true;
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index beb2b66da132..48977bae20dd 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -939,7 +939,7 @@ void phy_stop_machine(struct phy_device *phydev)
*/
void phy_error(struct phy_device *phydev)
{
- WARN_ON(1);
+ pr_notice_once("%s\n", __func__);
mutex_lock(&phydev->lock);
phydev->state = PHY_HALTED;
@@ -1034,11 +1034,8 @@ void phy_stop(struct phy_device *phydev)
{
struct net_device *dev = phydev->attached_dev;
- if (!phy_is_started(phydev) && phydev->state != PHY_DOWN) {
- WARN(1, "called from state %s\n",
- phy_state_to_str(phydev->state));
+ if (!phy_is_started(phydev) && phydev->state != PHY_DOWN)
return;
- }
mutex_lock(&phydev->lock);
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d84cf30bb279..d240a3d2dfe2 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1017,8 +1017,10 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
if (maxvec < minvec)
return -ERANGE;
- if (WARN_ON_ONCE(dev->msi_enabled))
+ if (dev->msi_enabled) {
+ pci_info(dev, "can't enable MSI, already enabled\n");
return -EINVAL;
+ }
nvec = pci_msi_vec_count(dev);
if (nvec < 0)
diff --git a/drivers/thermal/intel/therm_throt.c b/drivers/thermal/intel/therm_throt.c
index dab7e8fb1059..11b06112b745 100644
--- a/drivers/thermal/intel/therm_throt.c
+++ b/drivers/thermal/intel/therm_throt.c
@@ -284,10 +284,10 @@ static void __maybe_unused throttle_active_work(struct work_struct *work)
avg /= ARRAY_SIZE(state->temp_samples);
if (state->average > avg) {
- pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
- this_cpu,
- state->level == CORE_LEVEL ? "Core" : "Package",
- state->count);
+ pr_notice("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n",
+ this_cpu,
+ state->level == CORE_LEVEL ? "Core" : "Package",
+ state->count);
state->rate_control_active = true;
}
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 50b2fc7fcc0e..f511b8bf23ca 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -12,6 +12,7 @@
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/usb/hcd.h>
+#include <linux/dmi.h>
#include "hub.h"
@@ -81,6 +82,20 @@ int usb_acpi_set_power_state(struct usb_device *hdev, int index, bool enable)
}
EXPORT_SYMBOL_GPL(usb_acpi_set_power_state);
+static const struct dmi_system_id intel_icl_broken_acpi[] = {
+ {
+ .ident = "ICL RVP",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client Platform"),
+ },
+ },
+
+ { }
+};
+
+static bool acpi_connection_type_broken;
+
static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
struct acpi_pld_info *pld)
{
@@ -89,6 +104,10 @@ static enum usb_port_connect_type usb_acpi_get_connect_type(acpi_handle handle,
union acpi_object *upc = NULL;
acpi_status status;
+ /* Work around unknown ACPI instruction error on ICL RVP BIOSes. */
+ if (acpi_connection_type_broken)
+ return USB_PORT_CONNECT_TYPE_UNKNOWN;
+
/*
* According to 9.14 in ACPI Spec 6.2. _PLD indicates whether usb port
* is user visible and _UPC indicates whether it is connectable. If
@@ -273,6 +292,11 @@ static struct acpi_bus_type usb_acpi_bus = {
int usb_acpi_register(void)
{
+ if (dmi_check_system(intel_icl_broken_acpi)) {
+ pr_info("USB ACPI connection type broken.\n");
+ acpi_connection_type_broken = true;
+ }
+
return register_acpi_bus_type(&usb_acpi_bus);
}