Re: [PATCH i-g-t 2/4] lib/unigraf: Add HDCP management
Louis Chauvet <[email protected]> Fri, 31 Jul 2026 20:23:50 +0200
| Newsgroups | org.freedesktop.lists.igt-dev |
|---|---|
| Message-ID | <[email protected]> |
On 7/31/26 20:21, Louis Chauvet wrote: > From: fomys <[email protected]> Tiny mistake on this patch, that indeed me. I will fix it for v2. > Unigraf is able to emulate HDCP, so add few helpers to enable/disable > it. > > Signed-off-by: Louis Chauvet <[email protected]> > --- > lib/vendor/unigraf/unigraf.c | 23 ++++++++++++++++++++++- > lib/vendor/unigraf/unigraf.h | 4 ++++ > 2 files changed, 26 insertions(+), 1 deletion(-) > > diff --git a/lib/vendor/unigraf/unigraf.c b/lib/vendor/unigraf/unigraf.c > index 30ee3c72bc74..5b416f605428 100644 > --- a/lib/vendor/unigraf/unigraf.c > +++ b/lib/vendor/unigraf/unigraf.c > @@ -549,9 +549,10 @@ void unigraf_reset(void) > unigraf_set_mst_stream_count(1); > unigraf_set_sst(); > unigraf_load_default_edid(); > - unigraf_hpd_assert(); > unigraf_set_max_lane_count(4); > unigraf_set_max_link_rate(UNIGRAF_RATE_8_10_GHZ); > + unigraf_enable_hdcp(); > + unigraf_hpd_assert(); > } > > /** > @@ -911,3 +912,23 @@ int unigraf_rate_to_kbs(enum unigraf_rate rate) > return 0; > } > } > + > +/** > + * unigraf_enable_hdcp - Enable HDCP 2 support > + * > + * Unigraf is able to load production keys, but this will disable all recording > + * features. > + */ > +void unigraf_enable_hdcp(void) > +{ > + unigraf_write_u32(TSI_HDCP_2X_COMMAND_W, H2_SINK_LOAD_PROD_KEYS); > + unigraf_write_u32(TSI_HDCP_2X_COMMAND_W, H2_SINK_SET_CAPABLE); > +} > + > +/** > + * unigraf_disable_hdcp - Disable HDCP support > + */ > +void unigraf_disable_hdcp(void) > +{ > + unigraf_write_u32(TSI_HDCP_2X_COMMAND_W, H2_SINK_CLEAR_CAPABLE); > +} > diff --git a/lib/vendor/unigraf/unigraf.h b/lib/vendor/unigraf/unigraf.h > index 1570be3feb96..498a2d4daab3 100644 > --- a/lib/vendor/unigraf/unigraf.h > +++ b/lib/vendor/unigraf/unigraf.h > @@ -103,4 +103,8 @@ uint32_t unigraf_get_lt_rate(void); > > uint32_t unigraf_get_lt_lane_count(void); > > +void unigraf_enable_hdcp(void); > + > +void unigraf_disable_hdcp(void); > + > #endif // UNIGRAF_H >