]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/hdcp: deduplicate and refactor HDCP GSC ops initialization
authorJani Nikula <jani.nikula@intel.com>
Thu, 24 Apr 2025 20:01:34 +0000 (23:01 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 2 May 2025 10:26:18 +0000 (13:26 +0300)
commit1e5206fc34030780017afe738783ecab9d7e2795
treed242f307ab52ba05f4611036ea8e48216d1cffe6
parentb45528d5baf825c3828a9ae10784e2be60a7806b
drm/i915/hdcp: deduplicate and refactor HDCP GSC ops initialization

The gsc_hdcp_ops is duplicated and initialized exactly the same way in
two different places (for i915 and xe), and requires forward
declarations for all the hooks. Deduplicate, and make the functions
static.

There are slight differences in the i915 and xe implementations of
intel_hdcp_gsc_init() and intel_hdcp_gsc_fini(). Take the best of both,
and improve.

We need to expose intel_hdcp_gsc_hdcp2_init() and
intel_hdcp_gsc_free_message() for this, and create the latter for xe.

Cc: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/21e7871b35d4c7d13f016b5ecb4f10e5be72c531.1745524803.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_hdcp.c
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.c
drivers/gpu/drm/i915/display/intel_hdcp_gsc_message.h
drivers/gpu/drm/xe/display/xe_hdcp_gsc.c