From patchwork Wed Feb 7 22:44:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 770659 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2045.outbound.protection.outlook.com [40.107.93.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9AC51CD22; Wed, 7 Feb 2024 22:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345886; cv=fail; b=kAs4AkdKfYMErJSuBxiYdlHIs1Xa4e+Bu7bNv+TXtVWMJLnBBc0TCmccWy6u54kYlctbsrILyUM4YdRQf9KMM77kpeCCL9eox4wDWHK0IoouK0WLJA6mkYH63nAdVvXcKHFSGbY1IqxoqW2GRCj0Bq6qG1E6KrTnD57cKDJ31oM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345886; c=relaxed/simple; bh=FCkRKJuUCiBH2bOfKA5F+B2kbip+9+FD9FCS5GkDD6o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kTnwaA+2IR6zr4hWeSwHk2lUUJUj5qM6/ozlX93PRZMbgOzfu+yCcq1e6CvhJ/0mpsNoOQou7mm4wIQavfXmBpj1sbOxwqI3K/Pi4RlkezEb0CV19on/xeDIC1zfSIXp6DMsCqoGUYIA+YyDynEz+kLooRUzq/N1VP/IyHKqTUs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=a3ygptJd; arc=fail smtp.client-ip=40.107.93.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="a3ygptJd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gQbtaOcSH+o75VMOjI2s4EcssB/Q3jaGuqUcsfhgghZK7QABM6+28zHQb2PWErfe6A9SYS1JvCTFUG/b0G2w62y2b70Y9M0kosTAYLEj4keiolhJRnBFq++tml5QeIg2+TRQEKgTNbf5EPzT2lNUpYptQrQ80XPWHZxeTegfoUQGnMR5N2cXwIe2/u2MjO2XRmXGF+FsUQ/dnb/T3mThlyq9D2fxGV4VsQy3ZypPDEDrFwgcs64szTBfuxU+v356LjLF/ur/9bQ6pvMZU59o3qC4N/NqWSanEPbz09GPoMLV/RYOF/7wFtrRl4gpnq1S8s73QJEUlzTn6DRV2NR/lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L3rqjVBUIR34AeU3HejtCIvV9HKWQfFukppU7iPWc4E=; b=fd9hFMTL8ZL6ohOF/3RA8TEGgV9AU2/iuOcVzRymQj96D3wh51oJwwDXqcH2Fi/qva1zBtsCoH2jcrI5jANJM8qGONfO02xSunJNIyKOAdNJn4oEA0U8LyBdB6qo8/GsZKwF1nfRezkvxb3NuSaL7FgkxQhT9M41ZHDfCtEY48oDmg6Fqb8PGpwBExAm8gWvlugEQDIBTJn9tlbHmlo8myFykx1Ju9vT3rpGi1+8CdQBblcjanTWnvQQoNDd6oHoSMOf6XePIa2zPA6q9iVlDUt2F6/F92TEVVryJsvg8wnKy3UUQ3xp0z9NZlfZT9DYaWeozY1d+V6piXA80YrFiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L3rqjVBUIR34AeU3HejtCIvV9HKWQfFukppU7iPWc4E=; b=a3ygptJdeFyXkHt8Myu8oMqaoKzl/HTz6zxVEDlQfZdtWmmi2raraM6KeUWvnj5U1LpUCTMPLKjjR65N1CTT6So9dDmpTK8gzlOKSm9ao9Im1YBsbFSsnHVG2HpRdX2Ma85RxaMzgHuK51y78NwcxTCXdoVTHxo4KJc2PmgxSgg= Received: from CY5PR17CA0037.namprd17.prod.outlook.com (2603:10b6:930:12::16) by MW4PR12MB7357.namprd12.prod.outlook.com (2603:10b6:303:219::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.13; Wed, 7 Feb 2024 22:44:42 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:12:cafe::7f) by CY5PR17CA0037.outlook.office365.com (2603:10b6:930:12::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38 via Frontend Transport; Wed, 7 Feb 2024 22:44:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 22:44:42 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 7 Feb 2024 16:44:41 -0600 From: Mario Limonciello To: , "open list:DRM DRIVERS" CC: "open list:ACPI" , open list , Melissa Wen , "Mario Limonciello" Subject: [PATCH v4 1/3] drm: Add drm_get_acpi_edid() helper Date: Wed, 7 Feb 2024 16:44:27 -0600 Message-ID: <20240207224429.104625-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240207224429.104625-1-mario.limonciello@amd.com> References: <20240207224429.104625-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|MW4PR12MB7357:EE_ X-MS-Office365-Filtering-Correlation-Id: cb1b74a0-4b31-420f-e015-08dc282e5ff0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HAcJnFd2CZ2XBalbhtWjKA8N/ls1o3T75PEtYjxIEzK5kSH+IqWvRWpvJT5yrwGuk90wD83fcEjf97eFBSrIunztERjyOIY82QZyfytInEEdE4w8O8QFvKHPxJZM8V7EOa2pe05Pfxm70q3V/uTpc1q4FZGr6Y3sPLLa9CSJNxbB+GsEeRpXQWxgKW/EyxqEFIwJO4EuN8zW96RxNt0VDd4Vuyh793VqNjdr+HX6wo0t13dnH7/Ko50hnyM+0tILKYBKvMC2Iv1p2G0gsxHPxPzweSXbE7pXGoqXq3U2WFZgRK1TcArMVvj8NKUhJMj3VUHYjVoKWMEdiVW87oXwDzfG9Xf6fZ2jDElLJB8vqNqXEnoOBLf/t20ZsgHEcHmDTsxjcK/IhyzY69WBly5u29WNiszAX39tW7MZ7wwAovoKPQI8vmG/vJHszUY4s1gBldN3CeBzVzC0kYpFmcB6Vpzba51GqB+TP8pk3K7uTT9Ypx0JqSudBfMem0qcsWPEZagah4FECN56OBtgMtLBPOKa1Tnz/aFWrJbjWjJoNWQthiSs7pzAns5uQ8IXrBD7m/S5DnIZjpzOAvHkfx4mEdBvbYM1dTJZZvsXuQRmav8= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(136003)(39860400002)(346002)(396003)(230922051799003)(64100799003)(82310400011)(1800799012)(186009)(451199024)(36840700001)(40470700004)(46966006)(2906002)(66899024)(478600001)(86362001)(5660300002)(426003)(8676002)(356005)(83380400001)(44832011)(70206006)(8936002)(54906003)(6666004)(4326008)(36756003)(70586007)(7696005)(41300700001)(16526019)(2616005)(110136005)(336012)(82740400003)(81166007)(26005)(316002)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 22:44:42.0808 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb1b74a0-4b31-420f-e015-08dc282e5ff0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7357 Some manufacturers have intentionally put an EDID that differs from the EDID on the internal panel on laptops. Drivers can call this helper to attempt to fetch the EDID from the BIOS's ACPI _DDC method. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/Kconfig | 5 +++ drivers/gpu/drm/drm_edid.c | 77 ++++++++++++++++++++++++++++++++++++++ include/drm/drm_edid.h | 1 + 3 files changed, 83 insertions(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 6ec33d36f3a4..ec2bb71e8b36 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -21,6 +21,11 @@ menuconfig DRM select KCMP select VIDEO_CMDLINE select VIDEO_NOMODESET + select ACPI_VIDEO if ACPI + select BACKLIGHT_CLASS_DEVICE if ACPI + select INPUT if ACPI + select X86_PLATFORM_DEVICES if ACPI && X86 + select ACPI_WMI if ACPI && X86 help Kernel-level support for the Direct Rendering Infrastructure (DRI) introduced in XFree86 4.0. If you say Y here, you need to select diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 923c4423151c..c649b4f9fd8e 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -28,6 +28,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include #include #include #include @@ -2188,6 +2189,49 @@ drm_do_probe_ddc_edid(void *data, u8 *buf, unsigned int block, size_t len) return ret == xfers ? 0 : -1; } +/** + * drm_do_probe_acpi_edid() - get EDID information via ACPI _DDC + * @data: struct drm_device + * @buf: EDID data buffer to be filled + * @block: 128 byte EDID block to start fetching from + * @len: EDID data buffer length to fetch + * + * Try to fetch EDID information by calling acpi_video_get_edid() function. + * + * Return: 0 on success or error code on failure. + */ +static int +drm_do_probe_acpi_edid(void *data, u8 *buf, unsigned int block, size_t len) +{ + struct drm_device *ddev = data; + struct acpi_device *acpidev = ACPI_COMPANION(ddev->dev); + unsigned char start = block * EDID_LENGTH; + void *edid; + int r; + + if (!acpidev) + return -ENODEV; + + /* fetch the entire edid from BIOS */ + r = acpi_video_get_edid(acpidev, ACPI_VIDEO_DISPLAY_LCD, -1, &edid); + if (r < 0) { + DRM_DEBUG_KMS("Failed to get EDID from ACPI: %d\n", r); + return -EINVAL; + } + if (len > r || start > r || start + len > r) { + r = -EINVAL; + goto cleanup; + } + + memcpy(buf, edid + start, len); + r = 0; + +cleanup: + kfree(edid); + + return r; +} + static void connector_bad_edid(struct drm_connector *connector, const struct edid *edid, int num_blocks) { @@ -2643,6 +2687,39 @@ struct edid *drm_get_edid(struct drm_connector *connector, } EXPORT_SYMBOL(drm_get_edid); +/** + * drm_get_acpi_edid - get EDID data, if available + * @connector: connector we're probing + * + * Use the BIOS to attempt to grab EDID data if possible. + * + * The returned pointer must be freed using drm_edid_free(). + * + * Return: Pointer to valid EDID or NULL if we couldn't find any. + */ +const struct drm_edid *drm_get_acpi_edid(struct drm_connector *connector) +{ + const struct drm_edid *drm_edid; + + switch (connector->connector_type) { + case DRM_MODE_CONNECTOR_LVDS: + case DRM_MODE_CONNECTOR_eDP: + break; + default: + return NULL; + } + + if (connector->force == DRM_FORCE_OFF) + return NULL; + + drm_edid = drm_edid_read_custom(connector, drm_do_probe_acpi_edid, connector->dev); + + /* Note: Do *not* call connector updates here. */ + + return drm_edid; +} +EXPORT_SYMBOL(drm_get_acpi_edid); + /** * drm_edid_read_custom - Read EDID data using given EDID block read function * @connector: Connector to use diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 7923bc00dc7a..ca41be289fc6 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -410,6 +410,7 @@ struct edid *drm_do_get_edid(struct drm_connector *connector, void *data); struct edid *drm_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter); +const struct drm_edid *drm_get_acpi_edid(struct drm_connector *connector); u32 drm_edid_get_panel_id(struct i2c_adapter *adapter); struct edid *drm_get_edid_switcheroo(struct drm_connector *connector, struct i2c_adapter *adapter); From patchwork Wed Feb 7 22:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 770925 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2352B1DDD5; Wed, 7 Feb 2024 22:44:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345888; cv=fail; b=YGVpYltFX3iHx+NRqLUPT9N35rDpCze0lAsb7SE8/Vw5sf6mpIPm7/PLO7m/UYSO7dPbox4N2spvBaFq7gsiZg3Lr2JmiX7tY2lrjW6s2slMYb+Z01MiI5AjoH4jxxCggnf171Fhj9SRnH0X8dCK9auvInuoGK38N4Z2gQG71Tc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345888; c=relaxed/simple; bh=d3/ZQc/qxt5Z4njDik82nnDGKRSToJUYLH0DNXjCWNg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RJ5eHsbQqNor5avLTXjHE2j/lOzbOdOE4Db2snaGIJPf+4fxUTgrsDvi1MES9UktGtvtpLuR8A40WUg4kmhfCTZn3jnAnmjSVgr8qkzmt3WhyewqqlfEqlSE1ziZHcQM4+buIj/95Lc9+bAiJNzu0eecECFAxz0AW5pfaIZabXo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=OEsfHfnP; arc=fail smtp.client-ip=40.107.236.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="OEsfHfnP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KNl74K56QvnToMly1R7Y2PaYFjHe3dSC29FUA3/TMVLJ1mIfGGxA4R3nHeHwekXrwsSXR62o3K2U1qPp1a33pPO9eO6KeqDrzWG9dwaXt9IHQMaSgNJHXf/C963CiWVGHoOilakOeYBeIMWxu45CN+L8VpUgwA8XV2dCm4KUJWdQZ8s77jRq6T5Dp7ShpMI3Ohtj8pZ2E3lhdmGCuS0qGIDYnt3mYLVu6TarwKBGMZHBSS2/5U5vo489zdTKIRDsBAmh3uDN1AEA640O85WE66BB6peiCGFBkksKozEpdFJlMwzZU7/McLRnmn33EMKN5K63N+F8eOx37thWaK3rlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L0U758bXDmlr5xoCHYpCSP5/Wjo9dBGJnEuGvD8N0Nc=; b=fpRLTLcWy6dYev2KTbEY/Tf7xEX1o9DRPFgdUopc7smyJ5hhhcc4H5FObQ4mB8Rn4PvsgT2E4hzKpLClpt0LPwZYKIJr5gV/KUiXdDXWh13C5jgSOegEPvuLFe7buGTTt2HieYMP7C3Zb2O5c7atZ5ruFMq6XiAJWCDNj5y8wUqFLf1lnC5qDtARxE2xGTZvlLyCPYONsabNTVuJW23ym/ST6A8DvSC9Wswuovq0SC+h7tGWHOjS+1Jrv/rihl7elcIQk7nFbq2RC1Jkatoq76O/6yIG/yucHkzUUhk0hhNuVKbP2fs6nFT4xHc7UF5iSgr5HsRNvxFXmWjEd7bIOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L0U758bXDmlr5xoCHYpCSP5/Wjo9dBGJnEuGvD8N0Nc=; b=OEsfHfnPsoV3xdf6lKkSS+37UwtB2w1oDlxGbE8+5ya+kO2NHQ4m1ZFRF3qM9Dsw5d3fiC8LTtAhJEGD/2MenQAUQ0AZ3CMy0nCO550/1YjSBHl/DKnLg3oF663I3fiqgzXN/dX1iPR4AJHvKHTFthhwer3T9jKrNnVlchoAWRs= Received: from CY5PR17CA0050.namprd17.prod.outlook.com (2603:10b6:930:12::15) by BY5PR12MB4259.namprd12.prod.outlook.com (2603:10b6:a03:202::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.15; Wed, 7 Feb 2024 22:44:43 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:12:cafe::4f) by CY5PR17CA0050.outlook.office365.com (2603:10b6:930:12::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.37 via Frontend Transport; Wed, 7 Feb 2024 22:44:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 22:44:42 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 7 Feb 2024 16:44:41 -0600 From: Mario Limonciello To: , "open list:DRM DRIVERS" CC: "open list:ACPI" , open list , Melissa Wen , "Mario Limonciello" Subject: [PATCH v4 2/3] drm/nouveau: Use drm_get_acpi_edid() helper Date: Wed, 7 Feb 2024 16:44:28 -0600 Message-ID: <20240207224429.104625-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240207224429.104625-1-mario.limonciello@amd.com> References: <20240207224429.104625-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|BY5PR12MB4259:EE_ X-MS-Office365-Filtering-Correlation-Id: ad78dee2-2960-4990-29f2-08dc282e605c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JqGfOO11rv357/+ATJeflevmC+69qHH1rZ397RtUom8SwnQQJCBp+5FtXYYMwS5/xAACecZfs6/NSY7q+uWXIqvGE85xuE/YzCN2sKe5Hhpa396CdofTl/jETsRlVTE3yZKwuk4Qw7xJCvP7IpOY8bK1Fp+jIS/Cz5eWMoyXuoF46T8EAhStiz0+SiEHnGAvimrWalrS77AHxIrEgqYYkHdlbN0G9YA6hvpM5P6gLb8f/sH/yDD2ng+bdhyNeHY6NMx4Ky0iviNT+J4WxO143IltGbhV3Hxonsl8iybOrz7dWUbfFFN60DlKmiFsxh7J9awMQpG4AtuMs2rnWtOT+pSKFHoyt8iSNKd43t056AiJEt055B9nffvjoSTx6ZfuRNhqHeNrH9HcilOaLnPQU7VQPBbq+U6aE+z/YAc4K/o14mFzAuXYBWID5pPwY2OkitwykwvZ7zum1eD+Y9EJWyTQ8eDGUpQutgpYaD9MEGMBRs2IGlxU043G+EpbXooUKaQMONo0dCrhk/fVIwQOtqmQeltgbeG7IDnArXRjpwL9zIv5nYOxdw6s5M3Gzipf0vVEajClroINEF+NdSbnpnYgClYdAg9AxGTjMvGNyLA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(346002)(136003)(376002)(39860400002)(230922051799003)(64100799003)(82310400011)(186009)(1800799012)(451199024)(46966006)(36840700001)(40470700004)(36756003)(41300700001)(2616005)(81166007)(83380400001)(426003)(336012)(1076003)(82740400003)(16526019)(356005)(110136005)(4326008)(6666004)(316002)(70586007)(478600001)(70206006)(5660300002)(54906003)(7696005)(26005)(44832011)(86362001)(8936002)(2906002)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 22:44:42.8933 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad78dee2-2960-4990-29f2-08dc282e605c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4259 Rather than inventing a wrapper to acpi_video_get_edid() use the one provided by drm. This fixes two problems: 1. A memory leak that the memory provided by the ACPI call was never freed. 2. Validation of the BIOS provided blob. Convert the usage in nouveau_connector_detect_lvds() to use struct drm_edid at the same time. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 27 --------------------- drivers/gpu/drm/nouveau/nouveau_acpi.h | 2 -- drivers/gpu/drm/nouveau/nouveau_connector.c | 20 +++++++-------- 3 files changed, 9 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 8f0c69aad248..de9daafb3fbb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -360,33 +360,6 @@ void nouveau_unregister_dsm_handler(void) {} void nouveau_switcheroo_optimus_dsm(void) {} #endif -void * -nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) -{ - struct acpi_device *acpidev; - int type, ret; - void *edid; - - switch (connector->connector_type) { - case DRM_MODE_CONNECTOR_LVDS: - case DRM_MODE_CONNECTOR_eDP: - type = ACPI_VIDEO_DISPLAY_LCD; - break; - default: - return NULL; - } - - acpidev = ACPI_COMPANION(dev->dev); - if (!acpidev) - return NULL; - - ret = acpi_video_get_edid(acpidev, type, -1, &edid); - if (ret < 0) - return NULL; - - return kmemdup(edid, EDID_LENGTH, GFP_KERNEL); -} - bool nouveau_acpi_video_backlight_use_native(void) { return acpi_video_backlight_use_native(); diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.h b/drivers/gpu/drm/nouveau/nouveau_acpi.h index e39dd8b94b8b..6a3def8e6cca 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.h +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.h @@ -10,7 +10,6 @@ bool nouveau_is_v1_dsm(void); void nouveau_register_dsm_handler(void); void nouveau_unregister_dsm_handler(void); void nouveau_switcheroo_optimus_dsm(void); -void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); bool nouveau_acpi_video_backlight_use_native(void); void nouveau_acpi_video_register_backlight(void); #else @@ -19,7 +18,6 @@ static inline bool nouveau_is_v1_dsm(void) { return false; }; static inline void nouveau_register_dsm_handler(void) {} static inline void nouveau_unregister_dsm_handler(void) {} static inline void nouveau_switcheroo_optimus_dsm(void) {} -static inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; } static inline bool nouveau_acpi_video_backlight_use_native(void) { return true; } static inline void nouveau_acpi_video_register_backlight(void) {} #endif diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 856b3ef5edb8..4c47d231c65e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -687,7 +687,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_connector *nv_connector = nouveau_connector(connector); struct nouveau_encoder *nv_encoder = NULL; - struct edid *edid = NULL; + const struct drm_edid *drm_edid = NULL; enum drm_connector_status status = connector_status_disconnected; nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); @@ -698,7 +698,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) if (!drm->vbios.fp_no_ddc) { status = nouveau_connector_detect(connector, force); if (status == connector_status_connected) { - edid = nv_connector->edid; + drm_edid = drm_edid_alloc(nv_connector->edid, EDID_LENGTH); goto out; } } @@ -713,8 +713,8 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) * valid - it's not (rh#613284) */ if (nv_encoder->dcb->lvdsconf.use_acpi_for_edid) { - edid = nouveau_acpi_edid(dev, connector); - if (edid) { + drm_edid = drm_get_acpi_edid(connector); + if (drm_edid) { status = connector_status_connected; goto out; } @@ -734,12 +734,9 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) * stored for the panel stored in them. */ if (!drm->vbios.fp_no_ddc) { - edid = (struct edid *)nouveau_bios_embedded_edid(dev); - if (edid) { - edid = kmemdup(edid, EDID_LENGTH, GFP_KERNEL); - if (edid) - status = connector_status_connected; - } + drm_edid = drm_edid_alloc(nouveau_bios_embedded_edid(dev), EDID_LENGTH); + if (drm_edid) + status = connector_status_connected; } out: @@ -750,7 +747,8 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) status = connector_status_unknown; #endif - nouveau_connector_set_edid(nv_connector, edid); + drm_edid_connector_update(connector, drm_edid); + drm_edid_free(drm_edid); if (nv_encoder) nouveau_connector_set_encoder(connector, nv_encoder); return status; From patchwork Wed Feb 7 22:44:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 770658 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060.outbound.protection.outlook.com [40.107.237.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 800121EA78; Wed, 7 Feb 2024 22:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345889; cv=fail; b=OUsOsYb19ZMQuge5NZpC3BAvjeOzcCtobF4aoM4xLyWxqlA/izFMTaaUX8+SyKrQUoOTqBRYhX9dVf7eM10yo/pEnjO6Sl4VxXoMnYI97IMyoJdnVzSeuZjPaxmQvl01pYCe0Js2FiBsu7A285/+x5FzrjVqL/vbTst1b0nJxMM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707345889; c=relaxed/simple; bh=bKtWl/av5sGbB+HXhTeeti15etgUSnlYTvSfu/FJGak=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cZDn3kMxxILN/80cp5RY4BKTsaNKeFbRa9oB9/aag7AMC9yTNiwsTE2LWP98CPgGsODQqlZKT9foIiVbmSrOb2Aw38FRK61l2MXpisqnq/YapCcsy3JezKvwEmCiGF8kfheWAyChkpsCI832uKseVwjjze/5QkTYoGErVaFUwGs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=piXKrhHe; arc=fail smtp.client-ip=40.107.237.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="piXKrhHe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1i5upamS0jBhZFpmqwGrvky90s+0kfhOa8CaBc0AJUT3ZK4X2z81QfwkRKpIEUi1mljtRVgUHMYRO+4JxzipIEa2LSAB6HPzPiSAaYHrBTYxM7XMzqs9tUh7d8Kgpg8z8ENo1LwiKjDCdoHhAUKGwLZVXqMxCoVAYRV9ZsgsvREg14mJPNRzGXk2v11kuh1smrOZlCHWjHtH5/Kby5HMtSlOFpRmm2YVhE+W5TQrD6Pv/c1+FF0h6pkff02ab4c50cickXypACcbOKm9yiEDL0PW/rTZJPOq/k8WDOWIuyNS3JrR5saqz95W3e2xElRba/hknszMvhl3izvCNMRRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OvA6Y+p4JfiaZn90WKszcx08xYhO9dzis2L3CNdP2sk=; b=Kpc+pl567pcOmhfLumTxnmcUW/o19wYNXhxJNoaSvTZN2LPJ8q7lhvukY9z4RyAZqdbTOOnRmWnc/UkoSFtS1kOUEUkPGB0NsBidD8LRxp9FakPurwRIrNJgDlX1XZ6n9rY3aH9W0jfL+yinCaNb3v+pk+6/KL9iU77T28iUx6VYmtnTAcy60WTBRsmKES4KHTRdnddGlxGMGg+v2Wiiqmt0z9NE+iXSL093cbDIVrQQfTHJv2o+A/Q5rspudZ6LSr47PBTROsmil4qN4JsFlJY298XThgk0IBPQZHQV9vOwkaoNuurFwKbEcgafcdSJzDaC6lC1PLtEAfsuPCe3yQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OvA6Y+p4JfiaZn90WKszcx08xYhO9dzis2L3CNdP2sk=; b=piXKrhHexjDBPH7A4gJ/Iis6MkctvzbKU8dFfxMryCHuaYbsSmdSgW0MWUdzHF05Kg7zo0vxI6gqLwxH82eNBaJTYCig+ufdECMdu2KN+DUygLjEqHGUqME30SjRHlnXRZPq7nuGRwELVx53uL1u+B2P5U6wD73ym6+/I9uLRF0= Received: from CY5PR17CA0048.namprd17.prod.outlook.com (2603:10b6:930:12::9) by CY8PR12MB7753.namprd12.prod.outlook.com (2603:10b6:930:93::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.16; Wed, 7 Feb 2024 22:44:43 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:12:cafe::a5) by CY5PR17CA0048.outlook.office365.com (2603:10b6:930:12::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38 via Frontend Transport; Wed, 7 Feb 2024 22:44:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 22:44:43 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 7 Feb 2024 16:44:41 -0600 From: Mario Limonciello To: , "open list:DRM DRIVERS" CC: "open list:ACPI" , open list , Melissa Wen , "Mario Limonciello" , Pranjal Ramajor Asha Kanojiya Subject: [PATCH v4 3/3] drm: Drop unneeded selects in DRM drivers Date: Wed, 7 Feb 2024 16:44:29 -0600 Message-ID: <20240207224429.104625-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240207224429.104625-1-mario.limonciello@amd.com> References: <20240207224429.104625-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|CY8PR12MB7753:EE_ X-MS-Office365-Filtering-Correlation-Id: f4065828-154d-4bc4-8701-08dc282e60da X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G1b1X7m083qjhSi+NNexLHp+OfDCvEZBm58o5SdcXhhcpDwcaAm0X6adFFYlNMsKE+exu+5abaXDBGD2dutOdoVTrgNek/R/PNxAjzbBlON4d2cnqZO4UsSH/oJ4/M8mmzSto2vrpOLsJtsE2rJm+Bf/iM+ki4Uk9njy0+j6RfQDwq5xRYF+MkqbRM5sXS+D+1ayHC+YxUbZoKu4Y3ZNuwnbm8iQb6+0jqPT05YqnhOtBh6DRGGoEck0gwhlEDr5kNNzvsrMAkb4Zyy5cLxgPvi3GoFBncM6UqbMDFUL0eAh6F0UDtSuYw91srJGFsjOQrpJUF/Bd1uuSHgdkUcwLiQ5yYeUvGv8qnmczE2FMS74HVUSWOUkHM5ISOqapRVQTKMyFTFYpoAwBoQhkJRrhccYTzJTrRbyWb90UD8UaYKujB516pX89DDdOd3FfxZX8Gfjc3PcAeAWs0PodrHi5Iiv8z/fesUEbXKMzqLmxPukXb2G2MV79Ic+odWQ2ammIpx5j2WuurSPNQPFpwIR5Ro0XbF41CcFSktmlSVYafxNis62isCKEQ89o1fUv/Z2tRIHeyH5hjIATqhetUJZxL1IcXHac2JrYOgHwHLUOGI= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(376002)(346002)(136003)(230922051799003)(1800799012)(64100799003)(82310400011)(186009)(451199024)(46966006)(40470700004)(36840700001)(26005)(2616005)(336012)(16526019)(426003)(83380400001)(478600001)(1076003)(7696005)(86362001)(70586007)(316002)(70206006)(4326008)(8676002)(54906003)(8936002)(110136005)(356005)(81166007)(6666004)(82740400003)(44832011)(36756003)(41300700001)(2906002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 22:44:43.6121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4065828-154d-4bc4-8701-08dc282e60da X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7753 All of the selects on ACPI_VIDEO are unnecessary when DRM does the select for ACPI_VIDEO as it provides a helper for acpi based EDID. Reviewed-by: Pranjal Ramajor Asha Kanojiya Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/Kconfig | 7 ------- drivers/gpu/drm/gma500/Kconfig | 6 ------ drivers/gpu/drm/i915/Kconfig | 7 ------- drivers/gpu/drm/nouveau/Kconfig | 4 ---- drivers/gpu/drm/radeon/Kconfig | 7 ------- drivers/gpu/drm/xe/Kconfig | 6 ------ 6 files changed, 37 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index 22d88f8ef527..b2178a5a947c 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -22,13 +22,6 @@ config DRM_AMDGPU select DRM_BUDDY select DRM_SUBALLOC_HELPER select DRM_EXEC - # amdgpu depends on ACPI_VIDEO when ACPI is enabled, for select to work - # ACPI_VIDEO's dependencies must also be selected. - select INPUT if ACPI - select ACPI_VIDEO if ACPI - # On x86 ACPI_VIDEO also needs ACPI_WMI - select X86_PLATFORM_DEVICES if ACPI && X86 - select ACPI_WMI if ACPI && X86 help Choose this option if you have a recent AMD Radeon graphics card. diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig index efb4a2dd2f80..6921ef67b256 100644 --- a/drivers/gpu/drm/gma500/Kconfig +++ b/drivers/gpu/drm/gma500/Kconfig @@ -6,12 +6,6 @@ config DRM_GMA500 select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION select I2C select I2C_ALGOBIT - # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 - select ACPI_VIDEO if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select INPUT if ACPI - select X86_PLATFORM_DEVICES if ACPI - select ACPI_WMI if ACPI help Say yes for an experimental 2D KMS framebuffer driver for the Intel GMA500 (Poulsbo), Intel GMA600 (Moorestown/Oak Trail) and diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index b5d6e3352071..476da09433bb 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -22,13 +22,6 @@ config DRM_I915 select I2C select I2C_ALGOBIT select IRQ_WORK - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_CLASS_DEVICE if ACPI - select INPUT if ACPI - select X86_PLATFORM_DEVICES if ACPI - select ACPI_WMI if ACPI - select ACPI_VIDEO if ACPI select ACPI_BUTTON if ACPI select SYNC_FILE select IOSF_MBI if X86 diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 1e6aaf95ff7c..61f531abd3e3 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -20,11 +20,7 @@ config DRM_NOUVEAU select ACPI_WMI if ACPI && X86 select MXM_WMI if ACPI && X86 select POWER_SUPPLY - # Similar to i915, we need to select ACPI_VIDEO and it's dependencies - select BACKLIGHT_CLASS_DEVICE if ACPI && X86 - select INPUT if ACPI && X86 select THERMAL if ACPI && X86 - select ACPI_VIDEO if ACPI && X86 select SND_HDA_COMPONENT if SND_HDA_CORE help Choose this option for open-source NVIDIA support. diff --git a/drivers/gpu/drm/radeon/Kconfig b/drivers/gpu/drm/radeon/Kconfig index f98356be0af2..12149d594100 100644 --- a/drivers/gpu/drm/radeon/Kconfig +++ b/drivers/gpu/drm/radeon/Kconfig @@ -19,13 +19,6 @@ config DRM_RADEON select INTERVAL_TREE select I2C select I2C_ALGOBIT - # radeon depends on ACPI_VIDEO when ACPI is enabled, for select to work - # ACPI_VIDEO's dependencies must also be selected. - select INPUT if ACPI - select ACPI_VIDEO if ACPI - # On x86 ACPI_VIDEO also needs ACPI_WMI - select X86_PLATFORM_DEVICES if ACPI && X86 - select ACPI_WMI if ACPI && X86 help Choose this option if you have an ATI Radeon graphics card. There are both PCI and AGP versions. You don't need to choose this to diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index e36ae1f0d885..cf60bdcafb0c 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -19,13 +19,7 @@ config DRM_XE select DRM_MIPI_DSI select RELAY select IRQ_WORK - # xe depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_CLASS_DEVICE if ACPI - select INPUT if ACPI - select ACPI_VIDEO if X86 && ACPI select ACPI_BUTTON if ACPI - select ACPI_WMI if X86 && ACPI select SYNC_FILE select IOSF_MBI select CRC32