ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
<jevinskie[m]> Is this an accidental mix of 64 and 128 bit copying? I can’t grok it otherwise. https://github.com/AsahiLinux/m1n1/blob/95ef45fd11dbc3d9da2781ac691136873b910c25/proxyclient/tools/chainload.py#L94
method_ has quit [Ping timeout: 480 seconds]
phiologe has quit [Ping timeout: 480 seconds]
Method has joined #asahi-dev
kov has quit [Quit: Coyote finally caught me]
<marcan> jevinskie[m]: yes it is, ha
<marcan> jevinskie[m]: fixed, thanks :)
the_lanetly_052__ has joined #asahi-dev
<marcan> robher_: to revisit the "tunables" issue, what are your thoughts on blobs in the DT? Apple puts a pile of register pokes in the DT to configure the USB3/Thunderbolt/DP PHYs... and in this case AIUI they have to be applied at runtime depending on what's connected
<marcan> I checked and they do indeed differ between different devices using the same SoC, though only slightly (not sure if they differ between different units of the same device)
<marcan> so we can't just throw it into the driver :/
<marcan> I think this has come up a few times before in vendor trees, but I don't know if any mainlined driver does this kind of thing?
<marcan> lol, soc/fsl/cpm_qe/qe.txt apparently puts an entire *firmware* blob in the devicetree? :D
<marcan> I see there's some precedent in stuff like qcom,ath10k-pre-calibration-data, but those are opaque blobs
<marcan> I don't know if there's anything that's a list of registers to write and values/masks
<marcan> (which is what we have)
the_lanetly_052__ has quit [Ping timeout: 480 seconds]
<jannau> is the difference between devices in the written values or are there differences in the registers or the order of writes?
<jannau> if only values differ it can be easily transformed into a blob. The only disadvantage is that forward compatibility might not be possible
<jannau> marcan: don't we need to wait for Rob's ack on the iMac addition in the bindings change as well
<marcan> yes, it's along similar lines though
<marcan> jannau: usually the written values, but sometimes there's an extra reg or a whole tunable is missing/empty
<marcan> I think if we're doing this it's not worth trying to hardcode the offsets
<marcan> in fact, given what Apple did with t6000 in the memory controller, if this kind of thing is acceptable I'm tempted to use it for the mcc OPP table too, since t8103 needs two pokes and t6000 only one (to a different place) for the performance switching, but they're otherwise identical in high-level construction (number of channels differs but that was a variable already)
<marcan> I figure if we're putting magic reg values in the DT at all, we might as well put the reg addresses too and make it forward-compatible
<marcan> though right now apple uses the same values for everything in the MCC case, so alternatively this could all be hardcoded in the driver and driven by the SoC compatible
the_lanetly_052__ has joined #asahi-dev
aleasto has joined #asahi-dev
kov has joined #asahi-dev
akemin_dayo has quit [Ping timeout: 480 seconds]
<kettenis> the MCC driver isn't really essential is it?
<kettenis> I mean, things will still work if for some future SoC the driver isn't there
<marcan> yes, it isn't, as long as cpufreq doesn't fail poorly without it
<marcan> though I think other parts of MCC are more stable between SoCs, e.g. we should implement error control
<kettenis> so then you'd need a "generic" compatible and you'd only apply the values if a more specific compatible matches as well
<kettenis> if you choose to put the values in the driver that is
<kettenis> but maybe the actual values depend on the RAM modules integrated in the SoC?
<kettenis> and Apple will maybe source different RAM modules at some point that need different parameters?
<marcan> nah, I don't think so. they're power management timers.
<marcan> I don't think it changes any characteristics of the interface, it just changes how eagerly it goes into lower power modes (to reduce cache miss latency when the CPUs are busy)
<marcan> I tried random values, zero, etc, and nothing broke (in fact I got better performance with zero, which presumably turns off all the PM stuff altogether)
<povik> i am thinking about how i should express the MCA stuff in DT
<povik> seems to me there should be one parent node for the MCA block as a whole
<povik> and then child nodes for particular subdivisions, let's call them clusters
<povik> now the clusters need to have a cluster index within the MCA as a whole
<povik> and also clusters have associated mmio ranges, which cannot be systematically derived from some large range for the whole MCA
<povik> i am thinking the cluster index should be in the reg= of the child nodes
<povik> a then the mmio ranges for the clusters should be listed in the parent node
<kettenis> that sounds wrong
<povik> another option is having the mmio ranges in reg= of the cluster nodes, and then an extra property for the cluster index
<kettenis> what do you need the cluster index for?
<povik> it is important for configuration in some registers
<kettenis> then I'd suggest using a property for that
<kettenis> "apple,cluster"
<povik> cluster-idx perhaps?
<kettenis> sure; but maybe check the existing bindings to see if there is an established pattern for such things
<povik> yeah
<kettenis> you can add a "syscon" compatible to the MCA block node to make it provide a regmap
<kettenis> and then use the "reg" property in the child nodes to provide offsets within the block of registers
<povik> hm, haven't seen "syscon" yet, will look at that
<marcan> see how pmgr does it
<marcan> though there's two ways, if you add a simple-mfd compatible it will probe the child nodes for you; if you don't it won't and the parent will be in charge of requesting that (which makes more sense if you have a common driver)
<marcan> also look at other ALSA/ASoC stuff because there's a good chance some other SoC does it similarly
<kettenis> there are two schemes for specifying how the various audio components are related
<kettenis> and it isn't clear to me what the preferred way of doing that is
<kettenis> "simple-audio" and "audio-graph"
not_a_weeaboo[m] has joined #asahi-dev
akemin_dayo has joined #asahi-dev
akemin_dayo has quit [Ping timeout: 480 seconds]
akemin_dayo has joined #asahi-dev
the_lanetly_052___ has joined #asahi-dev
the_lanetly_052__ has quit [Ping timeout: 480 seconds]
indra has joined #asahi-dev
leah has quit [Quit: WeeChat 3.3]
indra has quit []
slicey has joined #asahi-dev
Gaspare has joined #asahi-dev
yuyichao has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi-dev
littledust3403[m] has joined #asahi-dev
akemin_dayo has quit [Ping timeout: 480 seconds]
akemin_dayo has joined #asahi-dev
<sven> the rtkit protocol seems to have at least the following power states: 0, 1, 2, maybe 3, 0x10, 0x20 and i think you can set an additional flag (0x200) for some of them which does $something while it's ignored for others
<sven> 0 it power off, 0x20 is power on (and so is 0x220 which seems to be the same). 0x10 is some kind of hibernation or sleep mode. no idea yet about 1 or 2 (or maybe 3; need to double check tomorrow) or what that flag means
aleasto has quit [Remote host closed the connection]
Dcow has quit [Read error: Connection reset by peer]
Dcow_ has joined #asahi-dev
Gaspare has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gaspare has joined #asahi-dev
slicey has quit [Quit: zzz]
Gaspare has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slicey has joined #asahi-dev
Gaspare has joined #asahi-dev
yuyichao has quit [Ping timeout: 480 seconds]
Gaspare has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Gaspare has joined #asahi-dev
X-Scale` has joined #asahi-dev
X-Scale has quit [Ping timeout: 480 seconds]
X-Scale has joined #asahi-dev