Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/display: Move HDCP helpers into display-helper module

Move DRM's HDCP helper library into the display/ subdirectory and add
it to DRM's display helpers. Split the header file into core and helpers.
Update all affected drivers. No functional changes.

v3:
* fix Kconfig dependencies
v2:
* fix include statements (Jani, Javier)
* update Kconfig symbols

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220421073108.19226-7-tzimmermann@suse.de

+52 -30
+1 -1
Documentation/gpu/drm-kms-helpers.rst
··· 226 226 HDCP Helper Functions Reference 227 227 =============================== 228 228 229 - .. kernel-doc:: drivers/gpu/drm/drm_hdcp.c 229 + .. kernel-doc:: drivers/gpu/drm/display/drm_hdcp_helper.c 230 230 :export: 231 231 232 232 Display Port Helper Functions Reference
+1 -1
drivers/gpu/drm/Makefile
··· 58 58 # 59 59 60 60 drm_kms_helper-y := drm_bridge_connector.o drm_crtc_helper.o \ 61 - drm_encoder_slave.o drm_flip_work.o drm_hdcp.o \ 61 + drm_encoder_slave.o drm_flip_work.o \ 62 62 drm_probe_helper.o \ 63 63 drm_plane_helper.o drm_atomic_helper.o \ 64 64 drm_kms_helper_common.o \
+1
drivers/gpu/drm/amd/display/Kconfig
··· 20 20 config DRM_AMD_DC_HDCP 21 21 bool "Enable HDCP support in DC" 22 22 depends on DRM_AMD_DC 23 + select DRM_DISPLAY_HDCP_HELPER 23 24 help 24 25 Choose this option if you want to support HDCP authentication. 25 26
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 48 48 #include "amdgpu_dm.h" 49 49 #ifdef CONFIG_DRM_AMD_DC_HDCP 50 50 #include "amdgpu_dm_hdcp.h" 51 - #include <drm/drm_hdcp.h> 51 + #include <drm/display/drm_hdcp_helper.h> 52 52 #endif 53 53 #include "amdgpu_pm.h" 54 54 #include "amdgpu_atombios.h"
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
··· 27 27 #include "amdgpu.h" 28 28 #include "amdgpu_dm.h" 29 29 #include "dm_helpers.h" 30 - #include <drm/drm_hdcp.h> 30 + #include <drm/display/drm_hdcp_helper.h> 31 31 #include "hdcp_psp.h" 32 32 33 33 /*
+1 -1
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h
··· 30 30 #include "hdcp_log.h" 31 31 32 32 #include <drm/display/drm_dp_helper.h> 33 - #include <drm/drm_hdcp.h> 33 + #include <drm/display/drm_hdcp_helper.h> 34 34 35 35 enum mod_hdcp_trans_input_result { 36 36 UNKNOWN = 0,
+1
drivers/gpu/drm/bridge/Kconfig
··· 79 79 tristate "ITE IT6505 DisplayPort bridge" 80 80 depends on OF 81 81 select DRM_DISPLAY_DP_HELPER 82 + select DRM_DISPLAY_HDCP_HELPER 82 83 select DRM_DISPLAY_HELPER 83 84 select DRM_DP_AUX_BUS 84 85 select DRM_KMS_HELPER
+1
drivers/gpu/drm/bridge/analogix/Kconfig
··· 35 35 depends on DRM 36 36 depends on OF 37 37 select DRM_DISPLAY_DP_HELPER 38 + select DRM_DISPLAY_HDCP_HELPER 38 39 select DRM_DISPLAY_HELPER 39 40 select DRM_DP_AUX_BUS 40 41 select DRM_MIPI_DSI
+1 -1
drivers/gpu/drm/bridge/analogix/anx7625.c
··· 23 23 24 24 #include <drm/display/drm_dp_aux_bus.h> 25 25 #include <drm/display/drm_dp_helper.h> 26 + #include <drm/display/drm_hdcp_helper.h> 26 27 #include <drm/drm_atomic_helper.h> 27 28 #include <drm/drm_bridge.h> 28 29 #include <drm/drm_crtc_helper.h> 29 30 #include <drm/drm_edid.h> 30 - #include <drm/drm_hdcp.h> 31 31 #include <drm/drm_mipi_dsi.h> 32 32 #include <drm/drm_of.h> 33 33 #include <drm/drm_panel.h>
+1
drivers/gpu/drm/bridge/cadence/Kconfig
··· 2 2 config DRM_CDNS_MHDP8546 3 3 tristate "Cadence DPI/DP bridge" 4 4 select DRM_DISPLAY_DP_HELPER 5 + select DRM_DISPLAY_HDCP_HELPER 5 6 select DRM_DISPLAY_HELPER 6 7 select DRM_KMS_HELPER 7 8 select DRM_PANEL_BRIDGE
+1 -1
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
··· 36 36 #include <linux/wait.h> 37 37 38 38 #include <drm/display/drm_dp_helper.h> 39 + #include <drm/display/drm_hdcp_helper.h> 39 40 #include <drm/drm_atomic.h> 40 41 #include <drm/drm_atomic_helper.h> 41 42 #include <drm/drm_atomic_state_helper.h> 42 43 #include <drm/drm_bridge.h> 43 44 #include <drm/drm_connector.h> 44 45 #include <drm/drm_crtc_helper.h> 45 - #include <drm/drm_hdcp.h> 46 46 #include <drm/drm_modeset_helper_vtables.h> 47 47 #include <drm/drm_print.h> 48 48 #include <drm/drm_probe_helper.h>
+1 -1
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c
··· 11 11 12 12 #include <asm/unaligned.h> 13 13 14 - #include <drm/drm_hdcp.h> 14 + #include <drm/display/drm_hdcp_helper.h> 15 15 16 16 #include "cdns-mhdp8546-hdcp.h" 17 17
+1 -1
drivers/gpu/drm/bridge/ite-it6505.c
··· 22 22 #include <crypto/hash.h> 23 23 24 24 #include <drm/display/drm_dp_helper.h> 25 + #include <drm/display/drm_hdcp_helper.h> 25 26 #include <drm/drm_atomic_helper.h> 26 27 #include <drm/drm_bridge.h> 27 28 #include <drm/drm_crtc.h> 28 29 #include <drm/drm_crtc_helper.h> 29 30 #include <drm/drm_edid.h> 30 - #include <drm/drm_hdcp.h> 31 31 #include <drm/drm_print.h> 32 32 #include <drm/drm_probe_helper.h> 33 33
+6
drivers/gpu/drm/display/Kconfig
··· 17 17 help 18 18 DRM display helpers for DisplayPort. 19 19 20 + config DRM_DISPLAY_HDCP_HELPER 21 + bool 22 + depends on DRM_DISPLAY_HELPER 23 + help 24 + DRM display helpers for HDCP. 25 + 20 26 config DRM_DP_AUX_CHARDEV 21 27 bool "DRM DP AUX Interface" 22 28 depends on DRM
+1
drivers/gpu/drm/display/Makefile
··· 7 7 drm_dp_helper.o \ 8 8 drm_dp_mst_topology.o \ 9 9 drm_dsc_helper.o 10 + drm_display_helper-$(CONFIG_DRM_DISPLAY_HDCP_HELPER) += drm_hdcp_helper.o 10 11 drm_display_helper-$(CONFIG_DRM_DP_AUX_CHARDEV) += drm_dp_aux_dev.o 11 12 drm_display_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o 12 13
+1 -3
drivers/gpu/drm/drm_hdcp.c drivers/gpu/drm/display/drm_hdcp_helper.c
··· 13 13 #include <linux/slab.h> 14 14 #include <linux/firmware.h> 15 15 16 - #include <drm/drm_hdcp.h> 16 + #include <drm/display/drm_hdcp_helper.h> 17 17 #include <drm/drm_sysfs.h> 18 18 #include <drm/drm_print.h> 19 19 #include <drm/drm_device.h> 20 20 #include <drm/drm_property.h> 21 21 #include <drm/drm_mode_object.h> 22 22 #include <drm/drm_connector.h> 23 - 24 - #include "drm_internal.h" 25 23 26 24 static inline void drm_hdcp_print_ksv(const u8 *ksv) 27 25 {
+1
drivers/gpu/drm/i915/Kconfig
··· 11 11 select SHMEM 12 12 select TMPFS 13 13 select DRM_DISPLAY_DP_HELPER 14 + select DRM_DISPLAY_HDCP_HELPER 14 15 select DRM_DISPLAY_HELPER 15 16 select DRM_KMS_HELPER 16 17 select DRM_PANEL
+1 -1
drivers/gpu/drm/i915/display/intel_dp_hdcp.c
··· 8 8 9 9 #include <drm/display/drm_dp_helper.h> 10 10 #include <drm/display/drm_dp_mst_helper.h> 11 - #include <drm/drm_hdcp.h> 11 + #include <drm/display/drm_hdcp_helper.h> 12 12 #include <drm/drm_print.h> 13 13 14 14 #include "intel_ddi.h"
+1 -1
drivers/gpu/drm/i915/display/intel_gmbus.c
··· 31 31 #include <linux/i2c-algo-bit.h> 32 32 #include <linux/i2c.h> 33 33 34 - #include <drm/drm_hdcp.h> 34 + #include <drm/display/drm_hdcp_helper.h> 35 35 36 36 #include "i915_drv.h" 37 37 #include "intel_de.h"
+1 -1
drivers/gpu/drm/i915/display/intel_hdcp.c
··· 12 12 #include <linux/i2c.h> 13 13 #include <linux/random.h> 14 14 15 - #include <drm/drm_hdcp.h> 15 + #include <drm/display/drm_hdcp_helper.h> 16 16 #include <drm/i915_component.h> 17 17 18 18 #include "i915_drv.h"
+1 -1
drivers/gpu/drm/i915/display/intel_hdmi.c
··· 32 32 #include <linux/slab.h> 33 33 #include <linux/string_helpers.h> 34 34 35 + #include <drm/display/drm_hdcp_helper.h> 35 36 #include <drm/drm_atomic_helper.h> 36 37 #include <drm/drm_crtc.h> 37 38 #include <drm/drm_edid.h> 38 - #include <drm/drm_hdcp.h> 39 39 #include <drm/drm_scdc_helper.h> 40 40 #include <drm/intel_lpe_audio.h> 41 41
+1 -1
drivers/misc/mei/hdcp/mei_hdcp.h
··· 9 9 #ifndef __MEI_HDCP_H__ 10 10 #define __MEI_HDCP_H__ 11 11 12 - #include <drm/drm_hdcp.h> 12 + #include <drm/display/drm_hdcp.h> 13 13 14 14 /* me_hdcp_status: Enumeration of all HDCP Status Codes */ 15 15 enum me_hdcp_status {
+22
include/drm/display/drm_hdcp_helper.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* 3 + * Copyright (C) 2017 Google, Inc. 4 + * 5 + * Authors: 6 + * Sean Paul <seanpaul@chromium.org> 7 + */ 8 + 9 + #ifndef _DRM_HDCP_HELPER_H_INCLUDED_ 10 + #define _DRM_HDCP_HELPER_H_INCLUDED_ 11 + 12 + #include <drm/display/drm_hdcp.h> 13 + 14 + struct drm_device; 15 + struct drm_connector; 16 + 17 + int drm_hdcp_check_ksvs_revoked(struct drm_device *dev, u8 *ksvs, u32 ksv_count); 18 + int drm_connector_attach_content_protection_property(struct drm_connector *connector, 19 + bool hdcp_content_type); 20 + void drm_hdcp_update_content_protection(struct drm_connector *connector, u64 val); 21 + 22 + #endif
+2 -12
include/drm/drm_hdcp.h include/drm/display/drm_hdcp.h
··· 6 6 * Sean Paul <seanpaul@chromium.org> 7 7 */ 8 8 9 - #ifndef _DRM_HDCP_H_INCLUDED_ 10 - #define _DRM_HDCP_H_INCLUDED_ 9 + #ifndef _DRM_HDCP_H_ 10 + #define _DRM_HDCP_H_ 11 11 12 12 #include <linux/types.h> 13 13 ··· 290 290 __be16 srm_version; 291 291 u8 srm_gen_no; 292 292 } __packed; 293 - 294 - struct drm_device; 295 - struct drm_connector; 296 - 297 - int drm_hdcp_check_ksvs_revoked(struct drm_device *dev, 298 - u8 *ksvs, u32 ksv_count); 299 - int drm_connector_attach_content_protection_property( 300 - struct drm_connector *connector, bool hdcp_content_type); 301 - void drm_hdcp_update_content_protection(struct drm_connector *connector, 302 - u64 val); 303 293 304 294 /* Content Type classification for HDCP2.2 vs others */ 305 295 #define DRM_MODE_HDCP_CONTENT_TYPE0 0
+1 -1
include/drm/i915_mei_hdcp_interface.h
··· 11 11 12 12 #include <linux/mutex.h> 13 13 #include <linux/device.h> 14 - #include <drm/drm_hdcp.h> 14 + #include <drm/display/drm_hdcp.h> 15 15 16 16 /** 17 17 * enum hdcp_port_type - HDCP port implementation type defined by ME FW