Repository navigation
Conversation
chadmed
requested changes
Sep 9, 2026
| <0x2 0x8f348000 0x0 0x4000>, /* dummy ? */ | ||
| <0x2 0x8f800000 0x0 0x800000>; | ||
| apple,bw-scratch = <&pmgr_dcp 0 5 0x988>; | ||
| apple,iomfb-surfaces = <1 1 0 1>; |
Member
There was a problem hiding this comment.
Have we tested various combinations of surface? I'm hoping that we have less buggy nonsense on the M3+ DCPs.
Author
There was a problem hiding this comment.
How can that be tested? I installed and tried kwin with KWIN_USE_OVERLAYS=1, but i think its only using two planes.
Author
|
i added dcpext nodes for t8122 and t603[124] |
jakobkukla
reviewed
Sep 28, 2026
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
DCP supports multiple addressing and framebuffer compression formats. While DCP does seem to support direct scanout of AGX layout images (APPLE_GPU_TILED/APPLE_GPU_TILED_COMPRESSED), macOS is never observed doing this. Instead, it uses a secret third layout called Apple Interchange. Apple Interchange is a tiled and compressed framebuffer format similar to AGX's native format, albeit with slightly different addressing. RGB images and the chroma channels of Y'CbCr images share a tile size of 16x16, while the luma channel of Y'CbCr formats has a tile size of 32x32. Define enums for both addressing format and compression mode, and add known supported modes for each. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Apple Interchange is a tiled and compressed framebuffer layout used for sharing framebuffers between Apple hardware blocks (AGX, AVD, DCP). DCP can scan out framebuffers in Interchange format. Add support for this to the Linux driver. Co-developed-by: Oliver Bestmann <oliver.bestmann@googlemail.com> Signed-off-by: Oliver Bestmann <oliver.bestmann@googlemail.com> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: Janne Grunau <j@jannau.net>
On DCPs which support scanout on >2 surfaces (T8112 and later), using
Interchange on all of them will cause the coprocessor to crash. It is
unclear why this is the case.
This is never observed on macOS for two reasons:
1. macOS never uses more than two planes at a time; and
2. The second plane is almost always a linear framebuffer,
except when scanning out video from AVD.
On Linux, we can avoid these crashes by simply hiding Interchange from
one of the surfaces. Since the topmost surface on these DCPs will almost
always be used only for a cursor, and since a tiny cursor framebuffer
is not bandwidth-critical, simply advertise it as linear only. This fixes
spurious crashes on T602x and T8112.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
The image tile size calculation was being done by rounding up bits per pixel and dividing by 8. The entire size in bytes needs to be rounded up and divided by 8. Fixes: cb69536 ("drm: apple: Add support for Apple Interchange framebuffers") Signed-off-by: Sofus Forstreuter <sofus.c@icloud.com> Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Some pixel formats supported by both AVD and DCP do not have integer bits per pixel values when using drm_format_info_bpp. Calculate the bits per pixel "manually" instead. Signed-off-by: Sofus Forstreuter <sofus.c@icloud.com> Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
AVD's 10-bit semiplanar YCbCr output is in P030, P230 and P430 for both video and full range. DCP firmware supports these, so add them to the list of supported formats. Signed-off-by: Sofus Forstreuter <sofus.c@icloud.com> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Signed-off-by: Janne Grunau <j@jannau.net>
Subdevice initialization is a low priority process and it does not make sense to initialize multiple interface concurrently. Remove the bogus `WQ_MEM_RECLAIM` flags. Fixes following warning in Linux 7.2: [ 4.914732] workqueue: dchid-new is using neither WQ_PERCPU or WQ_UNBOUND. Setting WQ_PERCPU. [ 4.919378] WARNING: kernel/workqueue.c:5851 Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Author
|
I rebased onto asahi-wip and added pmp power domains (not for the multi die stuff since im not sure how that should work) |
jannau
force-pushed
the
asahi-wip
branch
2 times, most recently
from
October 26, 2026 21:44
a7c69b6 to
902cebd
Compare
Member
|
merged manually (mixed with changes from #607 and heavy editing by me) and pushed to asahi-wip. Tested on t8122, t6030 and t6031 (j504/j514s/j514c). Only working with m1n1 changes. Thanks. |
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 14, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 14, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 19, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 19, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 20, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
hitori-chan
added a commit
to hitori-chan/linux
that referenced
this pull request
Nov 20, 2026
dwc3-apple brings the mode and the core up and down itself, per cable
(skip_core_init_mode), and takes both down in its remove before
dwc3_core_remove(). That then exited them again through the dr_mode
the glue had set for the last role: dwc3_gadget_exit() a second time
freed the gadget, its bounce buffer and its control TRBs again (an
unbind of a device-mode port oopsed), and dwc3_core_exit() a second
time powered the PHYs off again, their runtime PM counts below zero.
Record skip_core_init_mode at probe and, with it, leave the mode's
exit and dwc3_core_exit() to the glue in dwc3_core_remove().
r215, a host-mode port's unbind (ftrace): dwc3_host_exit and
dwc3_core_exit called again from dwc3_core_remove, and "phy
phy-703000000.phy.{0,1}: Runtime PM usage count underflow!" for each
port's two PHYs; a device-mode port's unbind killed its writer. This
commit (AsahiLinux#608, 2026-11-14): unbind, bind and unbind again of all three
ports, the device-mode one included: no oops, warning or underflow.
A rebound controller still gets no role until a reboot: tipd keeps the
role switch it got at its probe, which the unbind unregistered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
there is some overlap with #607
it will not work withouth 62bd293
It also needs m1n1 changes, for t6030 i needed: