#
#asahi-dev · 2026-06-24 08:30
yukait is bad in a way because then if there's a bug in the firmware, you can't fix it
#asahi-dev · 2026-06-24 08:29
chaos_princessneutral
#asahi-dev · 2026-06-24 08:29
sofuschaos_princess: is that not prefered?
#asahi-dev · 2026-06-24 08:28
sofusJamesCalligeros[m]: yeah no way where using apple's fw
#asahi-dev · 2026-06-24 08:27
chaos_princesssofus: just a joke on how many vendors like to put as much as possible into the firmware and not the driver
#asahi-dev · 2026-06-24 08:26
integralpilot*dockchannel-uart tty driver
#asahi-dev · 2026-06-24 08:26
JamesCalligeros[m]And id still spin our own because pulling apple’s out of the kext will suck
#asahi-dev · 2026-06-24 08:26
integralpilotjust finished the first draft
#asahi-dev · 2026-06-24 08:26
integralpilotokay i am testing my dockchannel tty driver (that uses the mailbox) now. will report back how it goes
#asahi-dev · 2026-06-24 08:26
JamesCalligeros[m]Ideally the cm3 runs fw that exposes a unified interface to linux (or at least an interface for each codec) and we deal with instruction dispatch to the ffu on the cm3 i agree
#asahi-dev · 2026-06-24 08:25
sofuschaos_princess: not sure what you mean by that?
#asahi-dev · 2026-06-24 08:20
chaos_princessnow you are thinking like a vendor
#asahi-dev · 2026-06-24 08:17
sofusre the speed, i thought it wont matter since its sequential mmio writes
#asahi-dev · 2026-06-24 08:16
sofuschadmed: makes sense thanks, although im still playing with the idea of generating/writing instructions on the cm3
#asahi-dev · 2026-06-24 08:10
integralpilotis that not ideal?
#asahi-dev · 2026-06-24 08:10
yukathere on page 3, the tty driver has line discipline
#asahi-dev · 2026-06-24 08:09
yukaAh, maybe I confused something
#asahi-dev · 2026-06-24 08:09
yukahttps://bootlin.com/doc/legacy/serial-drivers/linux-serial-drivers.pdf
#asahi-dev · 2026-06-24 08:07
integralpilotand with tty the faking and implementing meaningless functions isnt needed
#asahi-dev · 2026-06-24 08:06
integralpilotand i think faking etc. is not really ideal for upstream
#asahi-dev · 2026-06-24 08:06
integralpiloti might be remembering wrong though!
#asahi-dev · 2026-06-24 08:05
integralpiloti think with uart drivers, implementing (which you would have to fake) baud, line control, a `struct uart_port` is required, not optional (unlike tty) and you would have to implement a lot of meaningless functions like set_termios, tx_empty, get_mctrl etc.
#asahi-dev · 2026-06-24 08:03
yukathis was my conclusion after several hours of reading docs and code, but I may be wrong
#asahi-dev · 2026-06-24 08:02
yukaSo in our case the tty part is implemented in kisd in userspace, and the other side needs to be a uart driver
#asahi-dev · 2026-06-24 08:02
yukaso I interpret this as two sides, the tty is where you are on the "typewriter" side (where the user is sitting in front of), and the uart side is on the machine the "typewriter" is connected to
#asahi-dev · 2026-06-24 08:01
yukafor example, cdc-acm is a tty driver, while the samsung_tty is a uart+console driver
#asahi-dev · 2026-06-24 08:00
yukatty drivers can also implement termios and baudrate change things, no?
#asahi-dev · 2026-06-24 08:00
yukaI think we want the line discipline (echoing back characters etc) in this case and we can ignore the baudrate change things
#asahi-dev · 2026-06-24 07:59
integralpilotyes, i believe so
#asahi-dev · 2026-06-24 07:58
yukaCan you do a console driver on top of a tty driver?
#asahi-dev · 2026-06-24 07:57
integralpilota plain TTY driver is probably better
#asahi-dev · 2026-06-24 07:57
integralpilotyuka: are you sure you want a uart driver? there's no baud/termios/modem state etc. for dockchannel (at least to my knowledge), which i think uart_port needs
#asahi-dev · 2026-06-24 07:54
chadmed_and let the implementation of push() deal with the hw specifics
#asahi-dev · 2026-06-24 07:53
chadmed_so instead of having to evaluate each quirk every time in the hot path, you just do something like avd->hw->push(...)
#asahi-dev · 2026-06-24 07:53
chadmed_sofus: re the quirks system, given the combinatorics involved here and the pathways in which we need to use them, it may be better to write hw-specific versions of the functions and specify which one each avd variant must use in its match data or an ops struct
#asahi-dev · 2026-06-24 07:53
yukaI then got stuck on a bunch of design decisions like is each channel its own device tree node
#asahi-dev · 2026-06-24 07:52
yukaAnd dynamically allocated major number
#asahi-dev · 2026-06-24 07:48
yukaWe probably want a uart+console driver
#asahi-dev · 2026-06-24 07:47
yukaIt took me a while to understand the difference between tty, uart and console drivers
#asahi-dev · 2026-06-24 06:21
JamesCalligeros[m]And then colourspaces when those land in the api
#asahi-dev · 2026-06-24 06:20
JamesCalligeros[m]Either way we need to hook up the eotfs
#asahi-dev · 2026-06-24 06:20
JamesCalligeros[m]I need to have another crack at colour pipelines. I think iosurface might have space for a per-surface clut but im not sure
#asahi-dev · 2026-06-24 06:20
svenGreat!
#asahi-dev · 2026-06-24 06:12
integralpiloti'll try it out later tonight
#asahi-dev · 2026-06-24 06:09
svencan we just try UART and see what happens? we have kisd and all the infrastructure now and a simple UART driver that uses mbox shouldn’t be hard
#asahi-dev · 2026-06-24 06:09
svenwe may need to access the regs directly for earlycon anyway
#asahi-dev · 2026-06-24 06:07
JamesCalligeros[m]Upstream will likely be fine with it if there’s a decent justification. Having to handle an irq on every single byte if we use mailbox is a fine justification.
#asahi-dev · 2026-06-24 06:05
integralpiloti am honestly fine with either but probably leaning towards #1 just as its cleaner and gives us more options later when we do serial, hb you guys?
#asahi-dev · 2026-06-24 06:05
integralpilot2. have a TTY driver for DockChannel. and then the HID driver accesses that through serdev. more complex though.
#asahi-dev · 2026-06-24 06:04
integralpilot1. mailbox for HID. for serial: either coalesced mailbox, or just access raw hardware regs directly in the TTY driver (upstream might not like, but if justifiable for speed might be ok)

plus ›