From patchwork Fri Jun 30 08:09:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1801772 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=mC/el0fw; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qsp061HnWz20ZV for ; Fri, 30 Jun 2023 18:10:14 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qF9Ch-0005gu-BB; Fri, 30 Jun 2023 08:10:07 +0000 Received: from mail-pl1-f177.google.com ([209.85.214.177]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qF9Cd-0005eg-5I for kernel-team@lists.ubuntu.com; Fri, 30 Jun 2023 08:10:03 +0000 Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1b7f9d66812so12652725ad.0 for ; Fri, 30 Jun 2023 01:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688112600; x=1690704600; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=xMnQF46pyfkbblisKonOsldWvm2vO55iC2sXNDtYDhM=; b=mC/el0fwqUYJEGUC+bT1UegDQUPMOjyeR+/Zd5s42eIJgDF+C7EkgcWoXYkNU6jtCZ lufaSEhY+W7zrLJ6Wsx6wJBA/tL6cdBAAxq3gqgMhAgYTNnhqe1pC6rXc1soxUUJuCCS 04WsjiWv44O7Qos530LotgvUi9yzhdBtsXYS3sQ7cJdJ0zLOT+0Yf6gXZygy5FKi1Ufc JqLi3tHgwHFH4r8L6BD7qeFUBzKSY6kL+DFOWiNO80SKHxvoKJ49CV2aJWeqX+4Vjw8/ TFmAJey115QUqxEXlErG5XO0+8dTR+rnm36NkeaThWrETCS/QIqthr3J0DcgV+FKqNQd NgKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688112600; x=1690704600; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=xMnQF46pyfkbblisKonOsldWvm2vO55iC2sXNDtYDhM=; b=iAqcdE2cmelyoRKw8d3uhDKrduA09Lri/y7hYk3v1mkBNT9WebJVSRDOYkNrd4aEVt YU6m+HoTQ4Fw5vffOAjEQ0z3da0Gof+qVPB7ZIFVH5enqIiGTq9lf0kE0gJoUKGUw6pl Zu3/4ipBZuvTFO+lR/COM5XKzsk8zBtAU8etRKzD12RxAC/OBcXtZdKJ0JemI1TmkUud lG98v6KFw4HFCeD3Qr4mi5C3N9CPP5EdXzvIu+HMh5kiHz3ZYt+dNhiGJY8Z6zlatb30 vGUE+dj/y0NcUPnNNdJitneYGKuLH1sDQZyFs2gsY9qPijnTEsgAPe6BSIYk5kc4Gle1 n8eg== X-Gm-Message-State: ABy/qLbwjgMbFSpFJ+lciRE0jf2ANyM5pQjwfFgo3rvZuLrKJUXAhYaB cR17SdoXpc88gMsmXl5hX3vZYbGUUtA= X-Google-Smtp-Source: APBJJlHzxt+ZQcNn9r9MyKaBcuQhitWN77l7u/CDQ0+zIlAwGbP3srpTprm4ef4YdCSy554PtYKbhw== X-Received: by 2002:a17:902:da92:b0:1b8:4e00:96b with SMTP id j18-20020a170902da9200b001b84e00096bmr1989004plx.9.1688112600204; Fri, 30 Jun 2023 01:10:00 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id n2-20020a170902968200b001b7cbc5871csm5505191plp.53.2023.06.30.01.09.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 01:09:59 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][M] UBUNTU: SAUCE: drm/i915/quirks: Add multiple VBT quirk for HP ZBook Power G10 Date: Fri, 30 Jun 2023 16:09:55 +0800 Message-Id: <20230630080955.601886-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230630080955.601886-1-acelan.kao@canonical.com> References: <20230630080955.601886-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.177; envelope-from=acelan@gmail.com; helo=mail-pl1-f177.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Chia-Lin Kao (AceLan)" BugLink: https://bugs.launchpad.net/bugs/2025195 The quirk is to fix the bug[1] when you see this message[2]. The first port is not the right port we want to use and it leads to the HDMI monitor doesn't work. According the bug report, skip the return workaround the issue, so I created the DMI quirk to list affected platforms. Intel is submitting patches[3][4] to fix the issue, but it requires to backport huge drm structure changes, too. As there is no regression found with this workaround, it's safer to use the DMI quirk to handle this issue. 1. https://gitlab.freedesktop.org/drm/intel/-/issues/7709 2. kernel: i915 0000:00:02.0: [drm:intel_bios_init [i915]] More than one child device for port B in VBT, using the first. 3. https://patchwork.freedesktop.org/series/117641/ 4. https://patchwork.freedesktop.org/series/114200/ Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/i915/display/intel_bios.c | 3 +- drivers/gpu/drm/i915/display/intel_display.c | 2 + drivers/gpu/drm/i915/display/intel_quirks.c | 255 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_quirks.h | 2 + 4 files changed, 261 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 04b846440de6..d505c478a6ff 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -34,6 +34,7 @@ #include "intel_display.h" #include "intel_display_types.h" #include "intel_gmbus.h" +#include "intel_quirks.h" #define _INTEL_BIOS_PRIVATE #include "intel_vbt_defs.h" @@ -2730,7 +2731,7 @@ static void parse_ddi_port(struct intel_bios_encoder_data *devdata) return; } - if (i915->display.vbt.ports[port]) { + if (i915->display.vbt.ports[port] && !intel_has_quirk(i915, QUIRK_MULTIPLE_VBT_DEVICES)) { drm_dbg_kms(&i915->drm, "More than one child device for port %c in VBT, using the first.\n", port_name(port)); diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index c84b581c61c6..ea90f957a5b9 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -8666,6 +8666,8 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915) return ret; } + intel_init_quirks_early(i915); + intel_bios_init(i915); ret = intel_vga_register(i915); diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c index a280448df771..bd34145a5868 100644 --- a/drivers/gpu/drm/i915/display/intel_quirks.c +++ b/drivers/gpu/drm/i915/display/intel_quirks.c @@ -65,6 +65,12 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915) drm_info(&i915->drm, "Applying no pps backlight power quirk\n"); } +static void quirk_multiple_vbt_devices(struct drm_i915_private *i915) +{ + intel_set_quirk(i915, QUIRK_MULTIPLE_VBT_DEVICES); + drm_info(&i915->drm, "Applying multiple VBT devices quirk\n"); +} + struct intel_quirk { int device; int subsystem_vendor; @@ -90,6 +96,12 @@ static int intel_dmi_no_pps_backlight(const struct dmi_system_id *id) return 1; } +static int intel_dmi_multiple_vbt_devices(const struct dmi_system_id *id) +{ + DRM_INFO("Allow multiple VBT devices in one port on %s\n", id->ident); + return 1; +} + static const struct intel_dmi_quirk intel_dmi_quirks[] = { { .dmi_id_list = &(const struct dmi_system_id[]) { @@ -138,6 +150,239 @@ static const struct intel_dmi_quirk intel_dmi_quirks[] = { }, }; +static const struct intel_dmi_quirk intel_dmi_quirks_early[] = { + { + .dmi_id_list = &(const struct dmi_system_id[]) { + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "XW5SKU1#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "XW5SKU4#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "XW5SKU5#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "XW5SKUA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "XW5SKUC#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83P94AW#ABJ"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83P99AW#ABU"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83P83AW#UUF"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83R24AW#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83M96AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83M97AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83M98AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N02AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83Q00AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N03AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83M99AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N04AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83Q10AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N09AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83Q11AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N10AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N06AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N07AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N08AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N01AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83N05AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83Q12AA#ABA"), + }, + }, + { + .callback = intel_dmi_multiple_vbt_devices, + .ident = "HP ZBook Power 15.6 inch G10 Mobile Workstation PC", + .matches = {DMI_EXACT_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP ZBook Power 15.6 inch G10 Mobile Workstation PC"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "83Q13AA#ABA"), + }, + }, + { } + }, + .hook = quirk_multiple_vbt_devices, + }, +}; + static struct intel_quirk intel_quirks[] = { /* Lenovo U160 cannot use SSC on LVDS */ { 0x0046, 0x17aa, 0x3920, quirk_ssc_force_disable }, @@ -224,6 +469,16 @@ void intel_init_quirks(struct drm_i915_private *i915) } } +void intel_init_quirks_early(struct drm_i915_private *i915) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(intel_dmi_quirks_early); i++) { + if (dmi_check_system(*intel_dmi_quirks_early[i].dmi_id_list) != 0) + intel_dmi_quirks_early[i].hook(i915); + } +} + bool intel_has_quirk(struct drm_i915_private *i915, enum intel_quirk_id quirk) { return i915->display.quirks.mask & BIT(quirk); diff --git a/drivers/gpu/drm/i915/display/intel_quirks.h b/drivers/gpu/drm/i915/display/intel_quirks.h index 10a4d163149f..4faa16e46882 100644 --- a/drivers/gpu/drm/i915/display/intel_quirks.h +++ b/drivers/gpu/drm/i915/display/intel_quirks.h @@ -17,9 +17,11 @@ enum intel_quirk_id { QUIRK_INVERT_BRIGHTNESS, QUIRK_LVDS_SSC_DISABLE, QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK, + QUIRK_MULTIPLE_VBT_DEVICES, }; void intel_init_quirks(struct drm_i915_private *i915); +void intel_init_quirks_early(struct drm_i915_private *i915); bool intel_has_quirk(struct drm_i915_private *i915, enum intel_quirk_id quirk); #endif /* __INTEL_QUIRKS_H__ */