Skip to content
Draft
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
2 changes: 0 additions & 2 deletions drivers/gpu/drm/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ appledrm-$(CONFIG_DRM_APPLE_AUDIO) += audio.o
appledrm-$(CONFIG_DRM_APPLE_AUDIO) += av.o
appledrm-y += connector.o dcp-panel-adt.o dcp-display-metadata.o dcp-180hz.o
appledrm-y += ibootep.o
appledrm-y += dcpext_scanout.o
appledrm-y += dcpext_drm.o
appledrm-y += iomfb_v12_3.o
appledrm-y += iomfb_v13_3.o
appledrm-y += iomfb_v14_7_tpl.o
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/apple/dcp-fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "dcp-fabric.h"
#include "dcp-fabric-effects.h"
#include "dcp-hdmi.h"
#include "dcpext_scanout.h"
#include "ibootep.h"
#include "dcp-internal.h"
#include "dptx-service.h"
Expand Down Expand Up @@ -1425,7 +1424,6 @@ static void dcp_fabric_snapshot_port(struct apple_dcp_typec_port *port,
dcp_typec_safe_held(dcp);
pipeline->tunnel_held = dcp_typec_tunnel_held(dcp);
pipeline->presence = dcp_hdmi_presence(dcp);
pipeline->terminal = tunnel && dcpext_scanout_terminal(dcp);
pipeline->services_ready = !tunnel ||
dcp_tb_services_ready(dcp);
pipeline->external = dcp->external;
Expand Down
8 changes: 3 additions & 5 deletions drivers/gpu/drm/apple/dcp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ struct dcp_desktop_state {
};

/* TODO: move IOMFB members to its own struct */
struct dcpext_scanout;
struct dcp_hdmi;

bool dcp_desktop_present_complete(struct apple_dcp *dcp, u32 id);
Expand Down Expand Up @@ -554,10 +553,9 @@ struct apple_dcp {
/*
* A T6030 external processor in the main DRM device: the kernel starts
* its firmware on first use, its modes come from the attached display.
* Clear for the manual diagnostic path (separate scanout, explicit start).
* Clear for the manual diagnostic path (explicit start).
*/
bool external_native;
struct dcpext_scanout *dcpext_scanout;
bool external_link_ready; /* Full connect/HPD handshake completed. */
bool external_suspended; /* hpd_mutex serializes PM against explicit start */
struct work_struct external_work;
Expand Down Expand Up @@ -1305,8 +1303,8 @@ static inline bool dcp_is_ext26(const struct apple_dcp *dcp)
* The T6030 external processor (the J514S/J516S built-in HDMI port and
* USB-C displays) driven natively through Aurora's DCPLink session: DCP
* firmware 14.7's external role, whose DP/HDMI audio service differs from
* the M1/M2 one (see av.c). The manual diagnostic pipe (dcpext_scanout) and
* the T8122 template path are not this.
* the M1/M2 one (see av.c). The manual explicit-start path and the T8122
* template path are not this.
*/
static inline bool dcp_is_v14_7_external(const struct apple_dcp *dcp)
{
Expand Down
18 changes: 4 additions & 14 deletions drivers/gpu/drm/apple/dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
#include "dcp-fabric.h"
#include "dcp-hdmi.h"
#include "dcp-syslog.h"
#include "dcpext_scanout.h"
#include "dcp-internal.h"
#include "j613-25g83.h"
#include "dcp-external-bw.h"
Expand Down Expand Up @@ -2356,10 +2355,6 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable
goto out_unlock;
}
generation = dcp->typec_generation;
if (dcp->external && dcpext_scanout_terminal(dcp)) {
mutex_unlock(&dcp->hpd_mutex);
return -ESHUTDOWN;
}
if (!dptx_service_available(&dcp->dptxport[port])) {
dev_warn(dcp->dev, "dcp_dptx_connect: dptx service for port %d not enabled\n", port);
ret = -ENODEV;
Expand Down Expand Up @@ -2517,12 +2512,11 @@ static int dcp_dptx_connect_raw(struct apple_dcp *dcp, u32 port, bool *retryable
mutex_lock(&dcp->hpd_mutex);
if (!dcp->dptxport[port].connected ||
!(READ_ONCE(dcp->typec_cable_connected) || dcp_hdmi_port_attached(dcp)) ||
READ_ONCE(dcp->crashed) || dcpext_scanout_terminal(dcp)) {
READ_ONCE(dcp->crashed)) {
mutex_unlock(&dcp->hpd_mutex);
return -ENOLINK;
}
smp_store_release(&dcp->external_link_ready, true);
dcpext_scanout_link_restored(dcp);
mutex_unlock(&dcp->hpd_mutex);
}

Expand Down Expand Up @@ -3485,8 +3479,7 @@ static void dcp_typec_reconnect_work(struct work_struct *work)
}

/* A route following its CRTC hands the link over itself. */
if ((dcp->external && dcpext_scanout_terminal(dcp)) ||
!READ_ONCE(dcp->typec_cable_connected) ||
if (!READ_ONCE(dcp->typec_cable_connected) ||
READ_ONCE(dcp->typec_follow_retiring))
return;

Expand Down Expand Up @@ -3785,10 +3778,8 @@ static int dcp_dptx_release_locked(struct apple_dcp *dcp, u32 port)
int ret;

lockdep_assert_held(&dcp->hpd_mutex);
if (dcp->external) {
if (dcp->external)
smp_store_release(&dcp->external_link_ready, false);
dcpext_scanout_invalidate(dcp);
}
if (dptx_service_available(&dcp->dptxport[port]) && dcp->dptxport[port].connected) {
/*
* A T8132 dcpext's DRM swaps stop with the route, before
Expand Down Expand Up @@ -7875,8 +7866,7 @@ static const char *dcp_external_sleep_vetoed(struct apple_dcp *dcp)

if (!dcp->external_native)
return (atomic_read(&dcp->external_requested) ||
(dcp->rtk && apple_rtkit_is_running(dcp->rtk)) ||
dcpext_scanout_requested(dcp)) ?
(dcp->rtk && apple_rtkit_is_running(dcp->rtk))) ?
"external firmware/scanout attempted" : NULL;
why = iomfb_v14_7_external_busy(dcp);
if (why)
Expand Down
Loading
Loading