Skip to content
Closed
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
9 changes: 5 additions & 4 deletions Documentation/arch/arm64/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ ARM64 Architecture

acpi_object_usage
amu
aurora-apif
aurora-apif-nvme
aurora-apif-pcie
aurora-apif-pmp
../../driver-api/firmware/aurora-apif
../../driver-api/firmware/aurora-apif-nvme
../../driver-api/firmware/aurora-apif-pcie
../../driver-api/firmware/aurora-apif-pmp
../../driver-api/firmware/aurora-apif-display
aurora-apif-centauri
apple-j813
arm-acpi
Expand Down
61 changes: 55 additions & 6 deletions Documentation/devicetree/bindings/display/apple,dcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ properties:
- apple,t6020-dcp
- apple,t8140-dcp
- apple,t8142-dcp
- apple,t6050-dcp
- const: apple,dcp
- items:
- enum:
- apple,t8103-dcpext
- apple,t8112-dcpext
- apple,t6000-dcpext
- apple,t6020-dcpext
- apple,t6050-dcpext
- const: apple,dcpext
- items:
- const: apple,t8140-dcpext
Expand Down Expand Up @@ -70,13 +72,32 @@ properties:

clocks:
minItems: 1
maxItems: 2
maxItems: 64

clock-names:
minItems: 1
items:
- const: clock-154
- const: clock-194
maxItems: 64

apple,clock-ids:
oneOf:
- type: boolean
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 64
description: |
Ordered firmware provider clock identifiers. Callback clock indices
select the corresponding entry in clocks. An explicitly empty table
is allowed when the provider has no clocks.

apple,firmware-physical-regs:
$ref: /schemas/types.yaml#/definitions/uint64-array
minItems: 1
maxItems: 10
description: |
Coprocessor physical base addresses in display register-table order,
including the bandwidth scratch and optional doorbell windows.
The number of entries must match the complete register table.
Omit on identity-mapped systems; reg supplies the physical view.

memory-region:
minItems: 1
Expand Down Expand Up @@ -315,12 +336,39 @@ required:
- apple,bw-scratch

allOf:
- if:
properties:
compatible:
contains:
enum: ['apple,t6050-dcp', 'apple,t6050-dcpext']
then:
required:
- apple,clock-ids
- memory-region
- memory-region-names
- apple,firmware-compat
properties:
apple,firmware-compat:
items:
- const: 27
- const: 0
- const: 0
else:
properties:
clocks:
maxItems: 2
clock-names:
items:
- const: clock-154
- const: clock-194
apple,clock-ids: false
apple,firmware-physical-regs: false
- if:
not:
properties:
compatible:
contains:
const: apple,t8140-dcp
enum: ['apple,t8140-dcp', 'apple,t6050-dcp', 'apple,t6050-dcpext']
then:
properties:
apple,power-lut-data-x: false
Expand All @@ -332,7 +380,8 @@ allOf:
properties:
compatible:
contains:
enum: ['apple,t8140-dcp', 'apple,t8140-dcpext']
enum: ['apple,t8140-dcp', 'apple,t8140-dcpext',
'apple,t6050-dcp', 'apple,t6050-dcpext']
then:
properties:
resets: false
Expand Down
72 changes: 72 additions & 0 deletions Documentation/driver-api/firmware/aurora-apif-display.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. SPDX-License-Identifier: GPL-2.0-only

DCP display in an Aura guest
===========================

The firmware-27 display profile uses the normal IOMFB shared-memory
transport and compact AFK framing. It supplies a separate method/callback
table and present serializer. The existing queued present, framebuffer
retention, backlight policy, Type-C routing and suspend drain are shared
with the public driver.

This is display-controller support. It does not add AGX acceleration.

Loader contract
---------------

The loader leaves each coprocessor running with its firmware translations
intact. The driver negotiates RTKit without writing its CPU run state or
restarting the coprocessor. A missing running session or a firmware ABI
other than the explicit apple,firmware-compat = <27 0 0> is rejected.

The internal and external providers use apple,t6050-dcp and
apple,t6050-dcpext respectively. The profile uses a 41-bit DMA
aperture for the coprocessor CPU; scanout and PIODMA retain their independent apertures.

Each provider describes its inherited framebuffer region using
memory-region and the framebuffer entry in memory-region-names.
Default-surface allocation uses firmware-reported geometry, format and
compression. Unsupported layouts or allocations larger than that region
are rejected.

apple,clock-ids describes the ordered firmware provider clock table.
Its entry count must match clocks. An explicitly empty property is
accepted for a provider with no clocks; a missing property is rejected.
A callback clock index selects the corresponding Linux clock.

Display register callbacks normally use resource physical addresses.
If Linux resources are translated guest addresses, the loader supplies
apple,firmware-physical-regs in complete register-table order,
including the bandwidth scratch and optional doorbell apertures. These
addresses are returned to the coprocessor, not dereferenced by Linux.

