From patchwork Thu Mar 21 09:45:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13598552 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 44370C54E68 for ; Thu, 21 Mar 2024 09:45:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C780910E4CB; Thu, 21 Mar 2024 09:45:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="c+aT40+3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8111C10E4CB; Thu, 21 Mar 2024 09:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711014341; x=1742550341; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IKGqrQphR5b79ERXXYPDjXSyxAGvreM0eJOLhXwviRs=; b=c+aT40+3a2iH7NW1aA4aGW7gXM6pI7lKoGs+HC9j1JzWq+ZsPy9heA7i 4SpFyUQ78T0UNPEE6TfzZoZVNqLCyVlTDDqv24Dl0s171gq7gYkhXW04T Jx0ZWK2DtCUw0INlQo5+YKZT/1/dT75qNo576MNQWO4LcsFAdclaYcZeC Yaly1nGMp9hi8s0rSfXoRgQh3UnJO9DwEDJWtA15db+VFpX+vVuDpY6G1 AWshCk1XDMUrJx50+4Wl6xv5JlfUQTsGtZ6mCMvMxZt9KbSKecFOKtkMC OdU+Ggs6j1imooPefdB/MDR7KmCsfHOr2JJCJl8sv151eL4h8I6Zrepbd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="28462354" X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="28462354" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="14456950" Received: from amaslenx-mobl.ger.corp.intel.com (HELO localhost) ([10.252.54.141]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:40 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCH 1/3] drm/displayid: move drm_displayid.h to drm_displayd_internal.h Date: Thu, 21 Mar 2024 11:45:29 +0200 Message-Id: <16e4af568d8e54c90077b520eab5176e94753023.1711014272.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" There are no exported symbols for displayid, and it's all internal interfaces. Move the header to drivers/gpu/drm/drm_displayd_internal.h. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_displayid.c | 3 ++- .../gpu/drm/drm_displayid_internal.h | 5 +++-- drivers/gpu/drm/drm_edid.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) rename include/drm/drm_displayid.h => drivers/gpu/drm/drm_displayid_internal.h (98%) diff --git a/drivers/gpu/drm/drm_displayid.c b/drivers/gpu/drm/drm_displayid.c index 9edc111be7ee..f72a893c7deb 100644 --- a/drivers/gpu/drm/drm_displayid.c +++ b/drivers/gpu/drm/drm_displayid.c @@ -3,10 +3,11 @@ * Copyright © 2021 Intel Corporation */ -#include #include #include +#include "drm_displayid_internal.h" + static const struct displayid_header * displayid_get_header(const u8 *displayid, int length, int index) { diff --git a/include/drm/drm_displayid.h b/drivers/gpu/drm/drm_displayid_internal.h similarity index 98% rename from include/drm/drm_displayid.h rename to drivers/gpu/drm/drm_displayid_internal.h index 566497eeb3b8..5ca3db6d788f 100644 --- a/include/drm/drm_displayid.h +++ b/drivers/gpu/drm/drm_displayid_internal.h @@ -19,8 +19,9 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef DRM_DISPLAYID_H -#define DRM_DISPLAYID_H + +#ifndef DRM_DISPLAYID_INTERNAL_H +#define DRM_DISPLAYID_INTERNAL_H #include #include diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index ea77577a3786..07752cd37b57 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -38,7 +38,6 @@ #include #include -#include #include #include #include @@ -46,6 +45,7 @@ #include #include "drm_crtc_internal.h" +#include "drm_displayid_internal.h" #include "drm_internal.h" static int oui(u8 first, u8 second, u8 third) From patchwork Thu Mar 21 09:45:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13598553 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 CDB8DC54E68 for ; Thu, 21 Mar 2024 09:45:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 326D910E4DC; Thu, 21 Mar 2024 09:45:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YWpH8fWC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15C1F10E4E8; Thu, 21 Mar 2024 09:45:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711014346; x=1742550346; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=12zjj2/En7RptkNkfL85EdZZ8p/Xi8cCRzRJe7hvj4I=; b=YWpH8fWCB+BnyC/76IplZNoc0f7T/X/UPaHI6+YGuOmxvDB1xvH7hK+p XPrjI6kO/vV3nl3DMh5EH0vyK91lFF3LzTkJr+ZXaD6Wl7xR6LrWT/V4X qCHwc1W+/+i7LBh/FJM3Z2lCEbRQoPiC+HaBIaQcH0zlPfNedbJL9bkRD urK4CDDZpfAJdSFqprxckzctTX4bixvdFFJWVaydbNXunOJ5x1jS417Kr NMot8yBFGRuyRcxNn+0SpxdNxtUU+qba5AQWeW2H9H+ChDngOoVCyWMZt DX+NdERdVkxAQPPalE5bt+kClbxYuyDNNK8UMIQGISYXwrWdF0Xz8L0TK Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="28462370" X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="28462370" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="14456961" Received: from amaslenx-mobl.ger.corp.intel.com (HELO localhost) ([10.252.54.141]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:45 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCH 2/3] drm/edid: move all internal declarations to drm_crtc_internal.h Date: Thu, 21 Mar 2024 11:45:30 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The declarations for internal EDID functions are a bit scattered. Put them all in drm_crtc_internal.h. Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_crtc_internal.h | 6 ++++++ drivers/gpu/drm/drm_displayid.c | 1 + drivers/gpu/drm/drm_eld.c | 4 +++- drivers/gpu/drm/drm_internal.h | 5 ----- include/drm/drm_edid.h | 3 --- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index 0c693229a1c9..2256893d7d67 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h @@ -43,12 +43,14 @@ enum drm_color_range; enum drm_connector_force; enum drm_mode_status; +struct cea_sad; struct drm_atomic_state; struct drm_bridge; struct drm_connector; struct drm_crtc; struct drm_device; struct drm_display_mode; +struct drm_edid; struct drm_file; struct drm_framebuffer; struct drm_mode_create_dumb; @@ -297,6 +299,10 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode); int drm_edid_override_show(struct drm_connector *connector, struct seq_file *m); int drm_edid_override_set(struct drm_connector *connector, const void *edid, size_t size); int drm_edid_override_reset(struct drm_connector *connector); +const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid, + int ext_id, int *ext_index); +void drm_edid_cta_sad_get(const struct cea_sad *cta_sad, u8 *sad); +void drm_edid_cta_sad_set(struct cea_sad *cta_sad, const u8 *sad); /* drm_edid_load.c */ #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE diff --git a/drivers/gpu/drm/drm_displayid.c b/drivers/gpu/drm/drm_displayid.c index f72a893c7deb..f800dc0906d5 100644 --- a/drivers/gpu/drm/drm_displayid.c +++ b/drivers/gpu/drm/drm_displayid.c @@ -6,6 +6,7 @@ #include #include +#include "drm_crtc_internal.h" #include "drm_displayid_internal.h" static const struct displayid_header * diff --git a/drivers/gpu/drm/drm_eld.c b/drivers/gpu/drm/drm_eld.c index 5177991aa272..c0428d07de53 100644 --- a/drivers/gpu/drm/drm_eld.c +++ b/drivers/gpu/drm/drm_eld.c @@ -3,10 +3,12 @@ * Copyright © 2023 Intel Corporation */ +#include + #include #include -#include "drm_internal.h" +#include "drm_crtc_internal.h" /** * drm_eld_sad_get - get SAD from ELD to struct cea_sad diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index 2215baef9a3e..690505a1f7a5 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -35,7 +35,6 @@ #define DRM_IF_VERSION(maj, min) (maj << 16 | min) -struct cea_sad; struct dentry; struct dma_buf; struct iosys_map; @@ -278,8 +277,4 @@ void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent, const struct drm_framebuffer *fb); void drm_framebuffer_debugfs_init(struct drm_device *dev); -/* drm_edid.c */ -void drm_edid_cta_sad_get(const struct cea_sad *cta_sad, u8 *sad); -void drm_edid_cta_sad_set(struct cea_sad *cta_sad, const u8 *sad); - #endif /* __DRM_INTERNAL_H__ */ diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 6f65bbf655a1..6eadc4f12c07 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -467,7 +467,4 @@ int drm_edid_connector_update(struct drm_connector *connector, int drm_edid_connector_add_modes(struct drm_connector *connector); bool drm_edid_is_digital(const struct drm_edid *drm_edid); -const u8 *drm_find_edid_extension(const struct drm_edid *drm_edid, - int ext_id, int *ext_index); - #endif /* __DRM_EDID_H__ */ From patchwork Thu Mar 21 09:45:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13598554 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 BB784CD11DB for ; Thu, 21 Mar 2024 09:45:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F15BA10E4E0; Thu, 21 Mar 2024 09:45:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="COm9w4wG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 918D010E4C2; Thu, 21 Mar 2024 09:45:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711014352; x=1742550352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BnavicqBEYhBzwyTj6BAbml9agI26PcL36kEbvLlQBk=; b=COm9w4wGW6Dafxi/f1jsp2zBddp3TMj44gbnm0ay2SMqk7BWWZylcILQ 83HisJhhYgXcURK4NT/3lSnCgFnxKjp0XW2WjuOLIBX+daborPq7h/YqC sn2WburgJqxSvJaZfSQubZ518X4WhXsZm6QziZEuXd2d8a+jqTzft2zM8 tYIMCUlXfEQ9f6ohZ6dtH0gIpqSOhT5w3FJo3ycN4dTE79Pi6Kbw6XyCC qJxlyiKU6SQoPIdL8wvYZGLhCH217Of87f3KK10/HfLiLazOx7xImOtxM MIkoC/rdTLlRL8QViUq99g7BRG9lNEKgF3OUPqtQ+5PcKPVsE5jkAmouR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11019"; a="28462379" X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="28462379" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,142,1708416000"; d="scan'208";a="14854758" Received: from amaslenx-mobl.ger.corp.intel.com (HELO localhost) ([10.252.54.141]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 02:45:50 -0700 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCH 3/3] drm/edid: group struct drm_edid based declarations together Date: Thu, 21 Mar 2024 11:45:31 +0200 Message-Id: <774899a4f138bc2d9736af75b0f331cca1a13341.1711014272.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Keep the declarations for struct drm_edid based functions together. Signed-off-by: Jani Nikula --- include/drm/drm_edid.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 6eadc4f12c07..19814bb1103c 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h @@ -417,10 +417,6 @@ 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_edid_read_base_block(struct i2c_adapter *adapter); -u32 drm_edid_get_panel_id(const struct drm_edid *drm_edid); -bool drm_edid_match(const struct drm_edid *drm_edid, - const struct drm_edid_ident *ident); struct edid *drm_get_edid_switcheroo(struct drm_connector *connector, struct i2c_adapter *adapter); struct edid *drm_edid_duplicate(const struct edid *edid); @@ -460,11 +456,15 @@ const struct drm_edid *drm_edid_read_ddc(struct drm_connector *connector, const struct drm_edid *drm_edid_read_custom(struct drm_connector *connector, int (*read_block)(void *context, u8 *buf, unsigned int block, size_t len), void *context); +const struct drm_edid *drm_edid_read_base_block(struct i2c_adapter *adapter); const struct drm_edid *drm_edid_read_switcheroo(struct drm_connector *connector, struct i2c_adapter *adapter); int drm_edid_connector_update(struct drm_connector *connector, const struct drm_edid *edid); int drm_edid_connector_add_modes(struct drm_connector *connector); bool drm_edid_is_digital(const struct drm_edid *drm_edid); +u32 drm_edid_get_panel_id(const struct drm_edid *drm_edid); +bool drm_edid_match(const struct drm_edid *drm_edid, + const struct drm_edid_ident *ident); #endif /* __DRM_EDID_H__ */