@mjg59 to be fair, suspend/resume doesn't work on the desktop I mounted last year with good specs from that time... I'm sure the vendor (Gigabyte) will tell me that "it works on Windows", but it still doesn't make it work on Linux...
That said, Device Tree seems truly horrendous, from the work I had to do from far away on some ARM projects.
@mjg59 "probably" is a strong word here. I still had my fair share of sleep/resume problems on both a Tuxedo computer and Lenovo computers.
ACPI is a mess by itself.
"Why does ACPI exist" - - the greatest thread in the history of forums, locked by a moderator after 12,239 pages of heated debate, wait no let me start again.<br /><br />Why does ACPI exist? In the beforetimes power management on x86 was done by jumping to an opaque BIOS entry point and hoping it wo
@mjg59 @azonenberg @dalias And I want the ARM world to move away from the insanity that is the current DTBs:
* They suck at describing the hardware, they are more a Linux config file: Linux forks (vendor trees) will always have incompatible ones because upstream doesnt care about compatibility...
* Not only every SoC needs to be supported, every board needs its own broken DTB... Which leads to board-specific brokeness for SoC-provided features!
* Good mainline support never comes before the effective end of life of the device... Even with big companies working on it with significant resources!
By allowing DTBs to exist, vendors could start making SoCs very very diverse without caring about the software ecosystem. This is nuts and this insanity needs to be stopped by introducing discoverable buses and blocks, then add per-vendor platform drivers as a glue. Something akin to ACPI would then be introduced for board-specific customization.
You can keep the compatibles and the equivalent of a DTB to document if blocks are user-visible or not (so that he is not exposed to the user otherwise). New SoCs should finally be mostly backwards compatible, allowing basic release-day upstream support, and reducing the need for vendor trees, or the cost of mainlining.
@mupuf @mjg59 @azonenberg @dalias why should upstream care about compatibility with downstream vendor forks? Vendor forks are a nightmare and often everything to support a soc is just hacked together piece of something.
Also every board has some board-specific layouts and so we need separate dts, as dts describe hardware.
And comparing dts with ACPI is unfair.. like comparing apples to pears.
@austriancoder @mjg59 @azonenberg @dalias Right, I wasn't being clear here.
Upstream should care because if DTBs WERE a hardware description language, it could be standardized and would not depend on driver *implementations*. It could then be embedded by the vendor in the firmware and new boards could get release-day upstream support.
In the x86 world, we have essentially what I recommended: Discoverability using pci vendor: device, then a "platform" driver called amdgpu/nouveau/whatever, and a vendor-specific board description language in the video bios. And then no need for per-gpu DTBs.
IMO, hardware description is the vendor's job. Upstream should just take it and roll with it. The fact it doesn't is IMO a failure of the model and a proof than describing the hardware like that is a fool's errand. Unfortunately, vendors have little incentive to keep on maintaining their tree, so that leads to the terrible user experience: either use outdated hardware with good upstream support, or use outdated vendor trees on newer hardware. Everybody loses...
As for ACPI vs DTB comparison: they are meant to solve roughly the same problem, aren't they? Abstract away hardware differences from the OS PoV so that the same kernel binary can work on two boards.
@mjg59 @austriancoder @azonenberg @dalias indeed. I would call ACPI a pragmatic approach: describing hardware in a generic way is pretty much impossible, so let's separate concerns and let the firmware provide the scripts to run when wanting to do X.
This means it is hard to teach new tricks to old boards without the vendor providing firmware updates, but you gain a much more consistent user experience and release-day upstream support.
If we could have ACPI-like support for release day support, then open firmware + dtb-based solution with upstream later on, I guess it would be the best of both worlds and upstream Linux could be used at all time... We'll see how system ready will turn out, maybe it could achieve 50% of this dream?
@mripard @mjg59 @azonenberg @dalias Really? I would have assumed your opinion on this topic to be pretty similar to mine :o
Why do you think DTBs have contributed to the success of ARM? From what I could tell, everyone is feeling the pain of every little board needing custom development, and by way more people than the x86 world... What am I missing here?
@mupuf @mjg59 @azonenberg @dalias To me it's more than DT is an imperfect solution (for the reasons you outlined) to a problem ACPI can't solve. And that problem is also the reason arm has been successful.
So I'm sure if we tried and had unlimited political power and technical resources, we could do better than DT. But we need something that you can use with a decent time to market, no license cost, easy to modify (including at runtime), very fast to boot, and that can deal with complex topologies (and I'm probably forgetting some).