The loader must also grant the reserved firmware buffers needed by AFK
through the corresponding IOMMU provider. Remote requests remain bounded
and fail if their device addresses cannot be translated.

Direct DisplayPort routes
-------------------------

Protocol-27 DPTX uses endpoint 0x2c and its own drive-settings records.
The explicit service unit takes precedence over the transport interface
identifier. Drive requests validate lane count and voltage/pre-emphasis
before changing the PHY.

The PHY reports its live clock and coding mode to the crossbar consumer.
A missing required provider or conflicting clock configuration fails the
link operation. Other PHY types retain their existing routing behavior.

Session lifetime
----------------

An adopted session has no confirmed DMA stop boundary. Failed probes and
unbind therefore retain published buffers, mappings and device/domain
references until a fresh firmware boot. Rebinding a retained session is
unsupported. No timeout falls back to resetting a live coprocessor.

Validation
----------

Native arm64 display-driver builds and host tests cover the present wire
layout and framebuffer sizing/bounds. These checks do not establish boot,
physical hotplug, brightness or suspend behavior on hardware.
3 changes: 3 additions & 0 deletions arch/arm64/configs/aurora-apif.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ CONFIG_APPLE_CENTAURI=y
CONFIG_APPLE_CENTAURI_WIFI=y
CONFIG_BT=y
CONFIG_BT_HCICENTAURI=y
CONFIG_DRM=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_DRM_APPLE=y
2 changes: 1 addition & 1 deletion drivers/gpu/drm/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ appledrm-y += connector.o
appledrm-y += ibootep.o
appledrm-y += iomfb_v12_3.o
appledrm-y += iomfb_v13_3.o
appledrm-y += iomfb_h17p.o
appledrm-y += iomfb_h17p.o iomfb_v27.o
appledrm-$(CONFIG_DRM_APPLE_KUNIT_TEST) += iomfb_h17p_test.o
appledrm-y += epic/dpavservep.o
appledrm-y += plane.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/apple/afk.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static void afk_recv_handle_init(struct apple_dcp_afkep *ep, u32 channel,
return;
}
ret = parse_epic_service_init(&ctx, &epic_name, &epic_class, &epic_unit,
ep->dcp->fw_compat == DCP_FIRMWARE_H17P);
ep->dcp->fw_compat >= DCP_FIRMWARE_H17P);
if (ret) {
dev_err(ep->dcp->dev,
"AFK[ep:%02x]: failed to extract init props: %d\n",
Expand Down
14 changes: 14 additions & 0 deletions drivers/gpu/drm/apple/dcp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "dcp_backlight.h"
#include "iomfb.h"
#include "iomfb_h17p.h"
#include "iomfb_v27.h"
#include "iomfb-state.h"
#include "iomfb_v12_3.h"
#include "iomfb_v13_3.h"
Expand Down Expand Up @@ -69,6 +70,7 @@ struct apple_dcp_typec_route {
};

bool dcp_is_typec_output(struct apple_dcp *dcp);
int dcp_direct_crossbar_link(struct apple_dcp *dcp, bool up);
void dcp_swap_watchdog_arm(struct apple_dcp *dcp);
void dcp_swap_watchdog_complete(struct apple_dcp *dcp);
bool dcp_is_usb4_output(struct apple_dcp *dcp);
Expand All @@ -93,6 +95,7 @@ enum {
DPAVSERV_ENDPOINT = 0x28,
AV_ENDPOINT = 0x29,
DPTX_ENDPOINT = 0x2a,
DPTX_ENDPOINT_V27 = 0x2c,
HDCP_ENDPOINT = 0x2b,
REMOTE_ALLOC_ENDPOINT = 0x2d,
IOMFB_ENDPOINT = 0x37,
Expand Down Expand Up @@ -178,6 +181,7 @@ enum dcp_iomfb_method_profile {
};

struct apple_dcp_hw_data {
u8 firmware_dma_bits;
u32 num_dptx_ports;
enum dcp_iomfb_method_profile iomfb_method_profile;
/*
Expand Down Expand Up @@ -229,6 +233,16 @@ struct apple_dcp {
/* clock rate request by dcp in */
struct clk *clk;
struct clk *clk_194;
struct clk_bulk_data *firmware_clocks;
unsigned int num_firmware_clocks;
u64 disp_firmware_base[MAX_DISP_REGISTERS];
u32 dfb_format, dfb_compression;
u64 dfb_region_size;
bool dfb_format_valid, dfb_compression_valid;
struct list_head iomfb_boolean_properties;
u32 iomfb_boolean_property_count;
u32 external_pipes_v27, external_displays_v27, external_suppression_v27;
struct dcp_swap_submit_req_v27 present_v27;

/* DCP shared memory */
void *shmem;
Expand Down
Loading