Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Documentation/devicetree/bindings/display/apple,dcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -387,17 +387,6 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: Display coprocessor index on multi-DCP systems.

apple,hdcp-channels:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 2
items:
maximum: 14
description:
The Secure Enclave's HDCP interface channels assigned to this display
coprocessor. The first is the HDCP 2.2 transmitter channel of its
external output. Absent when the coprocessor has no HDCP transmitter.

apple,sleep-host-stop:
type: boolean
description:
Expand Down
2 changes: 0 additions & 2 deletions arch/arm64/boot/dts/apple/t604x-extdisp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
mboxes = <&dcpext0_mbox>;
mbox-names = "mbox";
iommus = <&dcpext0_dart 23>;
apple,hdcp-channels = <7 8>;
/* guessed: the internal DCP uses 0x20000, J700 DISPEXT0 is +0x8000 */
apple,bw-scratch = <&pmgr_dcp 0 4 0x28000>;
/* firmware Disp_Index, the dual-pipe endpoint ID */
Expand Down Expand Up @@ -57,7 +56,6 @@
mboxes = <&dcpext1_mbox>;
mbox-names = "mbox";
iommus = <&dcpext1_dart 23>;
apple,hdcp-channels = <9 10>;
/* guessed, as dcpext0 */
apple,bw-scratch = <&pmgr_dcp 0 4 0x30000>;
apple,dcp-endpoint = <2>;
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/boot/dts/apple/t604x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@
mboxes = <&dcp_mbox>;
mbox-names = "mbox";
iommus = <&dcp_dart 23>;
apple,hdcp-channels = <5 6>;
apple,bw-scratch = <&pmgr_dcp 0 4 0x20000>;
apple,iomfb-surfaces = <1 1 0 0>;
/* the boot loader describes the piodma's regions with 2+2 cells */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm64/boot/dts/apple/t8112.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@
mboxes = <&dcp_mbox>;
mbox-names = "mbox";
iommus = <&dcp_dart 5 0x8 0x00000000 0x7 0xffff0000>;
apple,hdcp-channels = <5 6>;

/* the ADT has 2 additional regs which seems to be unused */
reg-names = "coproc", "disp-0", "disp-1", "disp-2", "disp-3";
Expand Down Expand Up @@ -2008,7 +2007,6 @@
mboxes = <&dcpext_mbox>;
mbox-names = "mbox";
iommus = <&dcpext_dart 5 0x8 0x00000000 0x7 0xffff0000>;
apple,hdcp-channels = <7 8>;
phandle = <&dcpext>;

/* the ADT has 2 additional regs which seems to be unused */
Expand Down
15 changes: 0 additions & 15 deletions drivers/gpu/drm/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ config DRM_APPLE_CEC
dcpav-cec-interface-epic service. Say Y here to expose a standard
Linux /dev/cecX adapter bound to the built-in HDMI connector.

config DRM_APPLE_HDCP
bool "HDCP 2.2 content protection on external outputs"
default y
depends on DRM_APPLE
select DRM_DISPLAY_HELPER
select DRM_DISPLAY_HDCP_HELPER
help
Support the standard "Content Protection" and "HDCP Content Type"
connector properties on external DisplayPort, HDMI and USB-C
outputs. The SEP holds the transmitter's keys and does the HDCP 2.2
cryptography; DCP carries the messages to the receiver. The
property is attached on display processors whose device tree node
has "apple,hdcp-channels", with the SEP HDCP service
(APPLE_SEP_HDCP_INTERFACE) built in.

config DRM_APPLE_AUDIO
bool "DisplayPort/HDMI Audio support"
default y
Expand Down
3 changes: 0 additions & 3 deletions drivers/gpu/drm/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ appledrm-y += epic/dpavservep.o
appledrm-y += epic/panelavep.o
appledrm-y += plane.o
appledrm-y += dcp-indicator.o
appledrm-$(CONFIG_DRM_APPLE_HDCP) += dcp-hdcp.o dcp-hdcp-tx.o


appledrm-$(CONFIG_TRACING) += trace.o
Expand All @@ -51,8 +50,6 @@ obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += afk_test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp_backlight_test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp-indicator-test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp-announce-test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp-hdcp-test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp-hdcp-wire-test.o

obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += afk-service-test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp_cec_test.o
Expand Down
34 changes: 10 additions & 24 deletions drivers/gpu/drm/apple/afk.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <kunit/visibility.h>

#include "afk.h"
#include "dcp-hdcp-drv.h"
#include "afkv2-codec.h"
#include "afk_reply.h"
#include "trace.h"
Expand Down Expand Up @@ -462,7 +461,7 @@ afk_match_service(struct apple_dcp_afkep *ep, const char *name)
return ops;
}

return dcp_hdcp_match_service(ep, name, false);
return NULL;
}

static struct apple_epic_service *afk_epic_find_service(struct apple_dcp_afkep *ep,
Expand Down Expand Up @@ -842,7 +841,6 @@ afk_compact_match_service(struct apple_dcp_afkep *ep, const char *name)
const struct apple_epic_service_ops *ops, *any = NULL;
const char *service_name;
size_t len;
bool cut;

if (!name[0] || !ep->ops)
return NULL;
Expand All @@ -869,14 +867,13 @@ afk_compact_match_service(struct apple_dcp_afkep *ep, const char *name)
}

