From patchwork Tue May 24 10:39:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 12859960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0A63C433F5 for ; Tue, 24 May 2022 10:39:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66BEB10F065; Tue, 24 May 2022 10:39:57 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BB3210F065; Tue, 24 May 2022 10:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653388796; x=1684924796; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xu8FmKMr9TBT/1V60fCmMGsVqc8y1LIUAzbZM/oURTk=; b=ZNu3+IWIEAO2PPfnAMUiCbiLb5v/YvBsTDAIVRLFkKsbqDhaMx7jgHX4 YgeznpyhsRjwGn/fMfWdYDGXlmLqEqR8uhMmyyvmpvZsWHnKHfg5t5A1x vataNqlCKNG28qhR0Vzurqpp1/sJVK2DQxoMXSlq7EgQzDp1tSQ5k/EjG lRtIkeEMBNR3ZuWtczDgL54iHv91UkNyhQkOXmh9Ic2A5zisPScksikNi BwDEUzrsuWE/sMvkj/htdePd4mpBmmAG7GS1AxsONBo48JlgOyzIQtg7D iFCaBFi5t5xm6ByvDAPUug0D6DH86ckJsC01k+puYzPAOj2Ewe0zepkKb Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="261101116" X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="261101116" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 03:39:55 -0700 X-IronPort-AV: E=Sophos;i="5.91,248,1647327600"; d="scan'208";a="601163833" Received: from zychseba-mobl.ger.corp.intel.com (HELO localhost) ([10.249.136.104]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2022 03:39:47 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Tue, 24 May 2022 13:39:22 +0300 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v1 00/13] drm/edid: expand on struct drm_edid usage X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx@lists.freedesktop.org, Karol Herbst , Neil Armstrong , jani.nikula@intel.com, Robert Foss , Xinhui Pan , Maxime Ripard , Adam Jackson , Ben Skeggs , Andrzej Hajda , Thomas Zimmermann , Alex Deucher , Dave Airlie , nouveau@lists.freedesktop.org, Harry Wentland , =?utf-8?q?Christian_K=C3=B6nig?= , Laurent Pinchart Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hey all, I'm adding a bunch of people to the cover letter, sorry for the noise. I've been putting a lot of effort lately into cleaning up our EDID parsing. It's been long overdue. Here, we finally leverage all that prep work to implement the HDMI Forum HF-EEODB extension. In short, HF-EEODB lets an EDID extension override the number of extensions indicated in the base block. That has a lot of implications when it comes to EDID parsing and memory allocation that is currently spread around the subsystem. I've added the opaque struct drm_edid in commit e4ccf9a777d3 ("drm/edid: add struct drm_edid container"). The commit message is worth a read. Here, I'm expanding struct drm_edid to the interfaces for EDID reading and parsing. They all get an overhaul, along with the probe helper .get_modes() hook. In my mind, there is really no alternative to centralizing the EDID parsing, and hiding the details in drm_edid.c. I'm also adding a TODO entry; there's still a bunch of work to be done across the subsystem. BR, Jani. Cc: Adam Jackson Cc: Alex Deucher Cc: Andrzej Hajda Cc: Ben Skeggs Cc: Christian König Cc: Daniel Vetter Cc: Dave Airlie Cc: Harry Wentland Cc: Karol Herbst Cc: Laurent Pinchart Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Thomas Zimmermann Cc: Ville Syrjälä Cc: Xinhui Pan Cc: amd-gfx@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Jani Nikula (13): drm/edid: add block count and data helper functions for drm_edid drm/edid: keep track of alloc size in drm_do_get_edid() drm/edid: add new interfaces around struct drm_edid drm/edid: add drm_edid_connector_update() drm/probe-helper: abstract .get_modes() connector helper call drm/probe-helper: make .get_modes() optional, add default action drm/probe-helper: add .get_edid() callback drm/edid: add drm_edid_raw() to access the raw EDID data drm/i915/edid: convert DP, HDMI and LVDS to drm_edid drm/edid: do invalid block filtering in-place drm/edid: add HF-EEODB support to EDID read and allocation drm/edid: take HF-EEODB extension count into account drm/todo: add entry for converting the subsystem to struct drm_edid Documentation/gpu/todo.rst | 25 + drivers/gpu/drm/drm_connector.c | 2 + drivers/gpu/drm/drm_edid.c | 538 ++++++++++++++++-- drivers/gpu/drm/drm_probe_helper.c | 48 +- .../gpu/drm/i915/display/intel_connector.c | 4 +- .../drm/i915/display/intel_display_types.h | 4 +- drivers/gpu/drm/i915/display/intel_dp.c | 72 +-- drivers/gpu/drm/i915/display/intel_hdmi.c | 26 +- drivers/gpu/drm/i915/display/intel_lvds.c | 35 +- include/drm/drm_edid.h | 12 + include/drm/drm_modeset_helper_vtables.h | 19 + 11 files changed, 650 insertions(+), 135 deletions(-)