#
✕ nick:jannau
#asahi-dev · 2022-10-31 14:20
jannaumarcan: backlight-marketing-table seems to 16.16 display brightness values in nits. those might be the steps used by the brightness keys
#asahi-dev · 2022-10-31 06:45
jannautpw_rules: at some point the gpu couldn't be build as module due to the rust bindings, not sure if that is still the case
#asahi-dev · 2022-10-31 06:44
jannautpw_rules: it would be far too dim if it was the same unit and scale. not even sure if chnaging the nvram value did anything. not really worth looking at atm
#asahi-dev · 2022-10-31 00:52
jannaucurses apple for not always clearing the shmem. this looked so random in the dumps that I thought it was leftover
#asahi-dev · 2022-10-31 00:51
jannaubest guess from the ADT backloight node is that DCP sets a DAC register, a look up table provides current and there are coefficients to calculate nits from current
#asahi-dev · 2022-10-31 00:48
jannaudcp appears to report the brightness in nits, unsure what we have to do to set the brightness in nits
#asahi-dev · 2022-10-31 00:46
jannauannotations are at least incomplete, I have no idea what the "flags" are doing
#asahi-dev · 2022-10-31 00:45
jannaumarcan: https://github.com/jannau/linux/tree/dcp-backlight-wip and https://github.com/jannau/m1n1/tree/dcp-brightness hacked together backlight control, not for testing
#asahi-dev · 2022-10-30 23:28
jannauthe adt translates the base mmio by 0x200000000
#asahi-dev · 2022-10-30 21:12
jannaubased on the ADT I suspect the scale might be current
#asahi-dev · 2022-10-30 21:11
jannauscale is 0x10000000 - 0x7F3FABC0 (SDR, macbook pro 14") and it reports back nits. 4 - 500 Nits in this case
#asahi-dev · 2022-10-30 20:05
jannauI still don't understand the how exactly it's coded and what the limits are
#asahi-dev · 2022-10-30 20:04
jannausigh, I finally found out how to set the backlight. much easier than thought, it's encoded in 0x2e4 - 0x2f3 of dcp_swap/swap_rec
#asahi-dev · 2022-10-29 19:43
jannaubut the main advantage is that it is much simpler and you don't have to fight with udev to avoid races
#asahi-dev · 2022-10-29 19:41
jannauyou can have the esp/kernel/initrd on the nvme and the root partition on usb
#asahi-dev · 2022-10-29 14:33
jannauand seconds is correct: https://github.com/torvalds/linux/blob/master/include/linux/power_supply.h#L23
#asahi-dev · 2022-10-29 14:32
jannauthasti: it's interpreted correctly by kde
#asahi-dev · 2022-10-29 08:01
jannaupwd? the keyboard pwm driver is not yet merged. it is https://github.com/AsahiLinux/linux/pull/57
#asahi-dev · 2022-10-29 07:10
jannauChaosPrincess: kbd pwm driver works on m2
#asahi-dev · 2022-10-29 06:55
jannauworks fine if all darts are probed first, i.e. workaround is to build dart not as module
#asahi-dev · 2022-10-29 06:54
jannauthere is also issue with dart/iommu device probing. most likely affecting devices with multiple darts like usb, audio on t600x, pcie
#asahi-dev · 2022-10-29 06:51
jannaufails usually at 1-3 try
#asahi-dev · 2022-10-29 06:50
jannaureproduction is disconnecting and reconnected usb-c devices/charger a couple of times
#asahi-dev · 2022-10-29 06:49
jannaucurrent minimal workaround are udelay(200) before read/write in tps6598x_block_read and tps6598x_block_write
#asahi-dev · 2022-10-29 06:47
jannauI think the issue might be acessing tipd too quickly after an interrupt
#asahi-dev · 2022-10-29 06:46
jannauI can reproduce the tipd issue easily on the m2 macbook with asahi-dev without HV
#asahi-dev · 2022-10-27 11:42
jannauI think the 2 alpha bits being LSB instead of MSB could explain it
#asahi-dev · 2022-10-27 11:41
jannauI noticed yesterday that kde updated to 5.26 looked a little weird, similar to displaying full range yuv as limited range
#asahi-dev · 2022-10-27 11:38
jannauI didn't really verified it. colors looked not broken, I saw macos use it during boot and assumed it's the same format as the boot framebuffer
#asahi-dev · 2022-10-27 11:36
jannauthis would be an issue with https://github.com/AsahiLinux/linux/commit/8e60a84dfd06712e1f0e68f09c21774c43fdc840
#asahi-dev · 2022-10-27 11:24
jannaumarcan: is kwin preference for XRGB2101010 in 5.26? dcp's 30-bit format might be RGBA1010102, colors looked slightly off on the system which is already updated to 5.26
#asahi-dev · 2022-10-27 09:21
jannauyes, that case does not need update-vendor-firmware but can be simpler, no need check the manifest if the initramfs has no firmware at all
#asahi-dev · 2022-10-25 17:34
jannauonly change which fixes it reliably is a 'msleep(1)' after the interrupt but I haven't tried reduce the delay. usleep(100); was not enough
#asahi-dev · 2022-10-25 17:26
jannaugood night
#asahi-dev · 2022-10-25 17:24
jannauasahi-wip from yesterday with dcp enabled, efbcbf2614e459da041cd84f9cdba13cfd1eb462
#asahi-dev · 2022-10-25 17:18
jannauI'm hitting tps6598x / i2c irq issue now on the studio as well. I didn't hit it yesterday at all
#asahi-dev · 2022-10-25 11:01
jannauand post instructions to boot kernel with modules and firmware via run_guest_kernel.sh
#asahi-dev · 2022-10-25 11:00
jannaufirmware cpio would be nice, I should file the concatenated initramfs payload change
#asahi-dev · 2022-10-25 10:58
jannausven: nice, starting with DP integration in atcphy.c?
#asahi-dev · 2022-10-25 10:58
jannauI hope drm's fbdev emulation / fbcon remembers that tonight
#asahi-dev · 2022-10-25 07:09
jannauI haven't looked into what's necessary for 120Hz, either just setting a flag or using timestamps
#asahi-dev · 2022-10-25 07:07
jannauit's not realy 120Hz, dcp limits swaps still to 60Hz
#asahi-dev · 2022-10-25 07:06
jannaubehavior is less nice on plasma/wayland since in addition to slow painting you now have additional wait on dcp swapping framebuffers
#asahi-dev · 2022-10-25 07:05
jannauthat sounds more like an mesa issue
#asahi-dev · 2022-10-25 07:04
jannauI see the framerate dropping to 10fps if the full screen needs to be repainted
#asahi-dev · 2022-10-25 07:03
jannauwhat do you mean by dodgy? is that just a result of the low framerate or did I leave in the broken cursor handling? does the cursor break (scaled weirdly) when moved off screen?
#asahi-dev · 2022-10-25 06:30
jannaudcp notchless patch if anyone wants to play https://www.jannau.net/asahi/gpu_drm_apple_notchless.mbox
#asahi-dev · 2022-10-25 06:30
jannaum1n1 PR to fix the dcpext carveouts on m1 pro filed, also saves the notch height for dcp's use
#asahi-dev · 2022-10-25 05:31
jannauwithout notch avoidance it looks the same except that the framebuffer has 74 more lines
#asahi-dev · 2022-10-25 05:28
jannauyes, screen goes black when dcp takes over from simpledrm. as far as I can tell that's a new framebuffer. mapped physical memory is normal memory from the beginning instead of the carveout from the end

plus ›