From patchwork Fri May 3 12:24:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652689 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 A5F9EC4345F for ; Fri, 3 May 2024 12:24:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BEB010FBF8; Fri, 3 May 2024 12:24:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Z1O+OsPn"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 33B1F10FBF8 for ; Fri, 3 May 2024 12:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739095; x=1746275095; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=RYywgvKONJH4h66+1L9ACOf1bRxqJP025osQhR9/WdI=; b=Z1O+OsPnD/h2E38NZzu8HvVSKi1ftxq71l93RvQ4O8+XSIvIGcYxi7EN GesHuL4ghUf8FTCrPGE7tF5nk8jcb2kwbpb0PjE8Md7MIapyqX8RzzBGf lYDlP26iKLOOBBKUdthcodMSRUesShGCQepxzbdZvRl3shIOmIKY+CqHz 0TtF1K9lWGAD7MrDeKQ0EbAyl/TBbMWoxQZPF1/fb1osYPKAfkYJar0Z2 549bELsYPAu9m/iKX/M6a4RfpZpbDLTKNPZNnehdIyi3FGCHK5RzbpbCj KW+c9WsB6IFTo9XV7oATU2bFvXKCcUprblxgyLdN+DhClmIOex6HVRQ7o w==; X-CSE-ConnectionGUID: CoHQ4YJDQSSIALX0PaaEgg== X-CSE-MsgGUID: 55OoD6ayT56edOeV4l2xVw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372718" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372718" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:24:55 -0700 X-CSE-ConnectionGUID: paOf49JwS4CQVR6Ccjzgtw== X-CSE-MsgGUID: 5cX1FvPrS0SOV631GYfG9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463557" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:24:53 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:24:52 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 01/35] drm/i915/bios: Define eDP DSC disable bit Date: Fri, 3 May 2024 15:24:15 +0300 Message-ID: <20240503122449.27266-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä There's a new "DSC disable" bit in the eDP VBT block. Define it. TODO: actually use it? Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 3815aa21d19f..d7b9bde5dcc4 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -749,6 +749,7 @@ struct bdb_edp { struct edp_apical_params apical_params[16]; /* 203+ */ u16 edp_fast_link_training_rate[16]; /* 224+ */ u16 edp_max_port_link_rate[16]; /* 244+ */ + u16 edp_dsc_disable; /* 251+ */ } __packed; /* From patchwork Fri May 3 12:24:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652690 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 9B8A3C4345F for ; Fri, 3 May 2024 12:25:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B65610FBF4; Fri, 3 May 2024 12:25:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YzzX6CfS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06FE710FBFA for ; Fri, 3 May 2024 12:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739098; x=1746275098; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=NV4v1fypmz600q9s2ZPMCmhSt0EDN6/DOY9IYpY1u/o=; b=YzzX6CfS5ZQJJaIHhGgBPOlper2tqF1DzoGnh1tceih/2R+6kNaaTz1J PneprYvFXxZSUIwbtMDv8zdYiCngMyjbQcFOYwQABoYyoPBeebot1qTI+ yiwmvpRKi42iVrgjhehnANSfU9M5xKm+soqJSqHEA0jnRH4P+XfpSpZi9 tyxf7t/0ZZlW3DHdQoMep31zeHodkq43vTwkwvB0E4KQiQzcNXiU9M0OF rMPlt30VVoTqNyrpXl2IqW/nt9UePKWM3OyE3e88HjVNWkKnLis8IsrSq jauszPJtxepaMYO40SJlkQ58tstheobRNZUOFk4xHU7AkBsEPX0aErd0s A==; X-CSE-ConnectionGUID: 9eLImuvyRBe0Q4tjvKqnaw== X-CSE-MsgGUID: xUWqo+0vSW2KZfUmdgratg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372721" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372721" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:24:58 -0700 X-CSE-ConnectionGUID: vKHk+fEOR8Sm37NnDQj+rg== X-CSE-MsgGUID: ZOZcDk9rQnKSZOC5WWdyFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463559" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:24:55 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:24:55 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 02/35] drm/i915/bios: Remove version number comment from DEVICE_HANDLE_EFP4 Date: Fri, 3 May 2024 15:24:16 +0300 Message-ID: <20240503122449.27266-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä DEVICE_HANDLE_EFP4 has actually been in use since the very beginning, or at least something has been occupying that bit because old VBTs actually use it, and it definitely looks to be about external displays given how its used. So let's ignore what the current spec claims and remove the misleading version number comment. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index d7b9bde5dcc4..eebb91f4d88b 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -201,7 +201,7 @@ struct bdb_general_features { #define DEVICE_HANDLE_EFP1 0x0004 #define DEVICE_HANDLE_EFP2 0x0040 #define DEVICE_HANDLE_EFP3 0x0020 -#define DEVICE_HANDLE_EFP4 0x0010 /* 194+ */ +#define DEVICE_HANDLE_EFP4 0x0010 #define DEVICE_HANDLE_EFP5 0x0002 /* 215+ */ #define DEVICE_HANDLE_EFP6 0x0001 /* 217+ */ #define DEVICE_HANDLE_EFP7 0x0100 /* 217+ */ From patchwork Fri May 3 12:24:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652691 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 86459C4345F for ; Fri, 3 May 2024 12:25:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 026781123CA; Fri, 3 May 2024 12:25:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Kb5AWIEV"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4A8C10FBFA for ; Fri, 3 May 2024 12:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739101; x=1746275101; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=hpTbUVf2LOI/Rj8uEF3tW0YBNgueSY0Rm7UnXhSRrBk=; b=Kb5AWIEVEM/TRYm0yfqRG6S3PpgY7nFqzPpiyJb7VfRZm7+lI1iZG32+ NhdvKxgbfQKRxVHdKR6b1QVTqTrJgbCJM2mdiET9Jj2drta5UwU5cIHTS 2luM2SM0OQaNnXw+XPv3HZGQUONMu0In/9Qs7yS6KxNAWJAzU6NeN1kl6 iOxARHEbVe8+9LCM6E8F9742Zg8B4kCzO+JZVlLMgdFEU/Ub/q6lD2fY7 NIYhH0mDbR1qFH3X5LCt+qj8qzO4UxUdBcfj+XTdRdQ0rMWVhDdStx1LQ Zwo0amIwAUQ/INE5xC3dkz098+ER+lCLRPobnrFF65zxML0NCAVr1g3UL Q==; X-CSE-ConnectionGUID: 8uCOkwQ0ROC+J4mIQ+5N/g== X-CSE-MsgGUID: qB3/TZ5DTjiVQkftjpiitQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372722" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372722" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:00 -0700 X-CSE-ConnectionGUID: daHhXJCTQdWYiihlUAMytw== X-CSE-MsgGUID: mUW4Nt66TN6M+BeR6e40pg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463564" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:24:58 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:24:57 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 03/35] drm/i915/bios: Indicate which VBT structures are based on EDID Date: Fri, 3 May 2024 15:24:17 +0300 Message-ID: <20240503122449.27266-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä VBT reuses a bunch of EDID data structures. Flag those as such for clarity. I chose "bdb_edid_" as the namespace for these. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_bios.c | 28 +++--- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 95 ++++++++++--------- 2 files changed, 62 insertions(+), 61 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 661842a3c2e6..9f933508be1c 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -242,13 +242,13 @@ static bool validate_lfp_data_ptrs(const void *bdb, /* fp_timing has variable size */ if (fp_timing_size < 32 || - dvo_timing_size != sizeof(struct lvds_dvo_timing) || - panel_pnp_id_size != sizeof(struct lvds_pnp_id)) + dvo_timing_size != sizeof(struct bdb_edid_dtd) || + panel_pnp_id_size != sizeof(struct bdb_edid_pnp_id)) return false; /* panel_name is not present in old VBTs */ if (panel_name_size != 0 && - panel_name_size != sizeof(struct lvds_lfp_panel_name)) + panel_name_size != sizeof(struct bdb_edid_product_name)) return false; lfp_data_size = ptrs->ptr[1].fp_timing.offset - ptrs->ptr[0].fp_timing.offset; @@ -385,8 +385,8 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, block_size = get_blocksize(block); - size = fp_timing_size + sizeof(struct lvds_dvo_timing) + - sizeof(struct lvds_pnp_id); + size = fp_timing_size + sizeof(struct bdb_edid_dtd) + + sizeof(struct bdb_edid_pnp_id); if (size * 16 > block_size) return NULL; @@ -398,10 +398,10 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, *(u16 *)(ptrs_block + 1) = sizeof(*ptrs); ptrs = ptrs_block + 3; - table_size = sizeof(struct lvds_pnp_id); + table_size = sizeof(struct bdb_edid_pnp_id); size = make_lfp_data_ptr(&ptrs->ptr[0].panel_pnp_id, table_size, size); - table_size = sizeof(struct lvds_dvo_timing); + table_size = sizeof(struct bdb_edid_dtd); size = make_lfp_data_ptr(&ptrs->ptr[0].dvo_timing, table_size, size); table_size = fp_timing_size; @@ -419,15 +419,15 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, return NULL; } - size = fp_timing_size + sizeof(struct lvds_dvo_timing) + - sizeof(struct lvds_pnp_id); + size = fp_timing_size + sizeof(struct bdb_edid_dtd) + + sizeof(struct bdb_edid_pnp_id); for (i = 1; i < 16; i++) { next_lfp_data_ptr(&ptrs->ptr[i].fp_timing, &ptrs->ptr[i-1].fp_timing, size); next_lfp_data_ptr(&ptrs->ptr[i].dvo_timing, &ptrs->ptr[i-1].dvo_timing, size); next_lfp_data_ptr(&ptrs->ptr[i].panel_pnp_id, &ptrs->ptr[i-1].panel_pnp_id, size); } - table_size = sizeof(struct lvds_lfp_panel_name); + table_size = sizeof(struct bdb_edid_product_name); if (16 * (size + table_size) <= block_size) { ptrs->panel_name.table_size = table_size; @@ -525,7 +525,7 @@ static void init_bdb_blocks(struct drm_i915_private *i915, static void fill_detail_timing_data(struct drm_i915_private *i915, struct drm_display_mode *panel_fixed_mode, - const struct lvds_dvo_timing *dvo_timing) + const struct bdb_edid_dtd *dvo_timing) { panel_fixed_mode->hdisplay = (dvo_timing->hactive_hi << 8) | dvo_timing->hactive_lo; @@ -579,7 +579,7 @@ fill_detail_timing_data(struct drm_i915_private *i915, drm_mode_set_name(panel_fixed_mode); } -static const struct lvds_dvo_timing * +static const struct bdb_edid_dtd * get_lvds_dvo_timing(const struct bdb_lvds_lfp_data *data, const struct bdb_lvds_lfp_data_ptrs *ptrs, int index) @@ -601,7 +601,7 @@ get_lvds_pnp_id(const struct bdb_lvds_lfp_data *data, int index) { /* These two are supposed to have the same layout in memory. */ - BUILD_BUG_ON(sizeof(struct lvds_pnp_id) != sizeof(struct drm_edid_product_id)); + BUILD_BUG_ON(sizeof(struct bdb_edid_pnp_id) != sizeof(struct drm_edid_product_id)); return (const void *)data + ptrs->ptr[index].panel_pnp_id.offset; } @@ -835,7 +835,7 @@ parse_lfp_panel_dtd(struct drm_i915_private *i915, const struct bdb_lvds_lfp_data *lvds_lfp_data, const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs) { - const struct lvds_dvo_timing *panel_dvo_timing; + const struct bdb_edid_dtd *panel_dvo_timing; const struct lvds_fp_timing *fp_timing; struct drm_display_mode *panel_fixed_mode; int panel_type = panel->vbt.panel_type; diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index eebb91f4d88b..7ad4d31f6437 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -39,6 +39,50 @@ #include "intel_bios.h" +/* EDID derived structures */ +struct bdb_edid_pnp_id { + u16 mfg_name; + u16 product_code; + u32 serial; + u8 mfg_week; + u8 mfg_year; +} __packed; + +struct bdb_edid_product_name { + char name[13]; +} __packed; + +struct bdb_edid_dtd { + u16 clock; /**< In 10khz */ + u8 hactive_lo; + u8 hblank_lo; + u8 hblank_hi:4; + u8 hactive_hi:4; + u8 vactive_lo; + u8 vblank_lo; + u8 vblank_hi:4; + u8 vactive_hi:4; + u8 hsync_off_lo; + u8 hsync_pulse_width_lo; + u8 vsync_pulse_width_lo:4; + u8 vsync_off_lo:4; + u8 vsync_pulse_width_hi:2; + u8 vsync_off_hi:2; + u8 hsync_pulse_width_hi:2; + u8 hsync_off_hi:2; + u8 himage_lo; + u8 vimage_lo; + u8 vimage_hi:4; + u8 himage_hi:4; + u8 h_border; + u8 v_border; + u8 rsvd1:3; + u8 digital:2; + u8 vsync_positive:1; + u8 hsync_positive:1; + u8 non_interlaced:1; +} __packed; + /** * struct vbt_header - VBT Header structure * @signature: VBT signature, always starts with "$VBT" @@ -645,39 +689,8 @@ struct bdb_sdvo_lvds_options { * Block 23 - SDVO LVDS Panel DTDs */ -struct lvds_dvo_timing { - u16 clock; /**< In 10khz */ - u8 hactive_lo; - u8 hblank_lo; - u8 hblank_hi:4; - u8 hactive_hi:4; - u8 vactive_lo; - u8 vblank_lo; - u8 vblank_hi:4; - u8 vactive_hi:4; - u8 hsync_off_lo; - u8 hsync_pulse_width_lo; - u8 vsync_pulse_width_lo:4; - u8 vsync_off_lo:4; - u8 vsync_pulse_width_hi:2; - u8 vsync_off_hi:2; - u8 hsync_pulse_width_hi:2; - u8 hsync_off_hi:2; - u8 himage_lo; - u8 vimage_lo; - u8 vimage_hi:4; - u8 himage_hi:4; - u8 h_border; - u8 v_border; - u8 rsvd1:3; - u8 digital:2; - u8 vsync_positive:1; - u8 hsync_positive:1; - u8 non_interlaced:1; -} __packed; - struct bdb_sdvo_panel_dtds { - struct lvds_dvo_timing dtds[4]; + struct bdb_edid_dtd dtds[4]; } __packed; /* @@ -828,14 +841,6 @@ struct lvds_fp_timing { u16 terminator; } __packed; -struct lvds_pnp_id { - u16 mfg_name; - u16 product_code; - u32 serial; - u8 mfg_week; - u8 mfg_year; -} __packed; - /* * For reference only. fp_timing has variable size so * the data must be accessed using the data table pointers. @@ -843,18 +848,14 @@ struct lvds_pnp_id { */ struct lvds_lfp_data_entry { struct lvds_fp_timing fp_timing; - struct lvds_dvo_timing dvo_timing; - struct lvds_pnp_id pnp_id; + struct bdb_edid_dtd dvo_timing; + struct bdb_edid_pnp_id pnp_id; } __packed; struct bdb_lvds_lfp_data { struct lvds_lfp_data_entry data[16]; } __packed; -struct lvds_lfp_panel_name { - u8 name[13]; -} __packed; - struct lvds_lfp_black_border { u8 top; /* 227+ */ u8 bottom; /* 227+ */ @@ -863,7 +864,7 @@ struct lvds_lfp_black_border { } __packed; struct bdb_lvds_lfp_data_tail { - struct lvds_lfp_panel_name panel_name[16]; /* (156-163?)+ */ + struct bdb_edid_product_name panel_name[16]; /* (156-163?)+ */ u16 scaling_enable; /* 187+ */ u8 seamless_drrs_min_refresh_rate[16]; /* 188+ */ u8 pixel_overlap_count[16]; /* 208+ */ From patchwork Fri May 3 12:24:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652692 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 EFC4FC10F16 for ; Fri, 3 May 2024 12:25:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 757D11127A9; Fri, 3 May 2024 12:25:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CUB7WtJq"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id C296F1127A9 for ; Fri, 3 May 2024 12:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739104; x=1746275104; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=SFjd0zBnEA5EZ5h7BSilFYw9tmPJ1MXZeJVWfIR5dFQ=; b=CUB7WtJqV4w433DElfJneftXwdrba6l2FUaZBs24ruA6eeKbmdkU8IS8 /Y+9S6xflBhptjHb266xGEsFVF9DnXGXbcFOsLzwigyvF+JM4EOFzc/Vd TleHX655gjgPKd3gHsgq/sWni/HiXN9zxKFEOoAkKvAE4x3W/Z0odVuar FF8bdZw1cIRaSOBJNRuSI+E51EWtsUv/7L4oytsXkRiS/WZiLnvKs7kfY +5TBtPtoZOWbPoPQy6Nu+KHvsS0OwE//Y+B3M3KEM9IeX2x2XgOSYkWqC NEM2bYIpMU1vGkRWJNBSJLb78YOnr681JnBMs6aBCXrAo/MQq4FdoRJtY Q==; X-CSE-ConnectionGUID: N+UlkRfhS7K1fW5bHXQN+Q== X-CSE-MsgGUID: NSRTND1xRyuU1vENLjeOcA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372726" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372726" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:03 -0700 X-CSE-ConnectionGUID: 9BwsmtupTNmIuY1UMC81Qg== X-CSE-MsgGUID: HnWa56GaQpWMELXY+nvwcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463585" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:01 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:00 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 04/35] drm/i915/bios: Get rid of "LVDS" from all LFP data stuff Date: Fri, 3 May 2024 15:24:18 +0300 Message-ID: <20240503122449.27266-5-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä The LFP data applies to all kinds of display interfaces, so stop calling things by the "LVDS" name. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_bios.c | 178 +++++++++--------- .../drm/i915/display/intel_display_types.h | 2 +- drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +- drivers/gpu/drm/i915/display/intel_panel.c | 2 +- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 50 ++--- 5 files changed, 117 insertions(+), 117 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 9f933508be1c..cde981c4b8b8 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -174,18 +174,18 @@ static const struct { .min_size = sizeof(struct bdb_sdvo_panel_dtds), }, { .section_id = BDB_EDP, .min_size = sizeof(struct bdb_edp), }, - { .section_id = BDB_LVDS_OPTIONS, - .min_size = sizeof(struct bdb_lvds_options), }, + { .section_id = BDB_LFP_OPTIONS, + .min_size = sizeof(struct bdb_lfp_options), }, /* - * BDB_LVDS_LFP_DATA depends on BDB_LVDS_LFP_DATA_PTRS, + * BDB_LFP_DATA depends on BDB_LFP_DATA_PTRS, * so keep the two ordered. */ - { .section_id = BDB_LVDS_LFP_DATA_PTRS, - .min_size = sizeof(struct bdb_lvds_lfp_data_ptrs), }, - { .section_id = BDB_LVDS_LFP_DATA, + { .section_id = BDB_LFP_DATA_PTRS, + .min_size = sizeof(struct bdb_lfp_data_ptrs), }, + { .section_id = BDB_LFP_DATA, .min_size = 0, /* special case */ }, - { .section_id = BDB_LVDS_BACKLIGHT, - .min_size = sizeof(struct bdb_lfp_backlight_data), }, + { .section_id = BDB_LFP_BACKLIGHT, + .min_size = sizeof(struct bdb_lfp_backlight), }, { .section_id = BDB_LFP_POWER, .min_size = sizeof(struct bdb_lfp_power), }, { .section_id = BDB_MIPI_CONFIG, @@ -200,30 +200,30 @@ static const struct { static size_t lfp_data_min_size(struct drm_i915_private *i915) { - const struct bdb_lvds_lfp_data_ptrs *ptrs; + const struct bdb_lfp_data_ptrs *ptrs; size_t size; - ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS); + ptrs = bdb_find_section(i915, BDB_LFP_DATA_PTRS); if (!ptrs) return 0; - size = sizeof(struct bdb_lvds_lfp_data); + size = sizeof(struct bdb_lfp_data); if (ptrs->panel_name.table_size) size = max(size, ptrs->panel_name.offset + - sizeof(struct bdb_lvds_lfp_data_tail)); + sizeof(struct bdb_lfp_data_tail)); return size; } static bool validate_lfp_data_ptrs(const void *bdb, - const struct bdb_lvds_lfp_data_ptrs *ptrs) + const struct bdb_lfp_data_ptrs *ptrs) { int fp_timing_size, dvo_timing_size, panel_pnp_id_size, panel_name_size; int data_block_size, lfp_data_size; const void *data_block; int i; - data_block = find_raw_section(bdb, BDB_LVDS_LFP_DATA); + data_block = find_raw_section(bdb, BDB_LFP_DATA); if (!data_block) return false; @@ -232,7 +232,7 @@ static bool validate_lfp_data_ptrs(const void *bdb, return false; /* always 3 indicating the presence of fp_timing+dvo_timing+panel_pnp_id */ - if (ptrs->lvds_entries != 3) + if (ptrs->num_entries != 3) return false; fp_timing_size = ptrs->ptr[0].fp_timing.table_size; @@ -311,11 +311,11 @@ static bool validate_lfp_data_ptrs(const void *bdb, /* make the data table offsets relative to the data block */ static bool fixup_lfp_data_ptrs(const void *bdb, void *ptrs_block) { - struct bdb_lvds_lfp_data_ptrs *ptrs = ptrs_block; + struct bdb_lfp_data_ptrs *ptrs = ptrs_block; u32 offset; int i; - offset = raw_block_offset(bdb, BDB_LVDS_LFP_DATA); + offset = raw_block_offset(bdb, BDB_LFP_DATA); for (i = 0; i < 16; i++) { if (ptrs->ptr[i].fp_timing.offset < offset || @@ -338,7 +338,7 @@ static bool fixup_lfp_data_ptrs(const void *bdb, void *ptrs_block) return validate_lfp_data_ptrs(bdb, ptrs); } -static int make_lfp_data_ptr(struct lvds_lfp_data_ptr_table *table, +static int make_lfp_data_ptr(struct lfp_data_ptr_table *table, int table_size, int total_size) { if (total_size < table_size) @@ -350,8 +350,8 @@ static int make_lfp_data_ptr(struct lvds_lfp_data_ptr_table *table, return total_size - table_size; } -static void next_lfp_data_ptr(struct lvds_lfp_data_ptr_table *next, - const struct lvds_lfp_data_ptr_table *prev, +static void next_lfp_data_ptr(struct lfp_data_ptr_table *next, + const struct lfp_data_ptr_table *prev, int size) { next->table_size = prev->table_size; @@ -362,7 +362,7 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, const void *bdb) { int i, size, table_size, block_size, offset, fp_timing_size; - struct bdb_lvds_lfp_data_ptrs *ptrs; + struct bdb_lfp_data_ptrs *ptrs; const void *block; void *ptrs_block; @@ -377,7 +377,7 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, fp_timing_size = 38; - block = find_raw_section(bdb, BDB_LVDS_LFP_DATA); + block = find_raw_section(bdb, BDB_LFP_DATA); if (!block) return NULL; @@ -394,7 +394,7 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, if (!ptrs_block) return NULL; - *(u8 *)(ptrs_block + 0) = BDB_LVDS_LFP_DATA_PTRS; + *(u8 *)(ptrs_block + 0) = BDB_LFP_DATA_PTRS; *(u16 *)(ptrs_block + 1) = sizeof(*ptrs); ptrs = ptrs_block + 3; @@ -408,13 +408,13 @@ static void *generate_lfp_data_ptrs(struct drm_i915_private *i915, size = make_lfp_data_ptr(&ptrs->ptr[0].fp_timing, table_size, size); if (ptrs->ptr[0].fp_timing.table_size) - ptrs->lvds_entries++; + ptrs->num_entries++; if (ptrs->ptr[0].dvo_timing.table_size) - ptrs->lvds_entries++; + ptrs->num_entries++; if (ptrs->ptr[0].panel_pnp_id.table_size) - ptrs->lvds_entries++; + ptrs->num_entries++; - if (size != 0 || ptrs->lvds_entries != 3) { + if (size != 0 || ptrs->num_entries != 3) { kfree(ptrs_block); return NULL; } @@ -461,7 +461,7 @@ init_bdb_block(struct drm_i915_private *i915, block = find_raw_section(bdb, section_id); /* Modern VBTs lack the LFP data table pointers block, make one up */ - if (!block && section_id == BDB_LVDS_LFP_DATA_PTRS) { + if (!block && section_id == BDB_LFP_DATA_PTRS) { temp_block = generate_lfp_data_ptrs(i915, bdb); if (temp_block) block = temp_block + 3; @@ -496,7 +496,7 @@ init_bdb_block(struct drm_i915_private *i915, drm_dbg_kms(&i915->drm, "Found BDB block %d (size %zu, min size %zu)\n", section_id, block_size, min_size); - if (section_id == BDB_LVDS_LFP_DATA_PTRS && + if (section_id == BDB_LFP_DATA_PTRS && !fixup_lfp_data_ptrs(bdb, entry->data + 3)) { drm_err(&i915->drm, "VBT has malformed LFP data table pointers\n"); kfree(entry); @@ -515,7 +515,7 @@ static void init_bdb_blocks(struct drm_i915_private *i915, enum bdb_block_id section_id = bdb_blocks[i].section_id; size_t min_size = bdb_blocks[i].min_size; - if (section_id == BDB_LVDS_LFP_DATA) + if (section_id == BDB_LFP_DATA) min_size = lfp_data_min_size(i915); init_bdb_block(i915, bdb, section_id, min_size); @@ -580,25 +580,25 @@ fill_detail_timing_data(struct drm_i915_private *i915, } static const struct bdb_edid_dtd * -get_lvds_dvo_timing(const struct bdb_lvds_lfp_data *data, - const struct bdb_lvds_lfp_data_ptrs *ptrs, - int index) -{ - return (const void *)data + ptrs->ptr[index].dvo_timing.offset; -} - -static const struct lvds_fp_timing * -get_lvds_fp_timing(const struct bdb_lvds_lfp_data *data, - const struct bdb_lvds_lfp_data_ptrs *ptrs, +get_lfp_dvo_timing(const struct bdb_lfp_data *data, + const struct bdb_lfp_data_ptrs *ptrs, int index) +{ + return (const void *)data + ptrs->ptr[index].dvo_timing.offset; +} + +static const struct fp_timing * +get_lfp_fp_timing(const struct bdb_lfp_data *data, + const struct bdb_lfp_data_ptrs *ptrs, + int index) { return (const void *)data + ptrs->ptr[index].fp_timing.offset; } static const struct drm_edid_product_id * -get_lvds_pnp_id(const struct bdb_lvds_lfp_data *data, - const struct bdb_lvds_lfp_data_ptrs *ptrs, - int index) +get_lfp_pnp_id(const struct bdb_lfp_data *data, + const struct bdb_lfp_data_ptrs *ptrs, + int index) { /* These two are supposed to have the same layout in memory. */ BUILD_BUG_ON(sizeof(struct bdb_edid_pnp_id) != sizeof(struct drm_edid_product_id)); @@ -606,9 +606,9 @@ get_lvds_pnp_id(const struct bdb_lvds_lfp_data *data, return (const void *)data + ptrs->ptr[index].panel_pnp_id.offset; } -static const struct bdb_lvds_lfp_data_tail * -get_lfp_data_tail(const struct bdb_lvds_lfp_data *data, - const struct bdb_lvds_lfp_data_ptrs *ptrs) +static const struct bdb_lfp_data_tail * +get_lfp_data_tail(const struct bdb_lfp_data *data, + const struct bdb_lfp_data_ptrs *ptrs) { if (ptrs->panel_name.table_size) return (const void *)data + ptrs->panel_name.offset; @@ -627,33 +627,33 @@ static int vbt_get_panel_type(struct drm_i915_private *i915, const struct intel_bios_encoder_data *devdata, const struct drm_edid *drm_edid, bool use_fallback) { - const struct bdb_lvds_options *lvds_options; + const struct bdb_lfp_options *lfp_options; - lvds_options = bdb_find_section(i915, BDB_LVDS_OPTIONS); - if (!lvds_options) + lfp_options = bdb_find_section(i915, BDB_LFP_OPTIONS); + if (!lfp_options) return -1; - if (lvds_options->panel_type > 0xf && - lvds_options->panel_type != 0xff) { + if (lfp_options->panel_type > 0xf && + lfp_options->panel_type != 0xff) { drm_dbg_kms(&i915->drm, "Invalid VBT panel type 0x%x\n", - lvds_options->panel_type); + lfp_options->panel_type); return -1; } if (devdata && devdata->child.handle == DEVICE_HANDLE_LFP2) - return lvds_options->panel_type2; + return lfp_options->panel_type2; drm_WARN_ON(&i915->drm, devdata && devdata->child.handle != DEVICE_HANDLE_LFP1); - return lvds_options->panel_type; + return lfp_options->panel_type; } static int pnpid_get_panel_type(struct drm_i915_private *i915, const struct intel_bios_encoder_data *devdata, const struct drm_edid *drm_edid, bool use_fallback) { - const struct bdb_lvds_lfp_data *data; - const struct bdb_lvds_lfp_data_ptrs *ptrs; + const struct bdb_lfp_data *data; + const struct bdb_lfp_data_ptrs *ptrs; struct drm_edid_product_id product_id, product_id_nodate; struct drm_printer p; int i, best = -1; @@ -670,17 +670,17 @@ static int pnpid_get_panel_type(struct drm_i915_private *i915, p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, "EDID"); drm_edid_print_product_id(&p, &product_id, true); - ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS); + ptrs = bdb_find_section(i915, BDB_LFP_DATA_PTRS); if (!ptrs) return -1; - data = bdb_find_section(i915, BDB_LVDS_LFP_DATA); + data = bdb_find_section(i915, BDB_LFP_DATA); if (!data) return -1; for (i = 0; i < 16; i++) { const struct drm_edid_product_id *vbt_id = - get_lvds_pnp_id(data, ptrs, i); + get_lfp_pnp_id(data, ptrs, i); /* full match? */ if (!memcmp(vbt_id, &product_id, sizeof(*vbt_id))) @@ -786,25 +786,25 @@ static void parse_panel_options(struct drm_i915_private *i915, struct intel_panel *panel) { - const struct bdb_lvds_options *lvds_options; + const struct bdb_lfp_options *lfp_options; int panel_type = panel->vbt.panel_type; int drrs_mode; - lvds_options = bdb_find_section(i915, BDB_LVDS_OPTIONS); - if (!lvds_options) + lfp_options = bdb_find_section(i915, BDB_LFP_OPTIONS); + if (!lfp_options) return; - panel->vbt.lvds_dither = lvds_options->pixel_dither; + panel->vbt.lvds_dither = lfp_options->pixel_dither; /* * Empirical evidence indicates the block size can be * either 4,14,16,24+ bytes. For older VBTs no clear * relationship between the block size vs. BDB version. */ - if (get_blocksize(lvds_options) < 16) + if (get_blocksize(lfp_options) < 16) return; - drrs_mode = panel_bits(lvds_options->dps_panel_type_bits, + drrs_mode = panel_bits(lfp_options->dps_panel_type_bits, panel_type, 2); /* * VBT has static DRRS = 0 and seamless DRRS = 2. @@ -832,17 +832,17 @@ parse_panel_options(struct drm_i915_private *i915, static void parse_lfp_panel_dtd(struct drm_i915_private *i915, struct intel_panel *panel, - const struct bdb_lvds_lfp_data *lvds_lfp_data, - const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs) + const struct bdb_lfp_data *lfp_data, + const struct bdb_lfp_data_ptrs *lfp_data_ptrs) { const struct bdb_edid_dtd *panel_dvo_timing; - const struct lvds_fp_timing *fp_timing; + const struct fp_timing *fp_timing; struct drm_display_mode *panel_fixed_mode; int panel_type = panel->vbt.panel_type; - panel_dvo_timing = get_lvds_dvo_timing(lvds_lfp_data, - lvds_lfp_data_ptrs, - panel_type); + panel_dvo_timing = get_lfp_dvo_timing(lfp_data, + lfp_data_ptrs, + panel_type); panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); if (!panel_fixed_mode) @@ -850,15 +850,15 @@ parse_lfp_panel_dtd(struct drm_i915_private *i915, fill_detail_timing_data(i915, panel_fixed_mode, panel_dvo_timing); - panel->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; + panel->vbt.lfp_vbt_mode = panel_fixed_mode; drm_dbg_kms(&i915->drm, "Found panel mode in BIOS VBT legacy lfp table: " DRM_MODE_FMT "\n", DRM_MODE_ARG(panel_fixed_mode)); - fp_timing = get_lvds_fp_timing(lvds_lfp_data, - lvds_lfp_data_ptrs, - panel_type); + fp_timing = get_lfp_fp_timing(lfp_data, + lfp_data_ptrs, + panel_type); /* check the resolution, just to be sure */ if (fp_timing->x_res == panel_fixed_mode->hdisplay && @@ -874,25 +874,25 @@ static void parse_lfp_data(struct drm_i915_private *i915, struct intel_panel *panel) { - const struct bdb_lvds_lfp_data *data; - const struct bdb_lvds_lfp_data_tail *tail; - const struct bdb_lvds_lfp_data_ptrs *ptrs; + const struct bdb_lfp_data *data; + const struct bdb_lfp_data_tail *tail; + const struct bdb_lfp_data_ptrs *ptrs; const struct drm_edid_product_id *pnp_id; struct drm_printer p; int panel_type = panel->vbt.panel_type; - ptrs = bdb_find_section(i915, BDB_LVDS_LFP_DATA_PTRS); + ptrs = bdb_find_section(i915, BDB_LFP_DATA_PTRS); if (!ptrs) return; - data = bdb_find_section(i915, BDB_LVDS_LFP_DATA); + data = bdb_find_section(i915, BDB_LFP_DATA); if (!data) return; - if (!panel->vbt.lfp_lvds_vbt_mode) + if (!panel->vbt.lfp_vbt_mode) parse_lfp_panel_dtd(i915, panel, data, ptrs); - pnp_id = get_lvds_pnp_id(data, ptrs, panel_type); + pnp_id = get_lfp_pnp_id(data, ptrs, panel_type); p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, "Panel"); drm_edid_print_product_id(&p, pnp_id, false); @@ -1001,19 +1001,19 @@ parse_generic_dtd(struct drm_i915_private *i915, "Found panel mode in BIOS VBT generic dtd table: " DRM_MODE_FMT "\n", DRM_MODE_ARG(panel_fixed_mode)); - panel->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; + panel->vbt.lfp_vbt_mode = panel_fixed_mode; } static void parse_lfp_backlight(struct drm_i915_private *i915, struct intel_panel *panel) { - const struct bdb_lfp_backlight_data *backlight_data; + const struct bdb_lfp_backlight *backlight_data; const struct lfp_backlight_data_entry *entry; int panel_type = panel->vbt.panel_type; u16 level; - backlight_data = bdb_find_section(i915, BDB_LVDS_BACKLIGHT); + backlight_data = bdb_find_section(i915, BDB_LFP_BACKLIGHT); if (!backlight_data) return; @@ -1040,7 +1040,7 @@ parse_lfp_backlight(struct drm_i915_private *i915, size_t exp_size; if (i915->display.vbt.version >= 236) - exp_size = sizeof(struct bdb_lfp_backlight_data); + exp_size = sizeof(struct bdb_lfp_backlight); else if (i915->display.vbt.version >= 234) exp_size = EXP_BDB_LFP_BL_DATA_SIZE_REV_234; else @@ -1688,7 +1688,7 @@ parse_mipi_config(struct drm_i915_private *i915, panel->vbt.dsi.panel_id = MIPI_DSI_UNDEFINED_PANEL_ID; /* Block #40 is already parsed and panel_fixed_mode is - * stored in i915->lfp_lvds_vbt_mode + * stored in i915->lfp_vbt_mode * resuse this when needed */ @@ -3318,8 +3318,8 @@ void intel_bios_fini_panel(struct intel_panel *panel) { kfree(panel->vbt.sdvo_lvds_vbt_mode); panel->vbt.sdvo_lvds_vbt_mode = NULL; - kfree(panel->vbt.lfp_lvds_vbt_mode); - panel->vbt.lfp_lvds_vbt_mode = NULL; + kfree(panel->vbt.lfp_vbt_mode); + panel->vbt.lfp_vbt_mode = NULL; kfree(panel->vbt.dsi.data); panel->vbt.dsi.data = NULL; kfree(panel->vbt.dsi.pps); diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 00eba3fbcdc6..a06a154d587b 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -305,7 +305,7 @@ enum drrs_type { }; struct intel_vbt_panel_data { - struct drm_display_mode *lfp_lvds_vbt_mode; /* if any */ + struct drm_display_mode *lfp_vbt_mode; /* if any */ struct drm_display_mode *sdvo_lvds_vbt_mode; /* if any */ /* Feature bits */ diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index a5d7fc8418c9..cdc9dadb578d 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -751,7 +751,7 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id) struct intel_connector *connector = intel_dsi->attached_connector; struct mipi_config *mipi_config = connector->panel.vbt.dsi.config; struct mipi_pps_data *pps = connector->panel.vbt.dsi.pps; - struct drm_display_mode *mode = connector->panel.vbt.lfp_lvds_vbt_mode; + struct drm_display_mode *mode = connector->panel.vbt.lfp_vbt_mode; u16 burst_mode_ratio; enum port port; diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c index 6f4ff6a89c32..71454ddef20f 100644 --- a/drivers/gpu/drm/i915/display/intel_panel.c +++ b/drivers/gpu/drm/i915/display/intel_panel.c @@ -352,7 +352,7 @@ void intel_panel_add_vbt_lfp_fixed_mode(struct intel_connector *connector) struct drm_i915_private *i915 = to_i915(connector->base.dev); const struct drm_display_mode *mode; - mode = connector->panel.vbt.lfp_lvds_vbt_mode; + mode = connector->panel.vbt.lfp_vbt_mode; if (!mode) return; diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 7ad4d31f6437..35c844b569a3 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -165,10 +165,10 @@ enum bdb_block_id { BDB_SDVO_LVDS_POWER_SEQ = 25, BDB_TV_OPTIONS = 26, BDB_EDP = 27, - BDB_LVDS_OPTIONS = 40, - BDB_LVDS_LFP_DATA_PTRS = 41, - BDB_LVDS_LFP_DATA = 42, - BDB_LVDS_BACKLIGHT = 43, + BDB_LFP_OPTIONS = 40, + BDB_LFP_DATA_PTRS = 41, + BDB_LFP_DATA = 42, + BDB_LFP_BACKLIGHT = 43, BDB_LFP_POWER = 44, BDB_MIPI_CONFIG = 52, BDB_MIPI_SEQUENCE = 53, @@ -769,7 +769,7 @@ struct bdb_edp { * Block 40 - LFP Data Block */ -struct bdb_lvds_options { +struct bdb_lfp_options { u8 panel_type; u8 panel_type2; /* 212+ */ /* LVDS capabilities, stored in a dword */ @@ -802,22 +802,22 @@ struct bdb_lvds_options { /* * Block 41 - LFP Data Table Pointers */ -struct lvds_lfp_data_ptr_table { +struct lfp_data_ptr_table { u16 offset; /* offsets are from start of bdb */ u8 table_size; } __packed; /* LFP pointer table contains entries to the struct below */ -struct lvds_lfp_data_ptr { - struct lvds_lfp_data_ptr_table fp_timing; - struct lvds_lfp_data_ptr_table dvo_timing; - struct lvds_lfp_data_ptr_table panel_pnp_id; +struct lfp_data_ptr { + struct lfp_data_ptr_table fp_timing; + struct lfp_data_ptr_table dvo_timing; + struct lfp_data_ptr_table panel_pnp_id; } __packed; -struct bdb_lvds_lfp_data_ptrs { - u8 lvds_entries; - struct lvds_lfp_data_ptr ptr[16]; - struct lvds_lfp_data_ptr_table panel_name; /* (156-163?)+ */ +struct bdb_lfp_data_ptrs { + u8 num_entries; + struct lfp_data_ptr ptr[16]; + struct lfp_data_ptr_table panel_name; /* (156-163?)+ */ } __packed; /* @@ -825,7 +825,7 @@ struct bdb_lvds_lfp_data_ptrs { */ /* LFP data has 3 blocks per entry */ -struct lvds_fp_timing { +struct fp_timing { u16 x_res; u16 y_res; u32 lvds_reg; @@ -846,29 +846,29 @@ struct lvds_fp_timing { * the data must be accessed using the data table pointers. * Do not use this directly! */ -struct lvds_lfp_data_entry { - struct lvds_fp_timing fp_timing; +struct lfp_data_entry { + struct fp_timing fp_timing; struct bdb_edid_dtd dvo_timing; struct bdb_edid_pnp_id pnp_id; } __packed; -struct bdb_lvds_lfp_data { - struct lvds_lfp_data_entry data[16]; +struct bdb_lfp_data { + struct lfp_data_entry data[16]; } __packed; -struct lvds_lfp_black_border { +struct lfp_black_border { u8 top; /* 227+ */ u8 bottom; /* 227+ */ u8 left; /* 238+ */ u8 right; /* 238+ */ } __packed; -struct bdb_lvds_lfp_data_tail { +struct bdb_lfp_data_tail { struct bdb_edid_product_name panel_name[16]; /* (156-163?)+ */ u16 scaling_enable; /* 187+ */ u8 seamless_drrs_min_refresh_rate[16]; /* 188+ */ u8 pixel_overlap_count[16]; /* 208+ */ - struct lvds_lfp_black_border black_border[16]; /* 227+ */ + struct lfp_black_border black_border[16]; /* 227+ */ u16 dual_lfp_port_sync_enable; /* 231+ */ u16 gpu_dithering_for_banding_artifacts; /* 245+ */ } __packed; @@ -902,11 +902,11 @@ struct lfp_brightness_level { } __packed; #define EXP_BDB_LFP_BL_DATA_SIZE_REV_191 \ - offsetof(struct bdb_lfp_backlight_data, brightness_level) + offsetof(struct bdb_lfp_backlight, brightness_level) #define EXP_BDB_LFP_BL_DATA_SIZE_REV_234 \ - offsetof(struct bdb_lfp_backlight_data, brightness_precision_bits) + offsetof(struct bdb_lfp_backlight, brightness_precision_bits) -struct bdb_lfp_backlight_data { +struct bdb_lfp_backlight { u8 entry_size; struct lfp_backlight_data_entry data[16]; u8 level[16]; /* 162-233 */ From patchwork Fri May 3 12:24:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652693 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 5D71CC4345F for ; Fri, 3 May 2024 12:25:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B57931128A2; Fri, 3 May 2024 12:25:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="edd0CTH2"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id AAB951128A2 for ; Fri, 3 May 2024 12:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739107; x=1746275107; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=mCLoZLMX6sAbiBX6PA/PvbcwdlBg6leNpJbeI+/AkEo=; b=edd0CTH24r907ZY+KQXGLBg+hSXAuiGgpCyxdIQDdtw6/k93KzOactCJ JITD64RqlLY1wqNMcRvYPDWs+f3M0BwN5hA5aHxrUHOXCpnlLarxM9teX tetnOvoDWf221jmh3/bR3O4wUORa5lDUtYcEB6qHAf2BP3Ik5FFYaUvUH VKZvF/L+y/s6OFJ9Q3xEddbNT0hVkZnIfU0gbOEe06cM2srqNJkKWUTmS 4FgTMLjA8YsH3AkxokPxtXzXmTlMoCIA+YKXh6zRAn5ecknsUWwqdhM2C O1004aSv/sxd+LzXcGPq+Efg/I62B+INOCN+IbcBDDRaYnFKiEZocOpXR w==; X-CSE-ConnectionGUID: CFtGYSMRQ6Ou2DBbFbxeyw== X-CSE-MsgGUID: de94wy5rTIWC76j8BXk+Iw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372729" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372729" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:06 -0700 X-CSE-ConnectionGUID: zAnX+GxVSRCqGlrAQQvVog== X-CSE-MsgGUID: d1YQbJZHQl6AXP2qbePfdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463619" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:04 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:03 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 05/35] drm/i915/bios: Rename SDVO DTD blocks a bit Date: Fri, 3 May 2024 15:24:19 +0300 Message-ID: <20240503122449.27266-6-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä The SDVO LVDS blocks are specifically about LVDS, so stick to naming that reflects that. This also makes the names match the spec. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_bios.c | 23 +++++++++---------- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 +++++----- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index cde981c4b8b8..29873b972968 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -170,8 +170,8 @@ static const struct { .min_size = sizeof(struct bdb_driver_features), }, { .section_id = BDB_SDVO_LVDS_OPTIONS, .min_size = sizeof(struct bdb_sdvo_lvds_options), }, - { .section_id = BDB_SDVO_PANEL_DTDS, - .min_size = sizeof(struct bdb_sdvo_panel_dtds), }, + { .section_id = BDB_SDVO_LVDS_DTD, + .min_size = sizeof(struct bdb_sdvo_lvds_dtd), }, { .section_id = BDB_EDP, .min_size = sizeof(struct bdb_edp), }, { .section_id = BDB_LFP_OPTIONS, @@ -1102,19 +1102,18 @@ parse_lfp_backlight(struct drm_i915_private *i915, panel->vbt.backlight.controller); } -/* Try to find sdvo panel data */ static void -parse_sdvo_panel_data(struct drm_i915_private *i915, - struct intel_panel *panel) +parse_sdvo_lvds_data(struct drm_i915_private *i915, + struct intel_panel *panel) { - const struct bdb_sdvo_panel_dtds *dtds; + const struct bdb_sdvo_lvds_dtd *dtd; struct drm_display_mode *panel_fixed_mode; int index; index = i915->display.params.vbt_sdvo_panel_type; if (index == -2) { drm_dbg_kms(&i915->drm, - "Ignore SDVO panel mode from BIOS VBT tables.\n"); + "Ignore SDVO LVDS mode from BIOS VBT tables.\n"); return; } @@ -1128,20 +1127,20 @@ parse_sdvo_panel_data(struct drm_i915_private *i915, index = sdvo_lvds_options->panel_type; } - dtds = bdb_find_section(i915, BDB_SDVO_PANEL_DTDS); - if (!dtds) + dtd = bdb_find_section(i915, BDB_SDVO_LVDS_DTD); + if (!dtd) return; panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); if (!panel_fixed_mode) return; - fill_detail_timing_data(i915, panel_fixed_mode, &dtds->dtds[index]); + fill_detail_timing_data(i915, panel_fixed_mode, &dtd->dtd[index]); panel->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode; drm_dbg_kms(&i915->drm, - "Found SDVO panel mode in BIOS VBT tables: " DRM_MODE_FMT "\n", + "Found SDVO LVDS mode in BIOS VBT tables: " DRM_MODE_FMT "\n", DRM_MODE_ARG(panel_fixed_mode)); } @@ -3269,7 +3268,7 @@ static void intel_bios_init_panel(struct drm_i915_private *i915, parse_generic_dtd(i915, panel); parse_lfp_data(i915, panel); parse_lfp_backlight(i915, panel); - parse_sdvo_panel_data(i915, panel); + parse_sdvo_lvds_data(i915, panel); parse_panel_driver_features(i915, panel); parse_power_conservation_features(i915, panel); parse_edp(i915, panel); diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 35c844b569a3..d090480d82eb 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -160,9 +160,9 @@ enum bdb_block_id { BDB_OEM_CUSTOM = 20, BDB_EFP_LIST = 21, /* workarounds for VGA hsync/vsync */ BDB_SDVO_LVDS_OPTIONS = 22, - BDB_SDVO_PANEL_DTDS = 23, - BDB_SDVO_LVDS_PNP_IDS = 24, - BDB_SDVO_LVDS_POWER_SEQ = 25, + BDB_SDVO_LVDS_DTD = 23, + BDB_SDVO_LVDS_PNP_ID = 24, + BDB_SDVO_LVDS_PPS = 25, BDB_TV_OPTIONS = 26, BDB_EDP = 27, BDB_LFP_OPTIONS = 40, @@ -686,11 +686,11 @@ struct bdb_sdvo_lvds_options { } __packed; /* - * Block 23 - SDVO LVDS Panel DTDs + * Block 23 - SDVO LVDS DTD */ -struct bdb_sdvo_panel_dtds { - struct bdb_edid_dtd dtds[4]; +struct bdb_sdvo_lvds_dtd { + struct bdb_edid_dtd dtd[4]; } __packed; /* From patchwork Fri May 3 12:24:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652694 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 56F15C25B5C for ; Fri, 3 May 2024 12:25:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFC381128A6; Fri, 3 May 2024 12:25:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="nFyLHnFb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7DD3B1128A6 for ; Fri, 3 May 2024 12:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739109; x=1746275109; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=a5dQbO4bfDDnuI4oPOnhNcAscdMXkPfmpVCFgKUAJYQ=; b=nFyLHnFbsHNXv/+eCFi+8HM17xosbYTLksmakwNO3mJGtoBHqs/6s3lM L0ZtGWVLn2EaHtUIH5fJFNcSRye77H0zNpDg6ghx4KTKmXSzVI9f21wT8 /vuWX8FoRM5lodL4NiXNamsTJZOS56qE1E3xC7sv6pxLzSySZnoXUkx5a m4KO8iwACet1HKVZy27C/XMMHMP0u0MU+lJizivi7k4+z8uBmnBxCqy0m DV2XxBjgCLUImDB+KV/Yy6yLiyX0QOKtMj07NvwYunq4YFpH2Fpf2ymNA DOdbfmHdaf1PEj5Dcawjb/I3XG7AKnVLFjlSPS2/frJJVeEG4nrBBIZTZ w==; X-CSE-ConnectionGUID: zm0afvScRHGC0DqquwmbAQ== X-CSE-MsgGUID: 4hCT1OcWQNmS7XBIXtwhMg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372732" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372732" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:09 -0700 X-CSE-ConnectionGUID: N5YpCkMET2qPi6NLAMhMVg== X-CSE-MsgGUID: LCxDXUtvQs+InmkGnZ4LvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463628" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:07 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:06 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 06/35] drm/i915/bios: Define "TV" child device handle Date: Fri, 3 May 2024 15:24:20 +0300 Message-ID: <20240503122449.27266-7-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Child device 0x2 used to be "TV" until redefined to mean EFP5 in version 215. Add a define for the old meaning as well. Technically it was probably deprecated a lot before version 215 since native TV encoders were last seen on CTG, and SDVO was fully gone by HSW. So something like "???-164" might also be a reasonable way to document this, but no real harm in saying "???-214" since nothing else presumably occupied that bit in the meantime. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index d090480d82eb..c7c7b47baa73 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -242,6 +242,7 @@ struct bdb_general_features { /* Device handle */ #define DEVICE_HANDLE_CRT 0x0001 +#define DEVICE_HANDLE_TV 0x0002 /* ???-214 */ #define DEVICE_HANDLE_EFP1 0x0004 #define DEVICE_HANDLE_EFP2 0x0040 #define DEVICE_HANDLE_EFP3 0x0020 From patchwork Fri May 3 12:24:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652695 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 90FBAC4345F for ; Fri, 3 May 2024 12:25:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDEB41128AF; Fri, 3 May 2024 12:25:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lGY/6uUF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FA7B1128AF for ; Fri, 3 May 2024 12:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739112; x=1746275112; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=V8bwKdR5V3BSXMRiyvhSbTmdbW+imXY4v9V5bl1rE1g=; b=lGY/6uUFsnoWfNAQGUX40aqPU6SXq0YpAb26lqMgwUPv921Kg5qwyUgD o326MJ+lfmEtmIDxl5uhCNvxYgWFhaxptQUI00ir0d9tlGRnXaa2nsqP5 +GnlElvPjsRI+lIXJokiZ9aM636ynjW26Qql0baMO/hUezfWe5pjxYHcb ooM3eF9F0FZ2oM9Pzm4VxwQnAOvW+djSlHtJydKaetCMspCiCXF2hMdR8 +FlE1TAT0CgVy0mpflPSHV+Q+V9dos96fjj2/kWIyW+BoevYgSreND/Ej LoRy8fsjRzfdEFW77iO6kp1g73PVQEeotX4QamTxf2QBjcmC8WAaMrqrt A==; X-CSE-ConnectionGUID: rMJxpYMYT5iYhsYQG4atLw== X-CSE-MsgGUID: rFBD35sjRqqzYKpcjsdzDQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372740" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372740" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:12 -0700 X-CSE-ConnectionGUID: X6/tHFskQjakcNWZ6KetDg== X-CSE-MsgGUID: DcMeBzXwTyOHaEQNAGOWMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463647" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:10 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:09 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 07/35] drm/i915/bios: Flag "VBIOS only" VBT data blocks Date: Fri, 3 May 2024 15:24:21 +0300 Message-ID: <20240503122449.27266-8-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Several data blocks are mean to be consumbed by VBIOS only. Flag them as such. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index c7c7b47baa73..0533025d133b 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -144,15 +144,15 @@ enum bdb_block_id { BDB_OLD_TOGGLE_LIST = 3, BDB_MODE_SUPPORT_LIST = 4, BDB_GENERIC_MODE_TABLE = 5, - BDB_EXT_MMIO_REGS = 6, - BDB_SWF_IO = 7, - BDB_SWF_MMIO = 8, + BDB_EXT_MMIO_REGS = 6, /* VBIOS only */ + BDB_SWF_IO = 7, /* VBIOS only */ + BDB_SWF_MMIO = 8, /* VBIOS only */ BDB_PSR = 9, BDB_MODE_REMOVAL_TABLE = 10, BDB_CHILD_DEVICE_TABLE = 11, BDB_DRIVER_FEATURES = 12, BDB_DRIVER_PERSISTENCE = 13, - BDB_EXT_TABLE_PTRS = 14, + BDB_EXT_TABLE_PTRS = 14, /* VBIOS only */ BDB_DOT_CLOCK_OVERRIDE = 15, BDB_DISPLAY_SELECT = 16, BDB_DRIVER_ROTATION = 18, @@ -174,7 +174,7 @@ enum bdb_block_id { BDB_MIPI_SEQUENCE = 53, BDB_COMPRESSION_PARAMETERS = 56, BDB_GENERIC_DTD = 58, - BDB_SKIP = 254, /* VBIOS private block, ignore */ + BDB_SKIP = 254, /* VBIOS only */ }; /* From patchwork Fri May 3 12:24:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652696 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 C1F3AC4345F for ; Fri, 3 May 2024 12:25:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03ED91128C2; Fri, 3 May 2024 12:25:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KQweQNg8"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id E0EAA1128B9 for ; Fri, 3 May 2024 12:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739115; x=1746275115; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=KT7oWc+DuF6oYtVqrBzLwPQqUvmam2vD4YxeWf4XJxg=; b=KQweQNg8SkqFQtQASREIEGuMUXVzcgfRJ5Ol/Y2lpyWQf1UuCtA50sdA EOW/Qu/5uP0HEnGD5hIFOrESbRPIaScsghePg/utNEyv/ih0HWzY3BmiZ AW+J/PRlBKaJhUKbmXJ8jR98NEGdCXDyp2HOnqxpHv5L1rin5A8SGFoXh +LmRqDCseoGyN/o0KMOh+3DAXHouKekuP8pmG40CYSj/nYQQAyE1HA2R1 to11hUP3rA2OnFJN3LEB5AobZ8NQQAk4OADumMlPP4+ResLTiNYftQC4L g49P0wbsCZb9or6oSVs8nSHCQXNsTWX+rvqF/I1s9PsYL/c29BwoO07SZ w==; X-CSE-ConnectionGUID: gRxZ4o7YSP2cXWpXMN8p5g== X-CSE-MsgGUID: ntnv7fkARSSncg/CLiA5UQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372745" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372745" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:14 -0700 X-CSE-ConnectionGUID: lxW0/VtORaWKcqXYVt8UbA== X-CSE-MsgGUID: jr569vvdScKvNHbWSjmrDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463674" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:12 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:12 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 08/35] drm/i915/bios: Add version notes for some blocks Date: Fri, 3 May 2024 15:24:22 +0300 Message-ID: <20240503122449.27266-9-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Document which VBT blocks were defined in which BDB version, for the cases where the spec actually states this accurately. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 0533025d133b..18f54311a6e8 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -147,7 +147,7 @@ enum bdb_block_id { BDB_EXT_MMIO_REGS = 6, /* VBIOS only */ BDB_SWF_IO = 7, /* VBIOS only */ BDB_SWF_MMIO = 8, /* VBIOS only */ - BDB_PSR = 9, + BDB_PSR = 9, /* 165+ */ BDB_MODE_REMOVAL_TABLE = 10, BDB_CHILD_DEVICE_TABLE = 11, BDB_DRIVER_FEATURES = 12, @@ -170,10 +170,10 @@ enum bdb_block_id { BDB_LFP_DATA = 42, BDB_LFP_BACKLIGHT = 43, BDB_LFP_POWER = 44, - BDB_MIPI_CONFIG = 52, - BDB_MIPI_SEQUENCE = 53, - BDB_COMPRESSION_PARAMETERS = 56, - BDB_GENERIC_DTD = 58, + BDB_MIPI_CONFIG = 52, /* 175+ */ + BDB_MIPI_SEQUENCE = 53, /* 177+ */ + BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ + BDB_GENERIC_DTD = 58, /* 229+ */ BDB_SKIP = 254, /* VBIOS only */ }; From patchwork Fri May 3 12:24:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652697 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 1C84CC4345F for ; Fri, 3 May 2024 12:25:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79C5A1128B9; Fri, 3 May 2024 12:25:19 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Rk9aF6NX"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id B25FD1128B9 for ; Fri, 3 May 2024 12:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739118; x=1746275118; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=CLDgG/EIpa/UMcY1EsygWHPr8Fcgmu9qIcVaGW20D1Q=; b=Rk9aF6NX2cGz02kCUIer9zMw7uGFq3c1g+jENNOnLwTWAQahIyxa08Xl wsndMjpnxAq9yfDLLC9mHsmjVr9Uaj9ncLE4sOdOqHFf1hWtg3s+Bk5GB 0e8RCU64sBHvfX9Dwk9uC2dzHVgFolj1ZfJ1Yn8IkEtKxNWXN+hIOh4kI YREdDAKky53KvE/A1tBnhQt4rmn7Bdq9I3jvbEdf988IECqrTk8BvPkL+ ebamncK3qUnaMqaXzKisv7c5iOvnAF4aqLZOieesFUL3mf6ePE+5/sPpE /lvntZ0ZXXjsYWNXL+qw5TQnSpMINQV3pYF1K/Sq483W91lGOcPupES/b Q==; X-CSE-ConnectionGUID: 4J3raIvyTAa+t6NZbFwvDQ== X-CSE-MsgGUID: Rpd0altaRRqJHbpbb5xNiQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372746" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372746" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:17 -0700 X-CSE-ConnectionGUID: FeMNDGRySTmj5TrQHaJ18Q== X-CSE-MsgGUID: zI2Al6ryThq0mJTytGnf2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463676" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:15 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:14 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 09/35] drm/i915/bios: Define VBT block 3 (Display Toggle Option) contents Date: Fri, 3 May 2024 15:24:23 +0300 Message-ID: <20240503122449.27266-10-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 3 (Display Toggle Option). On modern VBTs this is just a single byte, but on ALM there is also some extra to do with toggle lists or something. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 18f54311a6e8..7df0a6044425 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -141,7 +141,7 @@ struct bdb_header { enum bdb_block_id { BDB_GENERAL_FEATURES = 1, BDB_GENERAL_DEFINITIONS = 2, - BDB_OLD_TOGGLE_LIST = 3, + BDB_DISPLAY_TOGGLE = 3, BDB_MODE_SUPPORT_LIST = 4, BDB_GENERIC_MODE_TABLE = 5, BDB_EXT_MMIO_REGS = 6, /* VBIOS only */ @@ -561,6 +561,16 @@ struct bdb_general_definitions { u8 devices[]; } __packed; +/* + * Block 3 - Display Toggle Option Block + */ + +struct bdb_display_toggle { + u8 feature_bits; + u16 num_entries; /* ALM only */ + u16 list[]; /* ALM only */ +} __packed; + /* * Block 9 - SRD Feature Block */ From patchwork Fri May 3 12:24:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652698 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 7FE8DC25B5C for ; Fri, 3 May 2024 12:25:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE1831128C5; Fri, 3 May 2024 12:25:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QOgsEfHK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A07D1128C5 for ; Fri, 3 May 2024 12:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739120; x=1746275120; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=F5D0ZV8+YunYQH5OEUA9rwivEbyL2cX3U51aurzz20U=; b=QOgsEfHKZDj9blqyZnh3FdcoWOl/0Nxouuxf8NHNVzX1KA2fiS/Y5dok x4tWiwDASa9F6ZjKkFNsER/8rJPzds7ThENusU1tVfrcWZYrd+OoApxAJ /n1iSUsJ/pXcHshlD7Qj818DUYAkMl4azEtwidm/IpsTBz5P89QsoXEVZ MBmGEg/atpQXmagaWxoXGk7TUGE2aPOucXhWb1WC0piv66tTAyh6IbT0Y Turr3WKNVhJERvhw6IiAiQMLqFgATAhDtAnygRYk+mu0tVNtK/sNt8ZIw RnSEAiVzu1DFYzIx4y0mxIJ0X8RNSAS4/Hfgk5tyNF17lMod7AcUadtCr Q==; X-CSE-ConnectionGUID: 9b0rMmY2Q0mJdN5V228oJg== X-CSE-MsgGUID: dklcA4jOQSmscCYZEEMTRg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372749" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372749" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:20 -0700 X-CSE-ConnectionGUID: qqhWXlLpQjekf9N6RpwOmw== X-CSE-MsgGUID: 0mN7DtzCQtW9dY7Mxc9anw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463701" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:18 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:17 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 10/35] drm/i915/bios: Define VBT block 4 (Mode Support List) contents Date: Fri, 3 May 2024 15:24:24 +0300 Message-ID: <20240503122449.27266-11-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 4 (Mode Support List). Slightly crazy layout with a variable length list at the start, followed by the length of said list. No real idea what these "Intel mode numbers" really are. What I see in real world VBTs seems to be always the same list of 26 numbers, ranging between 0x30 and 0x84. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 7df0a6044425..c9ecf3b48999 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -571,6 +571,15 @@ struct bdb_display_toggle { u16 list[]; /* ALM only */ } __packed; +/* + * Block 4 - Mode Support List + */ + +struct bdb_mode_support_list { + u8 intel_mode_number[0]; + u16 mode_list_length; +} __packed; + /* * Block 9 - SRD Feature Block */ From patchwork Fri May 3 12:24:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652699 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 0C78BC4345F for ; Fri, 3 May 2024 12:25:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9979D1128C9; Fri, 3 May 2024 12:25:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mybjbzjF"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F5FC1128C7 for ; Fri, 3 May 2024 12:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739123; x=1746275123; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=7XXt68sQvFPITStFo7QqrwfVdiLVTpP+IEfg0ZLeXc4=; b=mybjbzjF/bPZYkzs/djGyt9VzTfEH7Qi1OpZUxT6C8qMezOwYo3Xzt+O gPvI3J6QbcfMaf5E0zOXMyA79tJL/EuiG5wcD9TH6am9IprSH9L7dAKrF s7PpdMklkKTeHVLUeYRy1cxyZ9FG8P8mzZ3/4RZKj87tk5/sQiTPQzCy7 WEJq/cW7mR2cSQ2duBGD506upKew6ZKAhCQBfT3WqpRl0E7XdIyzhv7ch rlNsRHrJMzC/lHfQuYgvrYWUj8vZ7YX3g+OM1lFHOyDxeJCM6CbD+CSGe 8UCg9NLdMs/E8Lg3od1M4Ts8ExHi2RBPNKZaupMoHYPyA2FXEwStVFrQp w==; X-CSE-ConnectionGUID: JsTQ99YvRfWcp1j7Qlr0pg== X-CSE-MsgGUID: S2cW6dyLRcWZ0zJDcOKi6A== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372750" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372750" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:23 -0700 X-CSE-ConnectionGUID: J88IDdY1Se6jrMY5Ad47DA== X-CSE-MsgGUID: UL92fgjvT8yiBN1Md/dEXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463716" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:21 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:20 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 11/35] drm/i915/bios: Define VBT block 5 (Generic Mode Table) Date: Fri, 3 May 2024 15:24:25 +0300 Message-ID: <20240503122449.27266-12-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 5 (Generic Mode Table). Details were mostly gleaned from some VBIOS sources. There are apparently two variants of the block: ALM only vs. MGM, defined here as bdb_generic_mode_table_alm and bdb_generic_mode_table_mgm. And those are the only two platforms where I've seen this block. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index c9ecf3b48999..f3478a20ff16 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -580,6 +580,60 @@ struct bdb_mode_support_list { u16 mode_list_length; } __packed; +/* + * Block 5 - Generic Mode Table + */ + +struct generic_mode_table { + u16 x_res; + u16 y_res; + u8 color_depths; + u8 refresh_rate[3]; + u8 reserved; + u8 text_cols; + u8 text_rows; + u8 font_height; + u16 page_size; + u8 misc; +} __packed; + +struct generic_mode_timings { + u32 dotclock_khz; + u16 hdisplay; + u16 htotal; + u16 hblank_start; + u16 hblank_end; + u16 hsync_start; + u16 hsync_end; + u16 vdisplay; + u16 vtotal; + u16 vblank_start; + u16 vblank_end; + u16 vsync_start; + u16 vsync_end; +} __packed; + +struct generic_mode_timings_alm { + struct generic_mode_timings timings; + u8 wm_8bpp; + u8 burst_8bpp; + u8 wm_16bpp; + u8 burst_16bpp; + u8 wm_32bpp; + u8 burst_32bpp; +} __packed; + +struct bdb_generic_mode_table_alm { + struct generic_mode_table table; + struct generic_mode_timings_alm timings[3]; +} __packed; + +struct bdb_generic_mode_table_mgm { + u16 mode_flag; + struct generic_mode_table table; + struct generic_mode_timings timings[3]; +} __packed; + /* * Block 9 - SRD Feature Block */ From patchwork Fri May 3 12:24:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652700 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 6A03BC10F16 for ; Fri, 3 May 2024 12:25:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D39E31128CC; Fri, 3 May 2024 12:25:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BF3UrdE8"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 37A6C1128CC for ; Fri, 3 May 2024 12:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739126; x=1746275126; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=0w701zoOKJ7pI2EQXPcgRKh8ylpeIgyOviPJDBb/+tg=; b=BF3UrdE8kyhbaf7BRv+H90L7ZMNAYbWVjvpIQkyxBd7Mj8PaeTPMpMVc Iwju5sgY5a+MZjaCZkk5aRQVjWgmqJ42Qt0bQntskcNAP8rb0vHTeDOBO p5wUiFasW29cRyIzzQ2tQ2570EsrKdhzwKsQMbnbMLGBIHdjHuex0g3GQ ogplKrvgxw8SoYDYDUkjkcqybPP8RGGxacasOWmsDXpWqPyt7Ug+Tt7N9 +4JwXOkjViQSxLcAYx02V3KM5QxWdJQAToKrL/LgiW9lczQgYL+uX98wy v0NYtMW1b27NprXifsN3mtzmGMUV3+k/X/Zl7dt6Qm4FUCBtqbeVIuy5Y g==; X-CSE-ConnectionGUID: GPZ8d6/GSzqbomaDk6K5nA== X-CSE-MsgGUID: lgF7KYVVSqaucBGER4o66Q== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372752" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372752" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:26 -0700 X-CSE-ConnectionGUID: L1ocinzyR/2QxEJcKsiBkg== X-CSE-MsgGUID: wtJThWavT7u0BTXZQCKkvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463722" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:24 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:23 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 12/35] drm/i915/bios: Define VBT blocks 6, 7, 8 (register tables) contents Date: Fri, 3 May 2024 15:24:26 +0300 Message-ID: <20240503122449.27266-13-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents for VBT blocks: - Block 6 (Extended MMIO Register Table) - Block 7 (IO Software Flag Table) - Block 8 (MMIO SWF Register Table) All of these use the same basic layout, with two known variants: - data_access_size==0xce -> offset,value tuples are u8,u8 - data_access_size==0x02 -> offset,value tuples are u32,u32 Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index f3478a20ff16..4f0b8be3034c 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -634,6 +634,22 @@ struct bdb_generic_mode_table_mgm { struct generic_mode_timings timings[3]; } __packed; +/* + * Block 6 - Extended MMIO Register Table, VBIOS only + * Block 7 - IO Software Flag Table, VBIOS only + * Block 8 - MMIO SWF Register Table, VBIOS only + */ +struct bdb_reg_table { + u16 table_id; + u8 data_access_size; + /* + * offset,value tuples: + * data_access_size==0xce -> u8,u8 + * data_access_size==0x02 -> u32,u32 + */ + /* u16 table_end_marker; */ +} __packed; + /* * Block 9 - SRD Feature Block */ From patchwork Fri May 3 12:24:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652701 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 83952C4345F for ; Fri, 3 May 2024 12:25:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01B2F1128CD; Fri, 3 May 2024 12:25:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Bya/slRp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11E9C1128CD for ; Fri, 3 May 2024 12:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739129; x=1746275129; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=QJrbDqlJY+3QwepUSRV+2WJUFLjxVW3GtvHz9yvIi9Q=; b=Bya/slRpbeyL/NaroSVatQo9R6LaKkxvoFwo6e8tsIUdhFQV/Y99Q13+ QNrlfCK5g3dKycarpuiEcZ3tVbo/BZX9hnMziOGVu+AE0tOpKFIXnMul2 BZ1vJUXqptMx4dFUpV3ZdS+NgqFEzml1qNEd49yswxElero2/euAtetwr FXXt5QhcDBymkCF2512n487ssLJANalMVKrU3VY5UvphgJXamd6uEOhgH cTuMR8SXAFWPqiioCnQ1T0ROdtT0FmApPRxudG8W/ZxvdQG4ZateUej/j kq1gfwdO8FC3qCxHbBA2IOjz5N3visht1ZViioG9JG52PByZzzkjTYEz0 A==; X-CSE-ConnectionGUID: B7Ka6CfTQUOW8bwzhjhsQA== X-CSE-MsgGUID: XHXQtXl4RLiMZp5fCfNtBQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372755" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372755" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:29 -0700 X-CSE-ConnectionGUID: MMt8KVydRRab5KXMUGodqw== X-CSE-MsgGUID: 4JyTFLybQSW/74QkhE/YZw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463726" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:27 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:26 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 13/35] drm/i915/bios: Define VBT block 10 (Mode Removal Table) contents Date: Fri, 3 May 2024 15:24:27 +0300 Message-ID: <20240503122449.27266-14-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 10 (Mode Removal Table). There seem to be two variants: - 8 byte entries for desktop systems - 10 byte entries for mobile systems, with the extra panel_flags being a bitmask of LFPs It seems starting from HSW only the mobile variant is used anymore. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 4f0b8be3034c..d78523cd4214 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -677,6 +677,29 @@ struct bdb_psr { u32 psr2_tp2_tp3_wakeup_time; /* 226+ */ } __packed; +/* + * Block 10 - Mode Removal Table + */ + +struct mode_removal_table { + u16 x_res; + u16 y_res; + u8 bpp; + u16 refresh_rate; + u8 removal_flags; + u16 panel_flags; +} __packed; + +struct bdb_mode_removal { + u8 row_size; /* 8 or 10 bytes */ + /* + * VBT spec says this is always 20 entries, + * but ALM seems to have only 15 entries. + */ + struct mode_removal_table modes[]; + /* u16 terminator; 0x0000 */ +} __packed; + /* * Block 12 - Driver Features Data Block */ From patchwork Fri May 3 12:24:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652702 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 BDFF1C4345F for ; Fri, 3 May 2024 12:25:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E1801128CE; Fri, 3 May 2024 12:25:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bKm+v/C9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id E32B21128CE for ; Fri, 3 May 2024 12:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739132; x=1746275132; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=YEwkVFcC70bRzk7zaKjhK7Yabht963D7RM3Rqdu19cM=; b=bKm+v/C9EHA6MmLFcg0mdPvIz2X+NQJrD10wooXURsOW4XZxRCM+eYzw NEMXW4QusXCjqHBPWwci3Ib+ZVbMVEs7C6/5c7oIYK4HH5/PtvAchQZ8W ccKJ20f8Ee7Rs9DAy0IglB83BbqHrmqWfrQwCI5pM1bJFqGUKaiU2ZBGr gNE2p+NiLLoL7OXkQL7uPMxVU60/m1tZkc4MAj2l74LlU0fprSHiLEJXu gyn6dT6f4uH1Lwpcx+VRul/p1DaEj67tFiOGeWmg/PJzK9wjKqH8JENM+ Pky5tp70BW9JqEC7J9hGD9n9O/Y+fLiqu4a7I8ntGig7R5OBY4WN9fDq7 A==; X-CSE-ConnectionGUID: ihiEEXsWS0WsSLLHgxOdOg== X-CSE-MsgGUID: VE9Zjgf5TdqJdZ5KXK50Xw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372758" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372758" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:31 -0700 X-CSE-ConnectionGUID: Gm0AywVnRRGWL2ov/mUCgQ== X-CSE-MsgGUID: 3DKwZU+wS2Ggd5F0gwVpvg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463729" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:29 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:29 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 14/35] drm/i915/bios: Define VBT block 12 (Driver Persistent Algorithm) contents Date: Fri, 3 May 2024 15:24:28 +0300 Message-ID: <20240503122449.27266-15-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 12 (Driver Persistent Algorithm). Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index d78523cd4214..2075d53ca317 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -778,6 +778,25 @@ struct bdb_driver_features { u16 pc_feature_valid:1; /* 159+ */ } __packed; +/* + * Block 13 - Driver Persistent Algorithm + */ + +struct bdb_driver_persistence { + u16 hotkey_persistent_algorithm:1; + u16 lid_switch_persistent_algorithm:1; + u16 power_management_persistent_algorithm:1; + u16 hotkey_persistent_on_mds_twin:1; + u16 hotkey_persistent_on_refresh_rate:1; + u16 hotkey_persistent_on_restore_pipe:1; + u16 hotkey_persistent_on_mode:1; + u16 edid_persistent_on_mode:1; + u16 dvo_hotplug_persistent_on_mode:1; + u16 docking_persistent_algorithm:1; + u16 rsvd:6; + u8 persistent_max_config; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652703 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 B6886C4345F for ; Fri, 3 May 2024 12:25:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EE2D1127E9; Fri, 3 May 2024 12:25:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JhXpXX5S"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFFBF1128CF for ; Fri, 3 May 2024 12:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739135; x=1746275135; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=8E52rKznnFm+ODkSacENvKAVPORpfdyIuxoLCQYtHtU=; b=JhXpXX5Sno6+1pM6c0Hs0RFi0KITZLvvIv3Ervs6975ne5eOe9Lspmx0 AoB7GHrnztZgWhN6aN1fwqHCMsZNrkiI59U/5X4UoZAdG0fiGGghsQjBU zmXBPCVCZnnAOBaP4HWQU2VDQ0PgLgY4YgQN2Bfkqo6xQaGEsvs06bKBh XCEJUDSG3N2Zh9miqZ46eoLiMlJ1r9ZWSBCZ8mFx59ibgFYlDqdZegRR+ WEBwuRg+eelQS2/S4SvIvPNDjxfZ+5H4ARzuuZJ3D9g8KLwpYnblHL5RJ Pv7PG18wslTBVSSokC+n5Nlk28egLuwbNTc2+6OZlEz6E7jEnGdNI7Qbe Q==; X-CSE-ConnectionGUID: 66u0K1WRSKSRriMXp6UIpg== X-CSE-MsgGUID: QLEc9ch1TYWaJVaaCBbaBw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372762" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372762" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:34 -0700 X-CSE-ConnectionGUID: oJXuF3FvRqucmbMIq3aVrQ== X-CSE-MsgGUID: l6kmhyS6TP+VhIQ8PAEblg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463745" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:32 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:31 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 15/35] drm/i915/bios: Define VBT block 15 (Dot Clock Override Table) contents Date: Fri, 3 May 2024 15:24:29 +0300 Message-ID: <20240503122449.27266-16-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 15 (Dot Clock Override Table) The contents were reverse engineered by intuition. The gen2 stuff seems solid as I can verify that against real world VBT data. The gen3 stuff less so as all the gen3+ VBTs I have just filla the entire block with zeroes. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 2075d53ca317..c2f73c7d9412 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -797,6 +797,36 @@ struct bdb_driver_persistence { u8 persistent_max_config; } __packed; +/* + * Block 15 - Dot Clock Override Table + */ + +struct dot_clock_override_entry_gen2 { + u32 dotclock; + u8 n; + u8 m1; + u8 m2; + u8 p1:5; + u8 p1_div_by_2:1; + u8 reserved:1; + u8 p2_div_by_4:1; +} __packed; + +struct dot_clock_override_entry_gen3 { + u32 dotclock; + u8 n; + u8 m1; + u8 m2; + u8 p1; + u8 p2; +} __packed; + +struct bdb_dot_clock_override { + u8 row_size; /* 8 == gen2, 9 == gen3+ */ + u8 num_rows; + struct dot_clock_override_entry_gen3 table[]; /* or _gen2 */ +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652704 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 F405CC4345F for ; Fri, 3 May 2024 12:25:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 846161128CF; Fri, 3 May 2024 12:25:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PkVUCXLh"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 998F61128CF for ; Fri, 3 May 2024 12:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739137; x=1746275137; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=o3WBIFyAuqda06XM8aepQwzrJcsRB+yURtojspmfwYM=; b=PkVUCXLhkLvzEdIlLLEEBdPCoqtYwAdy11nydxRCCHJKulpdieXsbX19 6/au+1LnGpbZLQIhZ0uyEUjySSNhyySd/AWvuFDzTrlOxkwEWA7bnNlFh ZBVSMA5+zLHAeeBNXckeLge0M13GUDMrNnldzO1x2eYyNdG7+/GeGa+ai ZOCa0XL9yMFIIscmkIq3fLMb3362I1CgVXxCzfy8o3H3xh0jI1jwFpmcb OeAN7iiY0XKJ+0Wgvp895wi7SBvZjENRZCAFy2bQyCXUM79aAOvX7jmI5 ztMv8q+KCZ2m5v4eG4H9Ja5hu3MDArCYoskJEl9XQ5colQ4R/RuudIf4Z Q==; X-CSE-ConnectionGUID: 4L45dXnORnOifhiBDasz5Q== X-CSE-MsgGUID: snoF6Z+QRjC2ix+fLfKD2Q== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372764" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372764" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:37 -0700 X-CSE-ConnectionGUID: i+sY/IFlRWO3jAByAKnnLQ== X-CSE-MsgGUID: OGA79yW7QOuHi0J8STZLNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463749" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:35 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:34 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 16/35] drm/i915/bios: Define ALM only VBT block 9 contents Date: Fri, 3 May 2024 15:24:30 +0300 Message-ID: <20240503122449.27266-17-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä For some reason ALM VBT has two dot clock override tables. One as the normal block 15 and a second one as block 9. The table in block 9 has no row_size/num_rows information. On my Fujitsu Lifebook S6010 only the block 9 table has actual data in it. Block 15 is present but all zeroes. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index c2f73c7d9412..b836dee09f59 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -147,6 +147,7 @@ enum bdb_block_id { BDB_EXT_MMIO_REGS = 6, /* VBIOS only */ BDB_SWF_IO = 7, /* VBIOS only */ BDB_SWF_MMIO = 8, /* VBIOS only */ + BDB_DOT_CLOCK_OVERRIDE_ALM = 9, BDB_PSR = 9, /* 165+ */ BDB_MODE_REMOVAL_TABLE = 10, BDB_CHILD_DEVICE_TABLE = 11, @@ -650,6 +651,25 @@ struct bdb_reg_table { /* u16 table_end_marker; */ } __packed; +/* + * Block 9 - Undocumented table (ALM only) + */ + +struct dot_clock_override_entry_gen2 { + u32 dotclock; + u8 n; + u8 m1; + u8 m2; + u8 p1:5; + u8 p1_div_by_2:1; + u8 reserved:1; + u8 p2_div_by_4:1; +} __packed; + +struct bdb_dot_clock_override_alm { + struct dot_clock_override_entry_gen2 t[0]; +} __packed; + /* * Block 9 - SRD Feature Block */ @@ -801,17 +821,6 @@ struct bdb_driver_persistence { * Block 15 - Dot Clock Override Table */ -struct dot_clock_override_entry_gen2 { - u32 dotclock; - u8 n; - u8 m1; - u8 m2; - u8 p1:5; - u8 p1_div_by_2:1; - u8 reserved:1; - u8 p2_div_by_4:1; -} __packed; - struct dot_clock_override_entry_gen3 { u32 dotclock; u8 n; From patchwork Fri May 3 12:24:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652705 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 A8370C4345F for ; Fri, 3 May 2024 12:25:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21F6C1128D1; Fri, 3 May 2024 12:25:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JI5GqL7I"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 78D081128D1 for ; Fri, 3 May 2024 12:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739140; x=1746275140; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=ExcdkURlyZLBzqCYZEpI0midmF70YeYdbY2bah7mPLM=; b=JI5GqL7IIisZiT3BOJc5fH9rz+O5yqkMlsOF4Lt+a5iEK2msyWIBqdiA GXhXAFI+Q0Htgr3tPvM7CJ2md59zfok+h3tvXtOnPF6cpr3TIhGNyL5hT 2ljwGWLq5HdmYtjgfljsF+JrhzsUaSgvj+O2eNhGYzfV3RXl3t8Srfo5u y3GqBL6eetF/+kxJDrHPAoCK7QihcA/2yfv1eKfIKmcfcRJzX7PxTS2Y7 w5UjSgT9OhcCy6EZa9HrB8Fja3PV/GR0/UjvrbltRrGf73zv3FvEi9I+P yP9/OIURvQswAUzQ4Ay2wAts/+CsqlVBq28M+EOnC2vlogj8HbdCru1Ah g==; X-CSE-ConnectionGUID: M4YLwU0jQfyl19pM5vUhzw== X-CSE-MsgGUID: W3WmbwuxTH+7ejzO5wUJbw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372766" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372766" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:40 -0700 X-CSE-ConnectionGUID: N6Pa+0K4S2aGza8nRPd9Yw== X-CSE-MsgGUID: L9RCwd6HS2GbUmLCw1URrw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463751" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:38 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:37 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 17/35] drm/i915/bios: Define VBT block 17 (SV Test Functions) contents Date: Fri, 3 May 2024 15:24:31 +0300 Message-ID: <20240503122449.27266-18-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 17 (SV Test Functions). Nothing real here for us, but might as well define it for completeness. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index b836dee09f59..c97bca5d12d1 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -156,6 +156,7 @@ enum bdb_block_id { BDB_EXT_TABLE_PTRS = 14, /* VBIOS only */ BDB_DOT_CLOCK_OVERRIDE = 15, BDB_DISPLAY_SELECT = 16, + BDB_SV_TEST_FUNCTIONS = 17, BDB_DRIVER_ROTATION = 18, BDB_DISPLAY_REMOVE = 19, BDB_OEM_CUSTOM = 20, @@ -836,6 +837,14 @@ struct bdb_dot_clock_override { struct dot_clock_override_entry_gen3 table[]; /* or _gen2 */ } __packed; +/* + * Block 17 - SV Test Functions + */ + +struct bdb_sv_test_functions { + u8 sv_bits[8]; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652706 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 D26A3C4345F for ; Fri, 3 May 2024 12:25:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55AD71128D2; Fri, 3 May 2024 12:25:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="UUzmo9nf"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 57BDB1128D2 for ; Fri, 3 May 2024 12:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739143; x=1746275143; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=yYfP+pCXtuQ3mys0cbETYLh+U/ETxTAn3jWEqKynwIk=; b=UUzmo9nfEobAM2RfPGE+zTkGhuH/FRPqRr1Tic32p4oeZPMsLVvFGoOL SOCfL4qPyo8nakmbaYTfQJh6aT9AfbyDr47ctorSgIjmNoXSFi4p8Zawg KaRT4naU+6sqMlQNFC9p+Sz0TGbb/2EkmL0UDC/dFSfj4RIV0YVOnrj8U tfXKGjrJ0Snn/duKtnz1ZzH20qPztqVbvK8whn/dUEdGBSZAV9kik+KIn 2dEHchM7grWlrGXwBmufkkmIJUD2E55g/kGfwrZI38CGQrGpGIPO4pXXY 884AGmL6p2vtQfqom+nQiVcWZg8Q1y0DLyqQL+b0QTwlzJUjuYlnS2Oc3 Q==; X-CSE-ConnectionGUID: p2/gvCddR3CMTs+B6zgC9Q== X-CSE-MsgGUID: upLXhjO7TSCrsV0iIh8bzg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372769" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372769" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:43 -0700 X-CSE-ConnectionGUID: Pujh1/MBSvma2ejPsc61oA== X-CSE-MsgGUID: nSan1J6qTNWuRTZmODMBIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463755" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:41 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:40 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 18/35] drm/i915/bios: Define VBT block 18 (Driver Rotation) contents Date: Fri, 3 May 2024 15:24:32 +0300 Message-ID: <20240503122449.27266-19-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of block 18 (Driver Rotation). Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index c97bca5d12d1..2792da3c916e 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -845,6 +845,18 @@ struct bdb_sv_test_functions { u8 sv_bits[8]; } __packed; +/* + * Block 18 - Driver Rotation + */ + +struct bdb_driver_rotation { + u8 rotation_enable; + u8 rotation_flags_1; + u16 rotation_flags_2; + u32 rotation_flags_3; + u32 rotation_flags_4; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652707 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 3F1F5C4345F for ; Fri, 3 May 2024 12:25:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B60D31128D6; Fri, 3 May 2024 12:25:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="VJGRimwG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26C371128D5 for ; Fri, 3 May 2024 12:25: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=1714739146; x=1746275146; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=BuJkWKPVmUAS1fCg8ohmQFivXCf49fx6kvLApjSyjg0=; b=VJGRimwGYwINu0nHyvnubOxpK6DYb/xjeYVD4KHqq7ByhUidS2BdnYfL xfAog5zMJko0uNU/IKTybpCoP66BqrWTa7E3GTt/ux3BDEwYnHSzLprDc Gtj5uCSGaJ0u/54g50j6P4JDScdF59H59zRQEBuxw8T37fhECXlEfuqOq IFbklec/GkA0QSSpqT2CiajiRlGYLPKQr+GF6Zz69QKzmjMjaiX1Mo7DV etXdJWNhkgjtF6a8scUfdgb22qKj0olZBoGB9uhTfdgDB/Z/auy1yQyrt VbV51Mo8/kmimSfD2ML6gT2f7Omqrt9X+CY80B2kaPy4NjURilbffZcEu Q==; X-CSE-ConnectionGUID: e8EtpA2jSy+FA1qkWGg94A== X-CSE-MsgGUID: LnC6ZoM4SDOkP91kdLaaOw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372772" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372772" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:46 -0700 X-CSE-ConnectionGUID: Aa0V0uidRbiGjtrcO9C/tg== X-CSE-MsgGUID: sxgVfXgIS/GQ1c5AV5xDAg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463775" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:44 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:43 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 19/35] drm/i915/bios: Define VBT blocks 16, 29, 31 (Toggle List) contents Date: Fri, 3 May 2024 15:24:33 +0300 Message-ID: <20240503122449.27266-20-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contenst is VBT blocks 16,19,31 (Toggle List). There are three variants of this block: pre-IVB, IVB, HSW+, with each having slightly different entries. Curiously many HSW/BDW machines seem to have both the IVB and HSW+ variants in their VBTs simultanously. No idea why. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 2792da3c916e..cfa17a848105 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -155,7 +155,7 @@ enum bdb_block_id { BDB_DRIVER_PERSISTENCE = 13, BDB_EXT_TABLE_PTRS = 14, /* VBIOS only */ BDB_DOT_CLOCK_OVERRIDE = 15, - BDB_DISPLAY_SELECT = 16, + BDB_DISPLAY_SELECT_OLD = 16, BDB_SV_TEST_FUNCTIONS = 17, BDB_DRIVER_ROTATION = 18, BDB_DISPLAY_REMOVE = 19, @@ -167,6 +167,8 @@ enum bdb_block_id { BDB_SDVO_LVDS_PPS = 25, BDB_TV_OPTIONS = 26, BDB_EDP = 27, + BDB_DISPLAY_SELECT_IVB = 29, /* 164+ */ + BDB_DISPLAY_SELECT_HSW = 31, /* 166+ */ BDB_LFP_OPTIONS = 40, BDB_LFP_DATA_PTRS = 41, BDB_LFP_DATA = 42, @@ -837,6 +839,27 @@ struct bdb_dot_clock_override { struct dot_clock_override_entry_gen3 table[]; /* or _gen2 */ } __packed; +/* + * Block 16 - Toggle List Block (pre-HSW) + */ + +struct toggle_list_entry_old { + u8 display_select_pipe_a; + u8 display_select_pipe_b; + u8 caps; +} __packed; + +struct toggle_list_table_old { + u16 num_entries; + u8 entry_size; + struct toggle_list_entry_old list[]; +} __packed; + +struct bdb_display_select_old { + /* each table has variable size! */ + struct toggle_list_table_old tables[4]; +} __packed; + /* * Block 17 - SV Test Functions */ @@ -957,6 +980,44 @@ struct bdb_edp { u16 edp_dsc_disable; /* 251+ */ } __packed; +/* + * Block 29 - Toggle List Block (IVB) + */ + +struct toggle_list_entry_ivb { + u8 display_select; +} __packed; + +struct toggle_list_table_ivb { + u16 num_entries; + u8 entry_size; + struct toggle_list_entry_ivb list[]; +} __packed; + +struct bdb_display_select_ivb { + /* each table has variable size! */ + struct toggle_list_table_ivb tables[4]; +} __packed; + +/* + * Block 31 - Toggle List Block (HSW+) + */ + +struct toggle_list_entry_hsw { + u16 display_select; +} __packed; + +struct toggle_list_table_hsw { + u16 num_entries; + u8 entry_size; + struct toggle_list_entry_hsw list[]; +} __packed; + +struct bdb_display_select_hsw { + /* each table has variable size! */ + struct toggle_list_table_hsw tables[4]; +} __packed; + /* * Block 40 - LFP Data Block */ From patchwork Fri May 3 12:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652708 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 245B4C4345F for ; Fri, 3 May 2024 12:25:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D5FD1128D9; Fri, 3 May 2024 12:25:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JvJad9t5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBBF71128D7 for ; Fri, 3 May 2024 12:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739149; x=1746275149; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=u9ZXDEPddC2YF8PtAnmgE0qb2oZEpavMTjfrpre99XE=; b=JvJad9t5AUQUNT1nd1EXGY2458qmQDvLpbW6DV9ibHI5VaPLAKzbahWA DVsJkugpirYGeIFLH8wCtjZaCKKBrCwQSbV4+zxaB7HcAahWnjdppBx+H T0sBHxKKJglbbDDjCc1Ik8eq2I5b4Q75SYF80XnIbH709DdoXM6SBCsif 1hhVE9252V7XghoAYOs4fkciSB5z0aKgL9ajZF8TnHtO4NKTVlV3qy3Bn T51de2QvHq4Rjf7Urp6esjiw1urv+O2HfOG1win49em4V9O7EtOZAEqbn HVNhPPgv0XxOUg4qZAT6/dt5UVn2UxJ7JjYqvUueM/FnKo9p/BArTk3lV A==; X-CSE-ConnectionGUID: eQbfkI/2RJSHIsffZP2tqQ== X-CSE-MsgGUID: 8MHHlmK6Q2eD4z2QfPU2VA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372775" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372775" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:48 -0700 X-CSE-ConnectionGUID: u520fv9TQEuQ0ldMWljc3Q== X-CSE-MsgGUID: /UQS2hSiRL+2UqICh3ciIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463795" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:46 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:46 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 20/35] drm/i915/bios: Define VBT blocks 19, 30, 32 (Display Configuration Removal Table) contents Date: Fri, 3 May 2024 15:24:34 +0300 Message-ID: <20240503122449.27266-21-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contenst is VBT blocks 19,30,32 (Display Configuration Removal Table) contents. There are three variants of this block: pre-IVB, IVB, HSW+, with each having slightly different entries. Curiously many HSW/BDW machines seem to have both the IVB and HSW+ variants in their VBTs simultanously. No idea why. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index cfa17a848105..30d60835e4d0 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -158,7 +158,7 @@ enum bdb_block_id { BDB_DISPLAY_SELECT_OLD = 16, BDB_SV_TEST_FUNCTIONS = 17, BDB_DRIVER_ROTATION = 18, - BDB_DISPLAY_REMOVE = 19, + BDB_DISPLAY_REMOVE_OLD = 19, BDB_OEM_CUSTOM = 20, BDB_EFP_LIST = 21, /* workarounds for VGA hsync/vsync */ BDB_SDVO_LVDS_OPTIONS = 22, @@ -168,7 +168,9 @@ enum bdb_block_id { BDB_TV_OPTIONS = 26, BDB_EDP = 27, BDB_DISPLAY_SELECT_IVB = 29, /* 164+ */ + BDB_DISPLAY_REMOVE_IVB = 30, /* 164+ */ BDB_DISPLAY_SELECT_HSW = 31, /* 166+ */ + BDB_DISPLAY_REMOVE_HSW = 32, /* 166+ */ BDB_LFP_OPTIONS = 40, BDB_LFP_DATA_PTRS = 41, BDB_LFP_DATA = 42, @@ -880,6 +882,21 @@ struct bdb_driver_rotation { u32 rotation_flags_4; } __packed; +/* + * Block 19 - Display Configuration Removal Table (pre-IVB) + */ + +struct display_remove_entry_old { + u8 display_select_pipe_a; + u8 display_select_pipe_b; +} __packed; + +struct bdb_display_remove_old { + u8 num_entries; + u8 entry_size; + struct display_remove_entry_old table[]; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ @@ -999,6 +1016,20 @@ struct bdb_display_select_ivb { struct toggle_list_table_ivb tables[4]; } __packed; +/* + * Block 30 - Display Configuration Removal Table (IVB) + */ + +struct display_remove_entry_ivb { + u8 display_select; +} __packed; + +struct bdb_display_remove_ivb { + u8 num_entries; + u8 entry_size; + struct display_remove_entry_ivb table[]; +} __packed; + /* * Block 31 - Toggle List Block (HSW+) */ @@ -1018,6 +1049,20 @@ struct bdb_display_select_hsw { struct toggle_list_table_hsw tables[4]; } __packed; +/* + * Block 32 - Display Configuration Removal Table (HSW+) + */ + +struct display_remove_entry_hsw { + u16 display_select; +} __packed; + +struct bdb_display_remove_hsw { + u8 num_entries; + u8 entry_size; + struct display_remove_entry_hsw table[]; +} __packed; + /* * Block 40 - LFP Data Block */ From patchwork Fri May 3 12:24:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652709 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 B5209C4345F for ; Fri, 3 May 2024 12:25:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58B861128D7; Fri, 3 May 2024 12:25:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="I2ADuye5"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1D5B1128D7 for ; Fri, 3 May 2024 12:25: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=1714739152; x=1746275152; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=X7bbtsz37ZO9LmRqQeBZRdBfYmZPUPq+tThQEcqvE1I=; b=I2ADuye5tJgy18ul8UyEuGaIE6leEs02KYx0Db2YKW2IWtIqrRXxxbAq n1F2z39SA+PJpvb8VWGmncDMSq55945CCBMhH4ZR55fvUdF9b47MxsMUJ pxvYodSSyZNTsGQqIInOFKPwObHz+6D8EQ6XYMip8U9gtw+aH98Igiv96 xdT+LWW//fCWk1ZQdAALKLOavLnfKLsImNL1FtoEaxQA4G3uiCmutDn6i 8NwPKMV4D73K7HrYneTdbB6IriE38f0SXi5PgpB+Rh9Dj0wVaux2pKGvd j8EGtBbPyWrhY5PszqvvCrtdTQQozYolPXxb0ru2Rs+s5ZXjHdLnBSz/t w==; X-CSE-ConnectionGUID: CqNCFWvJScarWdn5eU/HYw== X-CSE-MsgGUID: qeH7VedBSOy3IuM/YNFc6g== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372776" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372776" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:51 -0700 X-CSE-ConnectionGUID: HzZwV76/S9ObietCysLNFA== X-CSE-MsgGUID: dJxfRoVSQpSFmhIDDkkZCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463800" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:49 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:48 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 21/35] drm/i915/bios: Define VBT block 20 (OEM Customizable Modes) contents Date: Fri, 3 May 2024 15:24:35 +0300 Message-ID: <20240503122449.27266-22-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 20 (OEM Customizable Modes). Each entry is either 26 or 28 bytes, depending on the BDB version. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 30d60835e4d0..a61ae39196b1 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -897,6 +897,30 @@ struct bdb_display_remove_old { struct display_remove_entry_old table[]; } __packed; +/* + * Block 20 - OEM Customizable Modes + */ + +struct oem_mode { + u8 enable_in_vbios:1; + u8 enable_in_os:1; + u8 enable_in_gop:1; /* 207+ */ + u8 reserved:5; + u8 display_flags; /* ???-216 */ + u16 x_res; + u16 y_res; + u8 color_depth; + u8 refresh_rate; + struct bdb_edid_dtd dtd; + u16 display_flags_2; /* 217+ */ +} __packed; + +struct bdb_oem_custom { + u8 num_entries; + u8 entry_size; + struct oem_mode modes[]; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652710 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 8E21DC4345F for ; Fri, 3 May 2024 12:25:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DAA311128C7; Fri, 3 May 2024 12:25:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hw+b1g+c"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A0C3B1128D8 for ; Fri, 3 May 2024 12:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739154; x=1746275154; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=qP61Siw0yTe+w2z7NP6tQBiaZXrAvS/Xpc9/7dIn5Zw=; b=hw+b1g+cdJ7GOLnX+5zU+1NrAWLxEa6fhzIfLCuiAajAlD4q4fwcArNS ynNUwYM4KPXsrwgH4Vn+vBcZ8/n29BDEvT2I8u4E4i0uZc08HgBTPi7oi lA3J/vGg6uyjQ00gbwIAz8UzIGk7s3nNqMhmYeSrzKpSRK+VxO+3QFY4k T8F05z5fck/iIcxSVIGQmuX6DqVejgj6rLYn/iVpBHwh7vBUlBwQXD4jG QmUQWUcd/wf9QzKL+kux4bvwY38IUgPHvpld0pthi3BCpBatncLPXk2mQ HdXdgc08TtGGSylA6sGH4M7mB68L3XohFBjYP6YZb08Nfy1GdOFlzqnj0 g==; X-CSE-ConnectionGUID: Sp5DS+KLSGCk2hXf8nWOQA== X-CSE-MsgGUID: 4GpDQucoTWqbSaM/Lu6NpQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372778" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372778" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:54 -0700 X-CSE-ConnectionGUID: iQXGiwhUTuqoafbwmqF91g== X-CSE-MsgGUID: bzOahYNoRMWl09VqIC/kZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463801" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:52 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:51 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 22/35] drm/i915/bios: Define VBT block 21 (EFP List) contents Date: Fri, 3 May 2024 15:24:36 +0300 Message-ID: <20240503122449.27266-23-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 21 (EFP List). Specs are nowhere to be found, but real world data suggests that each entry is just the first four bytes of the EDID PnP ID structure. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index a61ae39196b1..6216c1689901 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -921,6 +921,21 @@ struct bdb_oem_custom { struct oem_mode modes[]; } __packed; +/* + * Block 21 - EFP List + */ + +struct efp_entry { + u16 mfg_name; + u16 product_code; +} __packed; + +struct bdb_efp_list { + u8 num_entries; + u8 entry_size; + struct efp_entry efp[]; +} __packed; + /* * Block 22 - SDVO LVDS General Options */ From patchwork Fri May 3 12:24:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652711 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 B0C1CC4345F for ; Fri, 3 May 2024 12:25:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17F1B1128E9; Fri, 3 May 2024 12:25:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="kjdUgio8"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 653DC1128E6 for ; Fri, 3 May 2024 12:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739157; x=1746275157; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=tDpu2mbyqJpfip2btq74MtuvO8VJ+3XX5ae/2qiiI5M=; b=kjdUgio8/A/05YYpt+xvR7iH75pr1NKejfbnwM1C/Xghj5L86eVeIyXt TB49zHNEUUajwBKQwCNex73WenO9xx5EBs4Sy38b5WXUn3nttdvl7l6UR Lwgq3FexVMk0fW+ImGClbieBdi47Zl9+UpeKhTdxNbPjHn/QyQoMgzj5t GHp1Rxaw9fPFi+BRFRAErv3OALqYqMYvjjrbndUFrFN9L2digICrNgBJ1 /GoLEhYQMZVRS/wZiUo03B7mYE2wqFI6KNWIuQTGkpIo/g04DKD+oIQsq cYohlspUeKAksUCRlcgwfhXbiE312jf95zsL3P+5dk9YRrHZIfahd26Hd Q==; X-CSE-ConnectionGUID: NWGpqP+oS0G1Tzc9WG5FMw== X-CSE-MsgGUID: yxQf1sVJRcqC8qG53MA2ag== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372779" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372779" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:25:57 -0700 X-CSE-ConnectionGUID: oJTuYaocSbiL/VRLaM8B1w== X-CSE-MsgGUID: bmxko20EQwK1eHt69XbjDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463803" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:55 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:54 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 23/35] drm/i915/bios: Define VBT block 24 (SDVO LVDS PnP ID) contents Date: Fri, 3 May 2024 15:24:37 +0300 Message-ID: <20240503122449.27266-24-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 24 (SDVO LVDS PnP ID). The descriotion is not part of the VBT spec anymore, but the layout is rather obsvious. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 6216c1689901..8fe2ded884e3 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -964,6 +964,14 @@ struct bdb_sdvo_lvds_dtd { struct bdb_edid_dtd dtd[4]; } __packed; +/* + * Block 24 - SDVO LVDS PnP ID + */ + +struct bdb_sdvo_lvds_pnp_id { + struct bdb_edid_pnp_id pnp_id[4]; +} __packed; + /* * Block 27 - eDP VBT Block */ From patchwork Fri May 3 12:24:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652712 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 61BA7C25B5C for ; Fri, 3 May 2024 12:26:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EFC1B1128D8; Fri, 3 May 2024 12:26:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="MLVqg7YO"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 388971128D8 for ; Fri, 3 May 2024 12:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739160; x=1746275160; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=7ZfQEL3ls4v8siFiywqzOmhWSme4p3Qp/Ytz3mxtTnY=; b=MLVqg7YOrDS8ipAU2zFVExmto5uXGOoqinl9BQ0YwdEEB0/JRNwsFPVC 2XtTRgSeDr9/F7GfpcJFAtZWVWDdNOQuYTynqxYwdv6wDqOUw8cV0/pD1 otvnfejsTmE0HsrknegBOzjGF4fYPOfSftlhfadIqJdtZfMAoXupdsrzH e/LwtGCZr4hsH6oiNERKnFubEaahqsX2WmQSzKPVdK1Zae6Ux4PU+pf7s 0ZaD3IBgNNTMmOH86C3lTkQAea3CZgUWvS2InFEUJ8oqu4lzijOyZAWgY CVq574O2n47x55sVAMQlcxL6MFlY6si31h80Bl+UOQkuRIhmF8LgBDmEZ Q==; X-CSE-ConnectionGUID: hCOjcdvWRjOuqZQY1hbg4A== X-CSE-MsgGUID: FmozCihtSeCtLOgK5FzD+g== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372782" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372782" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:00 -0700 X-CSE-ConnectionGUID: 1aEBQBQCTyOB1LVPf+7e9A== X-CSE-MsgGUID: ZaTN2DzQQ+iMbLZHXrQ/UQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463804" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:25:58 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:25:57 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 24/35] drm/i915/bios: Define VBT block 25 (SDVO LVDS PPS) contents Date: Fri, 3 May 2024 15:24:38 +0300 Message-ID: <20240503122449.27266-25-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 25 (SDVO LVDS PPS). Not 100% sure about the order of the fields as this is not documented in the VBT spec anymore, but this order matches what is included as part of the power sequencing SDVO commands (struct sdvo_panel_power_sequencing). Also the real world VBT data I have looks OK with this definition. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 8fe2ded884e3..c6d03905593d 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -972,6 +972,22 @@ struct bdb_sdvo_lvds_pnp_id { struct bdb_edid_pnp_id pnp_id[4]; } __packed; +/* + * Block 25 - SDVO LVDS PPS + */ + +struct sdvo_lvds_pps { + u16 t0; /* power on */ + u16 t1; /* backlight on */ + u16 t2; /* backlight off */ + u16 t3; /* power off */ + u16 t4; /* power cycle */ +} __packed; + +struct bdb_sdvo_lvds_pps { + struct sdvo_lvds_pps pps[4]; +} __packed; + /* * Block 27 - eDP VBT Block */ From patchwork Fri May 3 12:24:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652713 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 18E31C4345F for ; Fri, 3 May 2024 12:26:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7BE631128D3; Fri, 3 May 2024 12:26:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="SaU4aqWJ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 17B7F1128D3 for ; Fri, 3 May 2024 12:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739163; x=1746275163; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=yjuR5Tki33k7DBJDvm5GdU6YblBp6F7SJPd2j2aD8uQ=; b=SaU4aqWJ9kgligYamFTjK0j2eyVgMO86mPSwPvyJjdFn6yolT/GyzWVO dEqv87wgLvKpJDUNyyEz54hT1pdB6P1u6SumoIaFu4/D+NrNldiNw8nZK HOlTBBh4VSvVP7kn8xaaeV2k7Hnw1RJV7+/SSSPoP5anuvW53ImmLKFKc FpYFkGxsZe8Zr50iex5ecqaMI7FZapyz3mIcBAvSEi1lsF5GYH/ZKa3If 61pv5L/HU1jPa17STtK9V9f8S7ouc70vfl5QQs5Jfw+kKF7MgIg2BDFFl UuUtE5gcx0AmEIkizvH32IycjOPJN6kgBDD1RTYeXsdZ3V2swAkPjR2RL Q==; X-CSE-ConnectionGUID: JEV3pkeTQUaSKCYixirRXw== X-CSE-MsgGUID: UIkIou19Ts+dlGV3UhFTAw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372785" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372785" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:03 -0700 X-CSE-ConnectionGUID: b5/yEn3JRweBb/RzHIpghA== X-CSE-MsgGUID: TzzsO4opTaCxcxf9tgY8og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463830" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:01 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:00 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 25/35] drm/i915/bios: Define VBT block 26 (TV Options) contents Date: Fri, 3 May 2024 15:24:39 +0300 Message-ID: <20240503122449.27266-26-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 26 (TV Options). Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index c6d03905593d..1b94d4aba00a 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -988,6 +988,18 @@ struct bdb_sdvo_lvds_pps { struct sdvo_lvds_pps pps[4]; } __packed; +/* + * Block 26 - TV Options Block + */ + +struct bdb_tv_options { + u16 underscan_overscan_hdtv_component:2; + u16 rsvd1:10; + u16 underscan_overscan_hdtv_dvi:2; + u16 add_modes_to_avoid_overscan_issue:1; + u16 d_connector_support:1; +} __packed; + /* * Block 27 - eDP VBT Block */ From patchwork Fri May 3 12:24:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652714 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 34457C4345F for ; Fri, 3 May 2024 12:26:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A9AB31128DC; Fri, 3 May 2024 12:26:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CBcFnuaJ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0240B1128DC for ; Fri, 3 May 2024 12:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739166; x=1746275166; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=d4dN8NY9DvECg7dK3Tv9gm8a40trv7HvZypB9iNHQcQ=; b=CBcFnuaJVaU3z3epHVq1lYq02oF3nnVoInVPImUGcPP0fEsEyqPd+9HD MBEZzU/yhy/wLvZ/KwGHYLsKHgujErDYp7zxjRQxRctbd/sXCeEx9iSMy 0xIEqT9NyppDwV7Uw3rR3srYRfHfQaZBAbPlf0ZMA/UvsFn3hgCAs7Cb7 YY7PRZMBShT8HarVCyCFFQtsl7xOSxLEyoCJ3j+cdWwM/1eJorV4scF9F p/LLzIZkOPjg+dH3W3AhOPwVOq0aut6DlgXCujvkqPSRUFebbT26ShlSs Ol37rR2+IEJaAewLgyP6w3djKfi0OcrgFKnGwUJION+yvuGx8jVbQdNsm Q==; X-CSE-ConnectionGUID: x6qhPhk8Tbec7saNZNGJ0A== X-CSE-MsgGUID: Uh+G7oC0R3K162Bq/OUHSA== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372786" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372786" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:05 -0700 X-CSE-ConnectionGUID: kYmUxF5CROWUZCgi6LQtHQ== X-CSE-MsgGUID: iMSpZAZfRfu/Yz5oIu25hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463853" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:03 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:02 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 26/35] drm/i915/bios: Define VBT block 28 (EFP DTD) contents Date: Fri, 3 May 2024 15:24:40 +0300 Message-ID: <20240503122449.27266-27-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 28 (EFP DTD). Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 1b94d4aba00a..716a339f6e2a 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -167,6 +167,7 @@ enum bdb_block_id { BDB_SDVO_LVDS_PPS = 25, BDB_TV_OPTIONS = 26, BDB_EDP = 27, + BDB_EFP_DTD = 28, /* 161+ */ BDB_DISPLAY_SELECT_IVB = 29, /* 164+ */ BDB_DISPLAY_REMOVE_IVB = 30, /* 164+ */ BDB_DISPLAY_SELECT_HSW = 31, /* 166+ */ @@ -1072,6 +1073,14 @@ struct bdb_edp { u16 edp_dsc_disable; /* 251+ */ } __packed; +/* + * Block 28 - EFP DTD Block + */ + +struct bdb_efp_dtd { + struct bdb_edid_dtd dtd[3]; +} __packed; + /* * Block 29 - Toggle List Block (IVB) */ From patchwork Fri May 3 12:24:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652715 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 D78BFC4345F for ; Fri, 3 May 2024 12:26:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CAE51128E1; Fri, 3 May 2024 12:26:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="fKrxPHAm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 69FAD1128E1 for ; Fri, 3 May 2024 12:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739169; x=1746275169; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=rlnZDXLRCa9/qC959u2J7byVSX5YxLPBGM0ASibSHfk=; b=fKrxPHAmzrTTN469b1QpObNOL3N6oBTLvTlw6AFi44Ysiz1cLfMfJ4fU Dy5VcrWFIAoucC7Vi8K3K4evVpIlW8zYABPSNwmWvfnQpMHDz/4ms/mfF GeumPkGEnJJ1X42wjZiiSa5ghtMhZxkBpmFQpOdKHN+bIW3DIFQeA5sCG Z6LjLuYs/alR1RCzh65WHMADp2z62ige+WCbS9q69fWe0AQ30WFnJFR6+ TLOOpeH3ZzXy4cs2stF9R2dl62BrptAiV+Hwle0ZBR/izawZyNsFyNj68 rrjMaoR1Mfkjvmvu/CtPhcWBnhVRgc6gnzheLJkuuVVvmfMsw8GymqY23 Q==; X-CSE-ConnectionGUID: CZ+vkxYeQ0qZCiltzUdltg== X-CSE-MsgGUID: oeOHmgd9SU2ra40LfCuQhg== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372787" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372787" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:09 -0700 X-CSE-ConnectionGUID: 73rx5pXeTIiRS26g9dkbVQ== X-CSE-MsgGUID: /5ngNmqkRkG9xIyeMq6CFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463865" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:06 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:05 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 27/35] drm/i915/bios: Define VBT block 45 (eDP BFI) contents Date: Fri, 3 May 2024 15:24:41 +0300 Message-ID: <20240503122449.27266-28-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 45 (eDP BFI). Note that I've not actually seen any real world VBTs with this block. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 716a339f6e2a..87d073154d49 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -177,6 +177,7 @@ enum bdb_block_id { BDB_LFP_DATA = 42, BDB_LFP_BACKLIGHT = 43, BDB_LFP_POWER = 44, + BDB_EDP_BFI = 45, /* 160+ */ BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ @@ -1347,6 +1348,22 @@ struct bdb_lfp_power { struct aggressiveness_profile2_entry aggressiveness2[16]; /* 247+ */ } __packed; +/* + * Block 45 - eDP BFI Block + */ + +struct edp_bfi { + u8 enable_bfi_in_driver:1; + u8 enable_brightness_control_in_cui:1; + u8 reserved:6; + u8 brightness_percentage_when_bfi_disabled; +} __packed; + +struct bdb_edp_bfi { + u8 bfi_structure_size; + struct edp_bfi bfi[16]; +} __packed; + /* * Block 52 - MIPI Configuration Block */ From patchwork Fri May 3 12:24:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652716 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 C81C3C4345F for ; Fri, 3 May 2024 12:26:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51ABF1128E3; Fri, 3 May 2024 12:26:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IKXi/XYG"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4FBC1128E3 for ; Fri, 3 May 2024 12:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739172; x=1746275172; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=wbvVsrHRy5KVT8/41GHjnS7Jtkni0H7YiaKyfbM4Ns8=; b=IKXi/XYGw/qWQVYjLSRZLpCYbiZPQRgt79J7EBZ8ElE2a2uxo93iaRrN q7/zBPOIu73D1iEqCjxWDmTRs7C/9CI6bBsEarLuZXv0sGE/9OdN0IpHH kW7hywmPA4jY450FtOSllO6+2DR2HUeFH1MHUFgW1Y6prdtIhB9u+ItS5 1hPuIAYsIUgEG+uAESon/awd2F9SK6O85Jeq/0nJArm4oY8iVpUZU2hZ/ 1bgUMF1THD5Z13cIVAhjuvj2RCNTiYKNN3u5eYlMl9aKD+chg04TV+Xgc 7FMM00l8YRkjYqonuVJRilzKWYsfZwZLgMYGgSXQEj5gS41pwDr37tce2 w==; X-CSE-ConnectionGUID: pGIrWIYGRaC1fdvtuPedzA== X-CSE-MsgGUID: P8F94DalSt6qu4v5rX5X0Q== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372788" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372788" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:11 -0700 X-CSE-ConnectionGUID: wRW7W2W1S+ikLJsm7byhHg== X-CSE-MsgGUID: Qz/8aDnITrOZtyA7ohN6tA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463877" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:09 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:08 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 28/35] drm/i915/bios: Define VBT block 46 (Chromaticity For Narrow Gamut Panel) contents Date: Fri, 3 May 2024 15:24:42 +0300 Message-ID: <20240503122449.27266-29-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 46 (Chromaticity For Narrow Gamut Panel). One entry per panel. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 87d073154d49..5f1f485f8bf7 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -178,6 +178,7 @@ enum bdb_block_id { BDB_LFP_BACKLIGHT = 43, BDB_LFP_POWER = 44, BDB_EDP_BFI = 45, /* 160+ */ + BDB_CHROMATICITY = 46, /* 169+ */ BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ @@ -1364,6 +1365,31 @@ struct bdb_edp_bfi { struct edp_bfi bfi[16]; } __packed; +/* + * Block 46 - Chromaticity For Narrow Gamut Panel Configuration Block + */ + +struct chromaticity { + u8 chromaticity_enable:1; + u8 chromaticity_from_edid_base_block:1; + u8 rsvd:6; + + u8 red_green; + u8 blue_white; + u8 red_x; + u8 red_y; + u8 green_x; + u8 green_y; + u8 blue_x; + u8 blue_y; + u8 white_x; + u8 white_y; +} __packed; + +struct bdb_chromaticity { + struct chromaticity chromaticity[16]; +} __packed; + /* * Block 52 - MIPI Configuration Block */ From patchwork Fri May 3 12:24:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652717 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 C9AB4C4345F for ; Fri, 3 May 2024 12:26:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BCA91128E5; Fri, 3 May 2024 12:26:16 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mVwnYLeg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 079051128E6 for ; Fri, 3 May 2024 12:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739175; x=1746275175; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=miSOVHPdc2RUpSW5CuXVUu9sEmouadbKRzFpYLA1Rwg=; b=mVwnYLegSWG+P73Sg647x1YGall0Vwd8/SJykcx0kgt9u8IdbV64Vnj2 hfc3jgKVr6BGeZKdUeZnQOtk2govtOA5pf5OT4W7ICgFvyuayZBj7s5DW VRgUpQHCQKXYzTqUCGa4pLXUoJS0YamzngatNJFjALxHtub88f9oYDOYL 3WRV2iK0tu9XkibTWaVa8BLR3qAjNPaa3pOlwioVdNoxf03qqh/QEIyeG K74tHbxkPZIAOSmoFVFVXVzMyJoQ495kU8GhGzgChLcmam9OIveNqWfWl CnYmgN0s/HcJt77aoWAQogE0Qp+u3nqzUf2Bt0QAj9Ki2EXAlfGRjv2zS w==; X-CSE-ConnectionGUID: Aa9UHIEzSMmTzAUP9zHY+A== X-CSE-MsgGUID: N1Mjn5SrQniqoY8LEh2zPw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372792" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372792" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:14 -0700 X-CSE-ConnectionGUID: YB2s7wDjQgOU1kIJ2RP05A== X-CSE-MsgGUID: zbV7V+3QR223B4W7UDlH0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463901" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:12 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:11 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 29/35] drm/i915/bios: Define VBT block 51 (Fixed Set Mode Table) contents Date: Fri, 3 May 2024 15:24:43 +0300 Message-ID: <20240503122449.27266-30-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 51 (Fixed Set Mode Table). Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 5f1f485f8bf7..8b4f76c54829 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -179,6 +179,7 @@ enum bdb_block_id { BDB_LFP_POWER = 44, BDB_EDP_BFI = 45, /* 160+ */ BDB_CHROMATICITY = 46, /* 169+ */ + BDB_FIXED_SET_MODE = 51, /* 172+ */ BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ @@ -1390,6 +1391,16 @@ struct bdb_chromaticity { struct chromaticity chromaticity[16]; } __packed; +/* + * Block 51 - Fixed Set Mode Table + */ + +struct bdb_fixed_set_mode { + u8 enable; + u32 x_res; + u32 y_res; +} __packed; + /* * Block 52 - MIPI Configuration Block */ From patchwork Fri May 3 12:24:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652718 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 51A0EC4345F for ; Fri, 3 May 2024 12:26:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B27AB1128DA; Fri, 3 May 2024 12:26:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Y4rYqJyW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 44C4C1128DA for ; Fri, 3 May 2024 12:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739177; x=1746275177; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=wQ6PNAOFZaFpuhPVffF1+QixX3YgzvFbRhsvTRjHuMI=; b=Y4rYqJyWlSfV8ak4Pp0RGfrX8ZzXddOCJ+YWin+V2UE7mbN7tmZIrOn1 TJryo2dwXFnsvA308GRihOkUsg9ngCyQWc+EXy5bDlJXluwfqAqJVyulQ e62Zn91Nh3m5l5Ycf3I6sZl6zlRcHifvKLAJsFk4e1EjPtlPgK/F/43b0 rDODnEsHddFigfSjbsLCyfCV+0kBYnlq8lqIhl1EfJytaCdv1cZ2cs0Tn 6J+CIcYSW/5PuoWyPqdzF54WwNkzd+Sue19stLt8rAzoyYkgrcTExwhkV TwMc38aHMBVTsSJ/Hg1sJBURnJJgwLLzrH+gYdC//3V1pDqT18BeWJzdj w==; X-CSE-ConnectionGUID: 6zQxmMUVQheTkmddXgZypA== X-CSE-MsgGUID: e/6azeMmQTiP8dn+/fWDTw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372794" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372794" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:17 -0700 X-CSE-ConnectionGUID: 6lX9nHbxSeqoNVqVoSs3IA== X-CSE-MsgGUID: hNfb7InaRaOg5StVG707xA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463914" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:15 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:14 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 30/35] drm/i915/bios: Define VBT block 55 (RGB Palette Table) contents Date: Fri, 3 May 2024 15:24:44 +0300 Message-ID: <20240503122449.27266-31-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 55 (RGB Palette Table). Note that I've not actually seen any real world VBTs with this block. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 8b4f76c54829..50d0d96fca67 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -182,6 +182,7 @@ enum bdb_block_id { BDB_FIXED_SET_MODE = 51, /* 172+ */ BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ + BDB_RGB_PALETTE = 54, /* 180+ */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ BDB_GENERIC_DTD = 58, /* 229+ */ BDB_SKIP = 254, /* VBIOS only */ @@ -1423,6 +1424,17 @@ struct bdb_mipi_sequence { u8 data[]; /* up to 6 variable length blocks */ } __packed; +/* + * Block 55 - RGB Palette Table + */ + +struct bdb_rgb_palette { + u8 is_enabled; + u8 red[256]; + u8 blue[256]; + u8 green[256]; +} __packed; + /* * Block 56 - Compression Parameters */ From patchwork Fri May 3 12:24:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652724 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 5DC58C4345F for ; Fri, 3 May 2024 12:26:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D82AF1128E2; Fri, 3 May 2024 12:26:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IAfGWU0V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F1431128E2 for ; Fri, 3 May 2024 12:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739181; x=1746275181; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=aVUrtHaIn73xfOQmMtQKUf4rHAWuggr9MBAMQxJ30Tg=; b=IAfGWU0V06ZeNGdQfx0VWG5OLGSn7EVImMdxm3BjXeQp71+50lRcPzJj rxNX3+DTH2B+DbwBLdRUMxGMnNRyTPNiojx0v9wM7oPBFPII4jp6sDvWW P2ACdMWIE0jIsxys2r7DOUBlsAs6q48sdrt5aCQ93G6c+YBhTlF/7zUV4 cvnswLYhhwjFE/kczQB+kmCQ1kXGiWT2l++VKHD6Z/QOeNUgZpQHO4Lnc dJRR0bFwCJBaHSrop21dQn4QEByCZXQQneN3ZbWPIWr4BzN15gyc4xl4U pQZe6noCpXGLTNEz4Mh47/uTOC6MUglY5z7lu4itWZWFdKPYajP/C3vl/ A==; X-CSE-ConnectionGUID: WZuKf6MGQkqd2OJlEc1O8A== X-CSE-MsgGUID: EbH/qqTOR2S1nM+DHyLC0w== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372796" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372796" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:21 -0700 X-CSE-ConnectionGUID: pYvCYlzVQMaZjt5X1hQYZQ== X-CSE-MsgGUID: 4gM0rjR8S9CqsyHtmALA5g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463932" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:17 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:17 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 31/35] drm/i915/bios: Define VBT block 57 (Vswing PreEmphasis Table) contents Date: Fri, 3 May 2024 15:24:45 +0300 Message-ID: <20240503122449.27266-32-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 57 (Vswing PreEmphasis Table). The contents is highly platform specific. The columns of the table corresponding to some set of PHY/etc registers. The rows corresponding to all legal vswing+pre-emphasis combinations (ie. should be 10 rows in each table). And each table corresponds to a platform specific (mostly undocumented) mapping based on link rate/eDP low-vswing/etc. parameters. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 50d0d96fca67..0e5a2bf429f4 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -184,6 +184,7 @@ enum bdb_block_id { BDB_MIPI_SEQUENCE = 53, /* 177+ */ BDB_RGB_PALETTE = 54, /* 180+ */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ + BDB_VSWING_PREEMPH = 57, /* 218+ */ BDB_GENERIC_DTD = 58, /* 229+ */ BDB_SKIP = 254, /* VBIOS only */ }; @@ -1486,6 +1487,16 @@ struct bdb_compression_parameters { struct dsc_compression_parameters_entry data[16]; } __packed; +/* + * Block 57 - Vswing PreEmphasis Table + */ + +struct bdb_vswing_preemph { + u8 num_tables; + u8 num_columns; + u32 tables[]; +} __packed; + /* * Block 58 - Generic DTD Block */ From patchwork Fri May 3 12:24:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652725 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 D4CE5C10F16 for ; Fri, 3 May 2024 12:26:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A2E51128EB; Fri, 3 May 2024 12:26:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="k4V2ehW8"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15C921128E8 for ; Fri, 3 May 2024 12:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739183; x=1746275183; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=EhjkhNPOIfrOFZ8oaYh5kqcZf2whY35pKVuZt+OdzF0=; b=k4V2ehW8qq2syu91CVZYjaosG8cz+SooHvHIZw1HDG8QCT48etXmJH8G /xLV0wzIJFHHz03lNIcN3lc/vWbBqYqkxKalH+4WygeLJCxphfDroQmuh ynn44v85wTTYfbNIQwqYI7fJF3cwFMtHl1gwbchlkXDGr+x9MrzutDZZ0 OpKk8VRdq2m+UGLT1NxE3pfy3Yx3NdzBXO1X0p7MiFHQ3857+8WQy8au4 /XyO04rYGgCyJDRZlBxonWPemh6KNbn1hzigOqKnMgMSJdFonm8UcmkhD XjnRBYlpnIEsapq26JqUXbJ73SgS1qZjgQiJC+wFnUPYzDqkm5+CKIfSE g==; X-CSE-ConnectionGUID: VEsx9Np2Q8qBeQ+IuQJnJw== X-CSE-MsgGUID: Gz5ExaKYRa+PlrMNcnXfnQ== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372797" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372797" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:23 -0700 X-CSE-ConnectionGUID: BYx5cOTLSXC8nbw9/SIWrg== X-CSE-MsgGUID: aVWIKSrBTfeTxO4XHOTqnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463945" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:20 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:20 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 32/35] drm/i915/bios: Define VBT block 50 (MIPI) contents Date: Fri, 3 May 2024 15:24:46 +0300 Message-ID: <20240503122449.27266-33-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 50 (MIPI). This was some easly attempt at a MIPI DSI stuff. I'm not sure this was ever actually used (I certainly don't have any VBTs with this block), but here's some kind of definition for it anyway. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 0e5a2bf429f4..3bcb9fb5b706 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -179,6 +179,7 @@ enum bdb_block_id { BDB_LFP_POWER = 44, BDB_EDP_BFI = 45, /* 160+ */ BDB_CHROMATICITY = 46, /* 169+ */ + BDB_MIPI = 50, /* 170-172 */ BDB_FIXED_SET_MODE = 51, /* 172+ */ BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ @@ -1393,6 +1394,52 @@ struct bdb_chromaticity { struct chromaticity chromaticity[16]; } __packed; +/* + * Block 50 - MIPI Block + */ + +struct mipi_data { + u16 panel_identifier; + u16 bridge_revision; + + u32 dithering:1; + u32 pixel_format_18bpp:1; + u32 reserved1:1; + u32 dphy_params_valid:1; + u32 reserved2:28; + + u16 port_info; + + u16 reserved3:2; + u16 num_lanes:2; + u16 reserved4:12; + + u16 virtual_channel_num:2; + u16 video_transfer_mode:2; + u16 reserved5:12; + + u32 dsi_ddr_clock; + u32 renesas_bridge_ref_clock; + u16 power_conservation; + + u32 prepare_count:5; + u32 reserved6:3; + u32 clk_zero_count:8; + u32 trail_count:5; + u32 reserved7:3; + u32 exit_zero_count:6; + u32 reserved8:2; + + u32 high_low_switch_count; + u32 lp_byte_clock; + u32 clock_lane_switch_time_counter; + u32 panel_color_depth; +} __packed; + +struct bdb_mipi { + struct mipi_data mipi[16]; +} __packed; + /* * Block 51 - Fixed Set Mode Table */ From patchwork Fri May 3 12:24:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652726 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 45D5DC4345F for ; Fri, 3 May 2024 12:26:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C35DD1128F8; Fri, 3 May 2024 12:26:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="D2o3w8kc"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 987971128E8 for ; Fri, 3 May 2024 12:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739186; x=1746275186; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=F6Vu9KhVVBRA0clGIqfWHNEgfIB9BZLMSdg0hlchBSo=; b=D2o3w8kcMxuBNkX++9zbVyX0D2uG728PV/IGeneQqWjXOTBWHMiuVFM1 zjOcn0mjPFV6kLY7RjTMl/hnEK+dLDiK9WNMSDprh/HiUiXkk+LzL4zZG 2JQ4nsWEq0R5x8F1AIs/INVJG/3t5DJ36a9eDRW5gZtkQjji9CUEnND3M f0VSzv9Z2J6YXuUp07RuRy1qJcGOJFsPn74ovSN9w8FWtaiq0tylag1gQ N2slZdiO3YGRWoCqGORRLX2pfwmCpeWrzAfv28Q9zyxYb7m0SBce6dhD+ VP/xS93DOIS/JjQFlofmdmb3y03XcvGMrP2rY+++s0sKF+1N05c9L3RNd Q==; X-CSE-ConnectionGUID: lAe7r3GERcy7HyOPyJzQlA== X-CSE-MsgGUID: FtrDqAZmRAyCKmO1Za2gVw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372799" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372799" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:26 -0700 X-CSE-ConnectionGUID: ZIHcKcWVQO2lBwbjaEPRoQ== X-CSE-MsgGUID: 3b9xdm+3SBWsd/nISmaxIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463951" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:23 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:22 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 33/35] drm/i915/bios: Define VBT block 55 (Compression Parameters) Date: Fri, 3 May 2024 15:24:47 +0300 Message-ID: <20240503122449.27266-34-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of the obsolete VBT block 55 (Compression Parameters). This was some early attempt at defining the compression parameters. However the spec says: "This block is obsolete and should not be consumed for any compression programming." Block 56 is the replacement that should actually be used. So let's just name the obsolete old block but not even bother defining the contents. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 3bcb9fb5b706..ea2edac842b0 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -184,6 +184,7 @@ enum bdb_block_id { BDB_MIPI_CONFIG = 52, /* 175+ */ BDB_MIPI_SEQUENCE = 53, /* 177+ */ BDB_RGB_PALETTE = 54, /* 180+ */ + BDB_COMPRESSION_PARAMETERS_OLD = 55, /* 198-212 */ BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ BDB_VSWING_PREEMPH = 57, /* 218+ */ BDB_GENERIC_DTD = 58, /* 229+ */ From patchwork Fri May 3 12:24:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652727 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 5C8D8C10F16 for ; Fri, 3 May 2024 12:26:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D1A31112903; Fri, 3 May 2024 12:26:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WyewmfPM"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6C651128FB for ; Fri, 3 May 2024 12:26:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739189; x=1746275189; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=MW3YFDEhMphDku5/hpc+Rw8UBWwvzlvgbXdWops6etw=; b=WyewmfPMDIVQVun/cel667Do2v1tXviXjdmIiVsj+6zfztkQE5X1dHkE bQKkYzPcz72juk33+aPuhT6JAR9EfF8djt6NS3XdZTgtkHWBtUNfwsM0W ifMYJaWXqJKkBQBBoOM3+9kmwPpc3gG03ry/bdbcp134M3XwXoUnuHP0e zal9xxFxcUj+d0dXPGl/irwu6BpF01/mQbycwFsHIXZw6rwhnd7e0HK47 D8/wGYvYHh0FM0qPlert3XEPkj/+Xb1wUmxpD+y3u9rpPwVdCgEaV9rxe QuS8A/VhwpYMkNLBrp0mx+ZwvWxebepiPdm1GKioZidD7BQOY0DNVzld0 w==; X-CSE-ConnectionGUID: G/IzABc1TQ24IuQyzg1/Qg== X-CSE-MsgGUID: kajN27CAQtKt3vaL/AS6Ow== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372801" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372801" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:28 -0700 X-CSE-ConnectionGUID: 6YHKDK+QRpSBLn8Qr07P/A== X-CSE-MsgGUID: HYDGpwNcTxq2O8DZxhLb4w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463959" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:26 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:25 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 34/35] drm/i915/bios: Define VBT block 252 (int15 Hook) Date: Fri, 3 May 2024 15:24:48 +0300 Message-ID: <20240503122449.27266-35-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Declare that VBT block 252 is the "int15 hook". This is some VBIOS only juju so don't bother with a full definition. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index ea2edac842b0..338f6133bb1e 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -188,6 +188,7 @@ enum bdb_block_id { BDB_COMPRESSION_PARAMETERS = 56, /* 213+ */ BDB_VSWING_PREEMPH = 57, /* 218+ */ BDB_GENERIC_DTD = 58, /* 229+ */ + BDB_INT15_HOOK = 252, /* VBIOS only */ BDB_SKIP = 254, /* VBIOS only */ }; From patchwork Fri May 3 12:24:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13652728 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 CD5CFC4345F for ; Fri, 3 May 2024 12:26:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D44F11290B; Fri, 3 May 2024 12:26:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bOI6Txwr"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5EEFC11290B for ; Fri, 3 May 2024 12:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714739192; x=1746275192; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=WqUQx2hyTAbceSRswype6IxpgKGlX1DuC6HUsxgNDFc=; b=bOI6TxwrIDwJpfFTZDgdI2eLG902ICI3/iGtCbpYxfods6lDCpLu4zJU uz2slKLDjGSnbUkeTkUOTsyQIKUEM7qWp/MnT4fIn4NG/LAN8kbCwxeMd JvIF/V+N2ACtfzH7OGCXUMZ0aMSc7+leZrcmrwpQnIXh+5adhMjs1TLij r9mJhtGFfHfjjQF5AbBsaSTOKFvBpYFWjBMpIHEzoNhAae95Whtkhrsqb ZooaQFrXU3RY8NP1KPMGRG15bST6jnQpKpYfLkbCtLJMI5R4424icWSJK Asj5GmT3yn9itshT6HOMnMRXkj81Pe2CFuz62poFztOrWd7+Ev2km1sjx A==; X-CSE-ConnectionGUID: y8HH/Ij4SCqPPUQQx69bIg== X-CSE-MsgGUID: jF8gXtJQTsG4xryldyFwhw== X-IronPort-AV: E=McAfee;i="6600,9927,11062"; a="10372805" X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="10372805" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2024 05:26:31 -0700 X-CSE-ConnectionGUID: Mjy+E28PTMGaeXvVQofCBQ== X-CSE-MsgGUID: TtGWKs7MSvy1+rkYMQ1R+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,251,1708416000"; d="scan'208";a="27463970" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 03 May 2024 05:26:29 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 May 2024 15:26:28 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 35/35] drm/i915/bios: Define VBT block 253 (PRD Table) contents Date: Fri, 3 May 2024 15:24:49 +0300 Message-ID: <20240503122449.27266-36-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503122449.27266-1-ville.syrjala@linux.intel.com> References: <20240503122449.27266-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 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" From: Ville Syrjälä Define the contents of VBT block 253 (PRD Table). Unfortunately the block has two definitions, with the cutoff supposedly happening on ICL vs. TGL. Also according to some notes it might be that the VBIOS (if that's still a thing) still uses the old definition even on TGL+. Quite the mess. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_vbt_defs.h | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h index 338f6133bb1e..9d5b87ff1728 100644 --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h @@ -189,6 +189,7 @@ enum bdb_block_id { BDB_VSWING_PREEMPH = 57, /* 218+ */ BDB_GENERIC_DTD = 58, /* 229+ */ BDB_INT15_HOOK = 252, /* VBIOS only */ + BDB_PRD_TABLE = 253, BDB_SKIP = 254, /* VBIOS only */ }; @@ -1576,4 +1577,29 @@ struct bdb_generic_dtd { struct generic_dtd_entry dtd[]; /* up to 24 DTD's */ } __packed; +/* + * Block 253 - PRD Table + */ + +struct prd_entry_old { + u8 displays_attached; + u8 display_in_pipe_a; + u8 display_in_pipe_b; +} __packed; + +struct bdb_prd_table_old { + struct prd_entry_old list[0]; /* ???-216 */ + u16 num_entries; /* ???-216 */ +} __packed; + +struct prd_entry_new { + u16 primary_display; + u16 secondary_display; +} __packed; + +struct bdb_prd_table_new { + u16 num_entries; /* 217+ */ + struct prd_entry_new list[]; /* 217+ */ +} __packed; + #endif /* _INTEL_VBT_DEFS_H_ */