From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Louis Chauvet" <louis.chauvet@bootlin.com>,
<igt-dev@lists.freedesktop.org>
Cc: <thomas.petazzoni@bootlin.com>, <markyacoub@google.com>,
<khaled.almahallawy@intel.com>,
"igt-dev" <igt-dev-bounces@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v4 17/46] lib/unigraf: Add used defines for TSI_Types
Date: Wed, 21 Jan 2026 18:49:50 +0100 [thread overview]
Message-ID: <DFUGGY0CG33Q.828539M5UNFK@bootlin.com> (raw)
In-Reply-To: <20251110-unigraf-integration-v4-17-0fc7bb1b4101@bootlin.com>
Hi Louis,
On Mon Nov 10, 2025 at 2:39 PM CET, Louis Chauvet wrote:
> Current unigraf public release are not c-compatible, this file hardcode
> some values. One future release of libTSI may include a c-compatible
> TSI_types.h file with full structure definition, but until then.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> ---
> lib/unigraf/TSI_types.h | 117 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 117 insertions(+)
>
> diff --git a/lib/unigraf/TSI_types.h b/lib/unigraf/TSI_types.h
> new file mode 100644
> index 000000000000..f854c500a82c
> --- /dev/null
> +++ b/lib/unigraf/TSI_types.h
> @@ -0,0 +1,117 @@
> +/* SPDX-License-Identifier: MIT */
> +
> +// DO NOT MERGE THIS FILE
What do you mean? Shoudl this patch be applied or not? Maybe it's a
leftover from the RFC v1?
> +//
> +// Current unigraf public release are not c-compatible, this file hardcode some values
Add a '.' at end of sentence.
> +// The next release of libTSI should include a c-compatible TSI_types.h file, that will
> +// be directly used in place of this file
Here too.
> +
> +#include <stdbool.h>
> +#include <stdint.h>
> +#ifndef TSI_REG_H
If I got what you mena here, this should be before the includes, and should
be followed by a #define TSI_REG_H.
> +
> +#define TSI_VERSION_TEXT 0x80000001
> +#define TSI_DEVCAP_VIDEO_CAPTURE 0x00000001
> +#define TSI_SEARCHOPTIONS_SHOW_DEVICES_IN_USE 0x00000001
> +
> +#define TSI_EDID_TE_INPUT 0x1100
> +#define TSI_EDID_SELECT_STREAM 0x1102
> +
> +#define TSI_BASE_LEGACY_GENERIC(offset) (0x210 + (offset))
> +#define TSI_FORCE_HOT_PLUG_STATE_W TSI_BASE_LEGACY_GENERIC(0x2)
^
Tab instead of space
> +
> +#define TSI_BASE_LEGACY_DPRX_MSA(offset) (0x260 + (offset))
> +#define TSI_DPRX_MSA_COMMAND_W TSI_BASE_LEGACY_DPRX_MSA(0x0)
^
Tab instead of space
> +#define TSI_DPRX_MSA_STREAM_COUNT_R TSI_BASE_LEGACY_DPRX_MSA(0x1)
> +#define TSI_DPRX_MSA_STREAM_SELECT TSI_BASE_LEGACY_DPRX_MSA(0x3)
> +#define TSI_DPRX_MSA_HTOTAL_R TSI_BASE_LEGACY_DPRX_MSA(0x6)
> +#define TSI_DPRX_MSA_VTOTAL_R TSI_BASE_LEGACY_DPRX_MSA(0x7)
> +#define TSI_DPRX_MSA_HACTIVE_R TSI_BASE_LEGACY_DPRX_MSA(0x8)
> +#define TSI_DPRX_MSA_VACTIVE_R TSI_BASE_LEGACY_DPRX_MSA(0x9)
> +#define TSI_DPRX_MSA_HSYNC_WIDTH_R TSI_BASE_LEGACY_DPRX_MSA(0xa)
> +#define TSI_DPRX_MSA_VSYNC_WIDTH_R TSI_BASE_LEGACY_DPRX_MSA(0xb)
> +#define TSI_DPRX_MSA_HSTART_R TSI_BASE_LEGACY_DPRX_MSA(0xc)
> +#define TSI_DPRX_MSA_VSTART_R TSI_BASE_LEGACY_DPRX_MSA(0xd)
> +
> +#define TSI_DPRX_LINK_FLAGS_MST 0x01
> +#define TSI_DPRX_LINK_FLAGS_TPS3 0x02
> +#define TSI_DPRX_LINK_FLAGS_TPS4 0x03
> +#define TSI_DPRX_LINK_FLAGS_EDP 0x04
> +#define TSI_DPRX_NOT_DOCUMENTED_DP_128_132_SUPPORTED 0x10
> +#define TSI_DPRX_NOT_DOCUMENTED_SIDEBAND_MSG_SUPPORT 0x20
> +
> +#define TSI_BASE_DPRX(offset) (0x50000000u + 0x21000 + (offset))
> +#define TSI_DPRX_HW_CAPS_R TSI_BASE_DPRX(0x4)
> +
> +/**
> + * struct TSI_DPRX_HW_CAPS_R_s - Structure representing the hardware capabilities of the DP RX.
> + *
> + * This structure defines the bitfields and fields that describe the hardware
> + * capabilities of the DP RX (DisplayPort Receiver) interface. Each field
> + * corresponds to a specific capability or feature supported by the hardware.
> + *
> + * This structure is used to interpret the value read from the
> + * TSI_DPRX_HW_CAPS_R register.
> + *
> + * @mst: MST support
> + * @hdcp_1_x: HDCP 1.x support.
> + * @hdcp_2_x: HDCP 2.x support.
> + * @fec_8_10_b: FEC for 8/10 link support.
> + * @dsc_8_10_b: DSC for 8/10 link support.
> + * @three_lanes: Three lane link configuration support.
> + * @edp_link_rate: eDP link rate support.
I thought this was a rate (an amount of bits per time unit or so) but it's
a bool, so perhaps it means "eDP link rates are supported" or similar I
guess. Can you clarify?
If my guess is right, this could be renamed edp_link_rates_supported for
clarity.
> + * @mst_stream_count: Number of MST streams supported.
> + * @max_link_rate: Maximum link rate supported.
And I guess it is an amount (it's not a bool), so what's the unit?
> + * @force_link_config: Forced link configuration support.
> + * @power_provision: Power provision support on DP_PWR pin of receptacle connector.
> + * @aux_swing_voltage_control: AUX output voltage swing control support.
> + * @custom_dp_rate: Custom DP 2.0 rate support.
> + * @custom_bit_rate: Custom bit rate support.
> + * @fec_128_132_b: FEC for 128/132 link support.
> + * @dsc_128_132_b: DSC for 128/132 link support.
> + */
> +struct TSI_DPRX_HW_CAPS_R_s {
> + bool mst:1;
> + bool hdcp_1_x:1;
> + bool hdcp_2_x:1;
> + bool fec_8_10_b:1;
> + bool dsc_8_10_b:1;
> + bool reserved_1:1;
> + bool three_lanes:1;
> + bool edp_link_rate:1;
Sure the rate is bool? BTW knowing the unit would help finding the
answer. :)
> + uint8_t mst_stream_count:3;
> + uint8_t reserved_2:5;
> + uint8_t max_link_rate;
> + bool force_link_config:1;
> + bool reserved_3:1;
> + bool power_provision:1;
> + bool aux_swing_voltage_control:1;
> + bool custom_dp_rate:1;
> + bool custom_bit_rate:1;
> + bool fec_128_132_b:1;
> + bool dsc_128_132_b:1;
> +};
> +
> +#define TSI_DPRX_LT_LANE_COUNT_R TSI_BASE_DPRX(0x0B)
> +#define TSI_DPRX_LT_RATE_R TSI_BASE_DPRX(0x0C)
> +#define TSI_DPRX_HPD_FORCE TSI_BASE_DPRX(0x12)
> +#define TSI_DPRX_MST_SINK_COUNT TSI_BASE_DPRX(0x9D)
> +
> +#define TSI_BASE_DP_RX(offset) (0x00010100 + (offset))
> +#define TSI_DP_RX_DUT_MAX_LANE_COUNT TSI_BASE_DP_RX(0xf)
> +
> +#define TSI_BASE_DP_LTT(offset) (0x00010700 + (offset))
> +#define TSI_DP_LTT_MAX_LANE_COUNT TSI_BASE_DP_LTT(0x01)
> +
> +#define TSI_BASE_LEGACY_DPRX(offset) (0x2b0 + (offset))
> +#define TSI_DPRX_DPCD_BASE_W TSI_BASE_LEGACY_DPRX(0x9)
> +#define TSI_DPRX_DPCD_DATA TSI_BASE_LEGACY_DPRX(0xA)
> +#define TSI_DPRX_MAX_LANES TSI_BASE_LEGACY_DPRX(0x10)
> +#define TSI_DPRX_MAX_LINK_RATE TSI_BASE_LEGACY_DPRX(0x11)
> +#define TSI_DPRX_LINK_FLAGS TSI_BASE_LEGACY_DPRX(0x12)
> +#define TSI_DPRX_STREAM_SELECT TSI_BASE_LEGACY_DPRX(0x13)
> +#define TSI_DPRX_CRC_R_R TSI_BASE_LEGACY_DPRX(0x14)
> +#define TSI_DPRX_CRC_G_R TSI_BASE_LEGACY_DPRX(0x15)
> +#define TSI_DPRX_CRC_B_R TSI_BASE_LEGACY_DPRX(0x16)
> +#define TSI_DPRX_HPD_PULSE_W TSI_BASE_LEGACY_DPRX(0x1B)
> +#endif
A comment would be nice:
#endif /* TSI_REG_H */
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-01-21 17:49 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 13:39 [PATCH i-g-t v4 00/46] Unigraf integration Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 01/46] lib/igt_kms: Add a detect timeout value Louis Chauvet
2026-01-20 21:09 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 02/46] lib/igt_kms: Add helper to wait for a specific status on a connector Louis Chauvet
2026-01-20 21:09 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 03/46] lib/igt_kms: Add function to list connected connectors Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 04/46] lib/igt_kms: Add helper to obtain a connector by its name or MST path Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 05/46] lib/igt_kms: Add helper to wait for new connectors Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 06/46] lib/igt_kms: Add helper to get a pipe from a connector Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2026-01-22 15:50 ` Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 07/46] lib/igt_kms: Expose dump_connector_attrs Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 08/46] lib/igt_kms: Expose reset_connectors_at_exit Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 09/46] lib/igt_kms: Expose connector_attr_set and igt_connector_attr_set Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 10/46] lib/igt_debugfs: Move debugfs helpers to the proper location Louis Chauvet
2026-01-20 21:10 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 11/46] lib/igt_debugfs: Add const when make sense Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 12/46] lib/igt_amd: " Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 13/46] lib/igt_kms: " Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 14/46] lib/monitor_edids: Add helper functions for using monitor_edid objects Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 15/46] lib/monitor_edids: Add helper to get an EDID by its name Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 16/46] lib/monitor_edids: Add helper to print all available EDID names Louis Chauvet
2026-01-20 21:11 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 17/46] lib/unigraf: Add used defines for TSI_Types Louis Chauvet
2026-01-21 17:49 ` Luca Ceresoli [this message]
2026-01-22 16:40 ` Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 18/46] lib/unigraf: Add TSI.h Louis Chauvet
2026-01-21 17:49 ` Luca Ceresoli
2026-01-22 16:53 ` Louis Chauvet
2026-01-23 14:04 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 19/46] lib/unigraf: Initial Unigraf support Louis Chauvet
2026-01-21 18:23 ` Luca Ceresoli
2026-01-21 18:30 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 20/46] lib/igt_kms: Automatically connect unigraf on display require Louis Chauvet
2026-01-22 20:26 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 21/46] lib/unigraf: Introduce device configuration Louis Chauvet
2026-01-23 17:38 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 22/46] lib/unigraf: Introduce role configuration Louis Chauvet
2026-01-26 11:28 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 23/46] lib/unigraf: Introduce input configuration Louis Chauvet
2026-01-23 17:38 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 24/46] lib/unigraf: Add reset function Louis Chauvet
2026-01-23 17:39 ` Luca Ceresoli
2026-01-26 10:45 ` Louis Chauvet
2026-01-26 11:28 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 25/46] lib/unigraf: Add unigraf assert and deassert helpers Louis Chauvet
2026-01-23 17:40 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 26/46] lib/unigraf: Add plug/unplug helpers Louis Chauvet
2026-01-23 17:40 ` Luca Ceresoli
2026-01-26 11:28 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 27/46] lib/unigraf: Allows sst/mst configuration Louis Chauvet
2026-01-23 17:40 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 28/46] lib/unigraf: Add helpers to read and write edid Louis Chauvet
2026-01-23 17:40 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 29/46] lib/unigraf: Add connector configuration Louis Chauvet
2026-01-26 11:40 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 30/46] tests/unigraf: Add basic unigraf tests Louis Chauvet
2026-01-26 12:00 ` Luca Ceresoli
2025-11-10 13:39 ` [PATCH i-g-t v4 31/46] lib/unigraf: Add unigraf CRC capture Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 32/46] lib/unigraf: Add configuration for CRC usage Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 33/46] lib/unigraf: add unigraf_get_connector_by_stream Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 34/46] lib/unigraf: Add helper to check timings received by unigraf Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 35/46] lib/igt_pipe_crc: Add ungiraf crc calculation Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 36/46] lib/unigraf: Add lane count configuration Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 37/46] docs/unigraf: Add unigraf documentation Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 38/46] lib/unigraf: Add helpers to set maximum link rate Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 39/46] lib/i915/dp: Move DP-related function for i915 to proper folder Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 40/46] lib/i915/dp: Rename functions to avoid confusion Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 41/46] lib/i915/dp: Add helper to get maximum supported rate Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 42/46] lib/igt_dp: Create generic helpers for DP information Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 43/46] lib/igt_kms: Add asserts to avoid null pointer dereference Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 44/46] lib/igt_kms: Add helper to get a pipe from an output Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 45/46] lib/unigraf: Add helpers to get the current LT status Louis Chauvet
2025-11-10 13:39 ` [PATCH i-g-t v4 46/46] tests/unigraf/unigraf_lt: Add test for link training Louis Chauvet
2025-11-10 22:34 ` ✓ Xe.CI.BAT: success for Unigraf integration (rev3) Patchwork
2025-11-10 22:44 ` ✓ i915.CI.BAT: " Patchwork
2025-11-11 5:34 ` ✓ i915.CI.Full: " Patchwork
2025-11-11 5:49 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-18 14:50 ` [PATCH i-g-t v4 00/46] Unigraf integration Louis Chauvet
2025-12-18 15:59 ` Mark Yacoub
2026-01-20 21:09 ` Luca Ceresoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DFUGGY0CG33Q.828539M5UNFK@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=igt-dev-bounces@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=khaled.almahallawy@intel.com \
--cc=louis.chauvet@bootlin.com \
--cc=markyacoub@google.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.