/* An announcement that filled its field may have lost its end. */
cut = strlen(name) >= AFK_COMPACT_NAME_LEN - 1;
if (cut)
for (ops = ep->ops; ops->name[0]; ops++)
if (afk_compact_cut_of(ops, service_name))
return ops;
if (strlen(name) < AFK_COMPACT_NAME_LEN - 1)
return any;
for (ops = ep->ops; ops->name[0]; ops++)
if (afk_compact_cut_of(ops, service_name))
return ops;

/* The HDCP services, by name, wherever they are announced. */
return dcp_hdcp_match_service(ep, service_name, cut) ?: any;
return any;
}

/*
Expand Down Expand Up @@ -1921,15 +1918,9 @@ static void afk_recv_handle_init(struct apple_dcp_afkep *ep, u32 channel,
}
}

/*
* The HDCP services go by their EPIC name: their provider classes are
* shared with other services (the DP device class also names the AV
* device, the interface class names the port controllers).
*/
ops = dcp_hdcp_match_service(ep, epic_name, false);
if (!ops && ep->match_epic_name)
if (ep->match_epic_name)
ops = afk_match_service(ep, epic_name);
else if (!ops)
else
ops = afk_match_service(ep, service_name);
if (dcp_is_ext26(ep->dcp))
dev_dbg(ep->dcp->dev,
Expand Down Expand Up @@ -3041,12 +3032,7 @@ static int afk_send_epic_token(struct apple_dcp_afkep *ep, u32 channel, u16 tag,
if (ep->wire_v2) {
if (!channel || channel > U16_MAX || tag > U8_MAX || payload_len > SZ_1M)
return -EINVAL;
if (ecat == EPIC_CAT_REPORT && stype == EPIC_SUBTYPE_STD_SERVICE) {
/* A service report with its data (an HDCP session's progress). */
if (!payload_len)
return -EINVAL;
v2_category = AFKV2_REPORT;
} else if (ecat == EPIC_CAT_REPORT) {
if (ecat == EPIC_CAT_REPORT) {
if ((stype != AFKV2_OPEN && stype != AFKV2_CLOSE) || payload_len)
return -EOPNOTSUPP;
v2_flags = 1;
Expand Down
18 changes: 0 additions & 18 deletions drivers/gpu/drm/apple/apple_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include "apple_resume.h"
#include "dcp-hdr-metadata.h"
#include "dcp.h"
#include "dcp-hdcp-drv.h"
#include "plane.h"
#include "iomfb_m4.h"
#include "t8132_ext_drm.h"
Expand Down Expand Up @@ -1037,8 +1036,6 @@ static void apple_atomic_commit_tail(struct drm_atomic_commit *state)
DRM_PLANE_COMMIT_ACTIVE_ONLY);
drm_atomic_helper_fake_vblank(state);
drm_atomic_helper_commit_hw_done(state);
/* Content Protection requests go to the display processors' queues. */
dcp_hdcp_commit(state);
drm_atomic_helper_wait_for_flip_done(state->dev, state);
apple_fail_lost_flips(state);
drm_atomic_helper_cleanup_planes(state->dev, state);
Expand Down Expand Up @@ -1154,7 +1151,6 @@ static int apple_connector_atomic_check(struct drm_connector *conn,
const struct drm_property_blob *blob = new->hdr_output_metadata;
struct drm_crtc_state *crtc_state;

dcp_hdcp_atomic_check(conn, state);
if (blob && (blob->length != sizeof(struct hdr_output_metadata) ||
!dcp_hdr_is_type1(blob->data)))
return -EINVAL;
Expand Down Expand Up @@ -1361,9 +1357,6 @@ static int apple_connector_create(struct drm_device *drm,
dcp_ext_color_props_supported(dcp));
if (ret)
goto err_cleanup;
ret = dcp_hdcp_attach_connector(connector, &dcp, 1, connector_type);
if (ret)
goto err_cleanup;

connector->base.polled = DRM_CONNECTOR_POLL_HPD;
connector->connected = false;
Expand Down Expand Up @@ -1726,17 +1719,6 @@ static int apple_probe_typec_ports(struct drm_device *drm,
connector->connected = false;
connector->dcp = NULL;

/* Content Protection where a pipeline that can drive the port has HDCP. */
for (i = 0; i < num_dcp; i++) {
if (pipeline ? dcp[i] != pipeline :
!dcp_typec_port_has_candidate(port_idx, dcp[i]))
continue;
ret = dcp_hdcp_attach_connector(connector, &dcp[i], 1,
DRM_MODE_CONNECTOR_DisplayPort);
if (ret)
return ret;
}

/*
* One encoder per connector, covering its allowed pipelines.
* T6050 connectors each cover exactly one. Attaching several
Expand Down
9 changes: 0 additions & 9 deletions drivers/gpu/drm/apple/connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@ struct apple_connector {
* chosen one; -1 until then, and nothing is sent.
*/
int bl_level;

/*
* Content Protection (dcp-hdcp-drv.h): the property is attached, and
* what the last commit asked for. Written by the commit tail, read by
* the display processor that drives the connector.
*/
bool hdcp_attached;
bool hdcp_want;
u8 hdcp_type;
};

#define to_apple_connector(x) container_of(x, struct apple_connector, base)
Expand Down
79 changes: 0 additions & 79 deletions drivers/gpu/drm/apple/dcp-hdcp-drv.h

This file was deleted.

Loading
Loading