Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm/apple: Add missing RTKit Kconfig dependency #256

Closed
wants to merge 181 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
cff9014
WIP: drm/apple: Add DCP display driver
alyssarosenzweig Aug 27, 2021
8b000e2
drm: apple: Relicense DCP driver as dual MIT / GPL v2.0
jannau Mar 20, 2022
fd265b8
drm/apple: Start coprocessor on probe
jannau Jul 25, 2022
4acbb67
HACK: drm/apple: avoid DCP swaps without attached surfaces
jannau Jan 15, 2022
7d4dd3c
drm/apple: Use a device tree defined clock for dcpep_cb_get_frequency
jannau Jul 31, 2022
3964513
drm/apple: Fix rt_bandwidth for t600x
jannau Mar 12, 2022
192bfda
drm/apple: Add nop sr_set_uint_prop callback for t600x-dcp
jannau Mar 12, 2022
be3967d
drm/apple: Reference only swapped out framebuffers
jannau Mar 12, 2022
52facfe
drm/apple: Use "apple,asc-dram-mask" for rtkit iovas
jannau Mar 12, 2022
a7705f8
drm/apple: Implement suspend/resume for DCP
alyssarosenzweig Mar 22, 2022
31109f5
drm/apple: dcp: fix TRAMPOLINE_IN macro
jannau Apr 14, 2022
106aa3f
drm/apple: Switch to nonblocking commit handling
jannau Jul 31, 2022
178f996
drm/apple: Log callbacks with their tag as debug output
jannau Jul 31, 2022
2662eb7
drm/apple: Add DCP interface definitions used on t600x
jannau Jul 31, 2022
41a1e5d
drm/apple: Clear used callback/cookie on dcp_ack
jannau Jul 31, 2022
be14f19
drm/apple: Add t600x support
jannau Jul 31, 2022
fbe64f6
drm/apple: toggle power only when active state changes
jannau Jun 6, 2022
de13dee
drm/apple: Add somewhat useful debug prints
jannau Jul 31, 2022
6f99b04
drm/apple: Add less tons of questionable debug prints
jannau Jul 31, 2022
9dafa28
drm/apple: implement read_edt_data
jannau Jun 5, 2022
fe5c174
drm/apple: clear callback's output data
jannau Jun 5, 2022
0eadb3c
drm/apple: Support memory unmapping/freeing
jannau Jun 5, 2022
dd5589a
WIP: drm/apple: Change the way to clear unused surfaces
jannau Jun 6, 2022
537e99b
drm/apple: laod piodma dev via explicit phandle
jannau Sep 26, 2022
6dd9c41
drm/apple: Fix kzalloc in dcp_flush()
asahilina Sep 28, 2022
a8a71a2
drm/apple: Allow modesets even when disconnected
jannau Oct 1, 2022
eeadd6c
drm/apple: Mark the connecter on init only with modes as connected
jannau Oct 1, 2022
a586afc
drm/apple: make note about drm.mode_config.max_width/height
jannau Oct 1, 2022
65b4ebe
drm/apple: Split dcpep/iomfb out of dcp.c
jannau Oct 2, 2022
61d485a
WIP: add header test target copied from i915
jannau Oct 3, 2022
945eb01
gpu: drm: apple: Use connector types from devicetree
jannau Oct 22, 2022
d82aadd
drm: apple: Fix connector state on devices with integrated display
jannau Oct 5, 2022
5f94f88
drm: apple: Replace atomic refcount with kref
jannau Oct 5, 2022
f76bb51
gpu: drm: apple: Start using tracepoints
jannau Oct 8, 2022
91436e3
gpu: drm: apple: Unbreak multiple DCP plane <-> crtc matching
jannau Oct 11, 2022
e1ee53a
gpu: drm: apple: Add support for DRM_FORMAT_XRGB2101010
jannau Oct 11, 2022
c6a7aa3
gpu: drm: apple: Add apple_drm_gem_dumb_create()
jannau Oct 11, 2022
faee2f4
gpu: drm: apple: Reject modes without valid color mode
jannau Oct 12, 2022
21660de
gpu: drm: apple: Convert 2 non-assert WARN()s to dev_err()
jannau Oct 12, 2022
c4d2e01
gpu: drm: apple: Send an disconnected hotplug event on ASC crash
jannau Oct 20, 2022
c23b9e8
gpu: drm: apple: Add dcp_crtc_atomic_check
jannau Oct 20, 2022
7e91eca
gpu: drm: apple: Fix DCP run time PM
jannau Oct 21, 2022
d4b0eea
gpu: drm: apple: Fix DCP initialisation
jannau Oct 21, 2022
68397ec
gpu: drm: apple: Specify correct number of DCP*s for drm_vblank_init
jannau Oct 21, 2022
303dd28
gpu: drm: apple: Remove other framebuffers before DRM setup
jannau Oct 25, 2022
3d26532
gpu: drm: apple: Support opaque pixel formats
jannau Oct 27, 2022
4a0c727
gpu: drm: apple: Provide notch-less modes
jannau Oct 25, 2022
9a7f7c4
gpu: drm: apple: Fix shutdown of partially probed dcp
jannau Nov 6, 2022
11a3f30
gpu: drm: apple: Set maximal framebuffer size correctly
jannau Nov 6, 2022
740b082
gpu: drm: apple: Prevent NULL pointer in dcp_hotplug
jannau Nov 6, 2022
98791cc
gpu: drm: apple: Update date last update
jannau Nov 6, 2022
1bc8953
gpu: drm: apple: iomfb: Use FIELD_{GET,PREP}
jannau Oct 30, 2022
f3d9d8c
gpu: drm: apple: iomfb: Unify call and callback channels
jannau Oct 30, 2022
7615404
gpu: drm: apple: "match" PMU/backlight services on init
jannau Oct 30, 2022
c49f030
gpu: drm: apple: Brightness control via atomic commits
jannau Oct 31, 2022
66c1075
HACK: gpu: drm: apple: j314/j316: Ignore 120 Hz mode for integrated d…
jannau Nov 15, 2022
ce8c180
drm/apple: Fix suspend/resume handling
marcan Nov 17, 2022
eecce1c
gpu: drm: apple: Avoid drm_fb_dma_get_gem_addr
jannau Nov 20, 2022
0284cc1
drm/apple: register backlight device after IOMFB start
jannau Nov 22, 2022
5b009a9
drm/apple: Add trace point for display brightness
jannau Nov 22, 2022
d80ddd1
drm/apple: Implement drm_crtc_helper_funcs.mode_fixup
jannau Nov 23, 2022
4f51048
drm/apple: Read display dimensions from devicetree
jannau Nov 24, 2022
f335859
drm/apple: Wait for power on request to complete synchronously
asahilina Nov 27, 2022
6c69fb8
drm/apple: Remove obsolete ignore_swap_complete
asahilina Nov 27, 2022
a040ba8
drm/asahi: Fix backlight restores on non-microLED devices
asahilina Nov 27, 2022
698eaca
drm/apple: Schedule backlight update on enable_backlight_message_ap_g…
jannau Nov 27, 2022
0608116
drm/apple: Report "PMUS.Temperature" only for mini-LED backlights
jannau Nov 27, 2022
713d727
drm/apple: Check if DCP firmware is supported
jannau Dec 4, 2022
9a7bd8d
drm/apple: Disable fake vblank IRQ machinery
asahilina Nov 27, 2022
e83a8c5
gpu: drm: apple: Parse color modes completely
jannau Dec 11, 2022
29f7eee
gpu: drm: apple: Skip parsing elements of virtual timing modes
jannau Dec 11, 2022
518e878
gpu: drm: apple: Add tracing for color and timing modes
jannau Dec 11, 2022
cb594a7
gpu: drm: apple: Prefer SDR color modes
jannau Dec 11, 2022
57b37c6
gpu: drm: apple: Add IOMobileFramebufferAP::get_color_remap_mode
jannau Dec 11, 2022
c68b2ed
gpu: drm: apple: reenable support for {A,X}RGB2101010
jannau Dec 11, 2022
8276f19
gpu: drm: apple: Add show_notch module parameter
jannau Dec 11, 2022
37dee7b
Revert "gpu: drm: apple: reenable support for {A,X}RGB2101010"
jannau Dec 12, 2022
100385c
drm/apple: Enable 10-bit mode & set colorspace to native
marcan Dec 25, 2022
180031a
gpu: drm: apple: Clear all surfaces on startup
jannau Dec 31, 2022
13110c2
drm/apple: Update swap handling
jannau Jan 2, 2023
76e5de1
gpu: drm: apple: Use drm_aperture_remove_conflicting_framebuffers
jannau Dec 22, 2022
36f9e4f
drm/apple: Use drm_module_platform_driver
jannau Dec 31, 2022
88304b6
drm/apple: Allocate drm objects according to drm's expectations
jannau Jan 2, 2023
9231591
gpu: drm: apple: Use components to avoid deferred probing
jannau Dec 29, 2022
741abd9
gpu: drm: apple: Wait for iomfb initialization
jannau Dec 29, 2022
b819062
drm/apple: simplify IOMFB_THUNK_INOUT
jannau Jan 8, 2023
abbb9f5
drm/apple: Fix parse_string() memory leaks
asahilina Feb 15, 2023
b5c80e7
drm/apple: Fix bad error return
asahilina Feb 15, 2023
2059928
drm/apple: Set backlight level indirectly if no mode is set
jannau Jan 22, 2023
0189bb9
drm/apple: Use backlight_get_brightness()
jannau Jan 22, 2023
ccaec98
drm/apple: Move panel options to its own sub-struct
jannau Mar 26, 2023
58658fc
drm/apple: Align buffers to 16K page size
asahilina Mar 22, 2023
96d9f93
drm/apple: purge unused dcp_update_notify_clients_dcp
jannau Feb 28, 2023
050882b
drm/apple: Add callbacks triggered by last_client_close_dcp()
jannau Jan 8, 2023
4508d91
drm/apple: Add support for the macOS 13.2 DCP firmware
jannau Feb 17, 2023
41b840b
drm/apple: ignore surf[3] in clear swap calls
jannau Mar 9, 2023
66c02b0
drm/apple: Support color transformation matrices
jannau Mar 12, 2023
054752e
drm/apple: Drop unsupported DRM_FORMAT_ARGB2101010
jannau Mar 23, 2023
6fa36d7
dcp: Allow unused trampolines
marcan Apr 11, 2023
3ea055f
dcp: Add get_tiling_state
marcan Apr 11, 2023
8e451bf
dcp: 42-bit DMA masks
marcan Apr 11, 2023
19ad56c
dcp: T602X bwreq support
marcan Apr 11, 2023
5e08a8c
dcp: Warn if DMA mapping fails
marcan Apr 11, 2023
0b0be81
WIP: drm/apple: Port to incompatible V13.3 firmware interface
jannau Apr 14, 2023
61aa05f
drm/probe_helper: fix the warning reported when calling drm_kms_helpe…
Mar 28, 2023
dbf3ca2
drm/apple: Remove simpledrm framebuffer before DRM device alloc
jannau Apr 15, 2023
fb4e6ef
drm/apple: Mark DCP as being in the wakeup path
marcan Apr 24, 2023
5f60da6
drm: apple: iomfb: Increase modeset timeout to 2.5 seconds
jannau Apr 30, 2023
7728675
drm: apple: Only match backlight service on DCP with panel
jannau Apr 30, 2023
14cfe3b
drm: apple: iomfb: limit backlight updates to integrated panels
jannau Apr 30, 2023
06747f0
drm: apple: backlight: avoid updating the brightness with a commit
jannau Jul 16, 2023
2f497d7
drm/apple: Get rid of the piodma dummy driver
jannau Jul 15, 2023
26f924c
drm/apple: Use iommu domain for piodma maps
jannau Jul 19, 2023
a14be1b
drm: apple: Align PIODMA buffers to SZ_16K
jannau Jul 19, 2023
3cb8477
drm: apple: Add D129 allocate_bandwidth iomfb callback
jannau Aug 23, 2023
734f63b
drm: apple: Update supported firmware versions to 12.3 and 13.5
jannau Sep 4, 2023
e178bc0
drm: apple: dcp: Port over to DEFINE_SIMPLE_DEV_PM_OPS
jannau Nov 6, 2023
4779419
drm: apple: dcp: Remove cargo-culted devm_of_platform_populate
jannau Nov 6, 2023
462a4ba
drm: apple: iomfb: implement abort_swaps_dcp
jannau Apr 30, 2023
bbef3c1
drm: apple: iomfb: Increase modeset tiemout to 8.5 seconds
jannau Nov 6, 2023
e7840e2
drm: apple: Remove explicit asc-dram-mask handling
jannau Nov 6, 2023
486e729
mux: apple DP xbar: Add Apple silicon DisplayPort crossbar
svenpeter42 Nov 5, 2022
db23375
mux: apple dp crossbar: Support t8112 varient
jannau Apr 30, 2023
9b7c172
mux: apple dp crossbar: FIFO_RD_UNK_EN seems to use 2 bits per dispext*
jannau Apr 30, 2023
fcfa774
mux: apple dp crossbar: Read UNK_TUNABLE before and after writing it
jannau Apr 30, 2023
592b582
mux: apple dp crossbar: Support t602x DP cross bar variant
jannau Aug 17, 2023
6dd5021
gpu: drm: apple: Add utility functions for matching on dict keys
povik Feb 15, 2023
3fd3f45
gpu: drm: apple: Add 'parse_blob'
povik Feb 23, 2023
2d782b0
gpu: drm: apple: Add sound mode parsing
povik Feb 15, 2023
f237c83
drm: apple: DCP AFK/EPIC support
svenpeter42 Feb 12, 2023
27d37bc
drm: apple: afk: Use linear array of services
jannau Nov 12, 2023
f4f07ee
drm: apple: Add DPTX support
svenpeter42 Nov 5, 2022
00f0043
drm: apple: Move offsets for rt_bandwidth callback to DT
jannau Nov 12, 2023
ab69434
drm: apple: iomfb: Do not match/create PMU service for dcpext
jannau Aug 17, 2023
cd4a189
drm: apple: afk: Adapt to macOS 13.3 firmware
jannau Apr 9, 2023
2547c2e
drm: apple: dptx: Port APCALL to macOS 13.3 firmware
jannau Apr 28, 2023
7073dcc
drm: apple: dptx: port interface to macOS 13.5 firmware
jannau Aug 17, 2023
fea4f60
drm: apple: dptx: Add set_active_lanes APCALL
jannau Nov 6, 2023
0b1437b
drm: apple: dptx: Add DPTX_APCALL_ACTIVATE
jannau Nov 6, 2023
69ee5c1
drm: apple: dptx: Adapt dptxport_connect() to observed behavior
jannau Nov 6, 2023
6022188
drm: apple: afk: Clear commands before sending them
marcan Nov 16, 2023
30d563a
drm: apple: Fix missing unlock path in dcp_dptx_connect
marcan Nov 16, 2023
2ed6a8e
drm: apple: dptxep: Fix reply size check
marcan Nov 16, 2023
f87f374
drm: apple: dptxep: Implement drive settings stuff
marcan Nov 16, 2023
e3a82f0
fixup! drm/apple: Add support for the macOS 13.2 DCP firmware
marcan Nov 19, 2023
52a7deb
drm/apple: Add missing sound Kconfig dependencies
asahilina Nov 22, 2023
75d2274
drm: apple: HACK: Do not delete piodma platform device
jannau Nov 20, 2023
f793a67
drm: apple: afk: Update read pointer before processing message
jannau Nov 6, 2023
5c94a14
drm: apple: Implement D592 callback
jannau Nov 19, 2023
93070a0
drm: apple: Keep information at which swap_id fb are still referenced
jannau Nov 19, 2023
51bd031
Revert "drm: apple: iomfb: Do not match/create PMU service for dcpext"
jannau Nov 20, 2023
86f1bfc
drm: apple: dptx: Implement APCALL_DEACTIVATE and reset the phy
jannau Nov 20, 2023
a9a37de
drm: apple: Disconnect dptx When the CRTC is powered down
jannau Nov 20, 2023
b28bc9f
drm: apple: dptx: Wait for completion of dptx_connect.
jannau Nov 21, 2023
b071ee5
drm: apple: HPD: Only act on connect IRQs
jannau Nov 21, 2023
ddd996d
drm: apple: iomfb: Improve hotplug related logging
jannau Nov 21, 2023
99d7bb8
drm: apple: Extract modeset crtc's atomic_flush()
jannau Nov 22, 2023
0d53d6a
drm: apple: dptx: Log connect/disconnect calls
jannau Nov 22, 2023
128a7d4
drm: apple: Move modeset into drm_crtc's atomic_enable
jannau Nov 23, 2023
ba8d4f2
drm: apple: Fix DPTX hotplug handling
jannau Nov 23, 2023
2cccd35
drm: apple: iomfb: Use drm_kms_helper_connector_hotplug_event
jannau Nov 23, 2023
0f7a9a2
fixup! drm: apple: Disconnect dptx When the CRTC is powered down
jannau Nov 25, 2023
2302652
fixup! drm/apple: Add support for the macOS 13.2 DCP firmware
jannau Nov 25, 2023
b176e77
fixup! mux: apple dp crossbar: Support t602x DP cross bar variant
jannau Nov 25, 2023
56a2410
fixup! drm: apple: iomfb: Use drm_kms_helper_connector_hotplug_event
jannau Nov 25, 2023
e19e19a
fixup! drm: apple: Disconnect dptx When the CRTC is powered down
jannau Nov 25, 2023
5f2ac9b
drm : apple: iomfb: Handle OOB ASYNC/CB context
jannau Nov 26, 2023
a0943d4
fixup! drm: apple: DCP AFK/EPIC support
jannau Nov 26, 2023
7db5176
drm: apple: iomfb: Extend hotplug/mode parsing logging
jannau Nov 26, 2023
741b581
drm: apple: pasrser: Reject high refresh / resolution modes
jannau Nov 26, 2023
2a6c77d
drm: apple: Adjust startup sequence and timing for dptx
jannau Nov 26, 2023
7eaa5f4
drm: apple: dcp: Fix resume with DPTX based display outputs
jannau Nov 28, 2023
5bfd508
drm: apple: Be less noisy about teardown notifies without service
jannau Dec 2, 2023
1d26b13
drm: apple: dptx: Wait for link config on connect
jannau Dec 3, 2023
8997bef
drm: apple: Prefer RGB SDR modes
jannau Dec 1, 2023
6511bd6
drm: apple: iomfb: Always parse DisplayAttributes
jannau Dec 4, 2023
3c4e00b
drm: apple: parser: constify parser data
jannau Dec 10, 2023
b8904df
drm: apple: epic: Pass full notfiy/report payload to handler
jannau Dec 10, 2023
b07f7c0
drm: apple: epic: systemep: Parse "mNits" log events
jannau Dec 10, 2023
9c00c62
fixup! mux: apple DP xbar: Add Apple silicon DisplayPort crossbar
jannau Dec 11, 2023
4fedb65
drm/apple: Add missing RTKit Kconfig dependency
alyssais Jan 11, 2024
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
Prev Previous commit
Next Next commit
drm/apple: Add somewhat useful debug prints
Signed-off-by: Janne Grunau <j@jannau.net>
  • Loading branch information
jannau authored and marcan committed Nov 19, 2023
commit de13dee4f9ebce4b28c021ad99c158969c677ec3
24 changes: 23 additions & 1 deletion drivers/gpu/drm/apple/dcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ void dcp_drm_crtc_vblank(struct apple_crtc *crtc)
static void dcpep_cb_swap_complete(struct apple_dcp *dcp,
struct dc_swap_complete_resp *resp)
{
dev_dbg(dcp->dev, "swap complete for swap_id: %u vblank: %u",
resp->swap_id, dcp->ignore_swap_complete);

if (!dcp->ignore_swap_complete)
dcp_drm_crtc_vblank(dcp->crtc);
}
Expand Down Expand Up @@ -700,6 +703,7 @@ static void boot_done(struct apple_dcp *dcp, void *out, void *cookie)
{
struct dcp_cb_channel *ch = &dcp->ch_cb;
u8 *succ = ch->output[ch->depth - 1];
dev_dbg(dcp->dev, "boot done");

*succ = true;
dcp_ack(dcp, DCP_CONTEXT_CB);
Expand Down Expand Up @@ -808,6 +812,7 @@ static void dcp_swap_clear_started(struct apple_dcp *dcp, void *data,
void *cookie)
{
struct dcp_swap_start_resp *resp = data;
dev_dbg(dcp->dev, "%s swap_id: %u", __func__, resp->swap_id);
dcp->swap.swap.swap_id = resp->swap_id;

if (cookie) {
Expand Down Expand Up @@ -925,6 +930,8 @@ void dcp_poweroff(struct platform_device *pdev)
return;
}

dev_dbg(dcp->dev, "%s: clear swap submitted: %u", __func__, swap_id);

poff_cookie = kzalloc(sizeof(*poff_cookie), GFP_KERNEL);
if (!poff_cookie)
return;
Expand Down Expand Up @@ -963,6 +970,7 @@ void dcp_hotplug(struct work_struct *work)
dev = connector->base.dev;

dcp = platform_get_drvdata(connector->dcp);
dev_info(dcp->dev, "%s: connected: %d", __func__, connector->connected);

/*
* DCP defers link training until we set a display mode. But we set
Expand Down Expand Up @@ -998,6 +1006,14 @@ static void dcpep_cb_hotplug(struct apple_dcp *dcp, u64 *connected)
}
}

static void
dcpep_cb_swap_complete_intent_gated(struct apple_dcp *dcp,
struct dcp_swap_complete_intent_gated *info)
{
dev_dbg(dcp->dev, "swap_id:%u width:%u height:%u", info->swap_id,
info->width, info->height);
}

/*
* Helper to send a DRM vblank event. We do not know how call swap_submit_dcp
* without surfaces. To avoid timeouts in drm_atomic_helper_wait_for_vblanks
Expand Down Expand Up @@ -1090,6 +1106,9 @@ TRAMPOLINE_OUT(trampoline_rt_bandwidth, dcpep_cb_rt_bandwidth,
TRAMPOLINE_OUT(trampoline_get_frequency, dcpep_cb_get_frequency, u64);
TRAMPOLINE_OUT(trampoline_get_time, dcpep_cb_get_time, u64);
TRAMPOLINE_IN(trampoline_hotplug, dcpep_cb_hotplug, u64);
TRAMPOLINE_IN(trampoline_swap_complete_intent_gated,
dcpep_cb_swap_complete_intent_gated,
struct dcp_swap_complete_intent_gated);

bool (*const dcpep_cb_handlers[DCPEP_MAX_CB])(struct apple_dcp *, int, void *, void *) = {
[0] = trampoline_true, /* did_boot_signal */
Expand Down Expand Up @@ -1138,7 +1157,7 @@ bool (*const dcpep_cb_handlers[DCPEP_MAX_CB])(struct apple_dcp *, int, void *, v
[577] = trampoline_nop, /* powerstate_notify */
[582] = trampoline_true, /* create_default_fb_surface */
[589] = trampoline_swap_complete,
[591] = trampoline_nop, /* swap_complete_intent_gated */
[591] = trampoline_swap_complete_intent_gated,
[593] = trampoline_nop, /* enable_backlight_message_ap_gated */
[598] = trampoline_nop, /* find_swap_function_gated */
};
Expand Down Expand Up @@ -1469,6 +1488,8 @@ void dcp_flush(struct drm_crtc *crtc, struct drm_atomic_state *state)
return;
}

dev_info(dcp->dev, "set_digital_out_mode(color:%d timing:%d)",
mode->color_mode_id, mode->timing_mode_id);
dcp->mode = (struct dcp_set_digital_out_mode_req) {
.color_mode_id = mode->color_mode_id,
.timing_mode_id = mode->timing_mode_id
Expand All @@ -1486,6 +1507,7 @@ void dcp_flush(struct drm_crtc *crtc, struct drm_atomic_state *state)
dcp_set_digital_out_mode(dcp, false, &dcp->mode,
complete_set_digital_out_mode, cookie);

dev_dbg(dcp->dev, "%s - wait for modeset", __func__);
ret = wait_for_completion_timeout(&cookie->done, msecs_to_jiffies(500));

if (atomic_dec_and_test(&cookie->refcount))
Expand Down