Hacker News new | ask | show | jobs
by indolering 3480 days ago
Dave Airlie's followup is pretty great,

> Here's the thing, we want AMD to join the graphics community not hang out inside the company in silos. We need to enable FreeSync on Linux, go ask the community how would be best to do it, don't shove it inside the driver hidden in a special ioctl. Got some new HDMI features that are secret, talk to other ppl in the same position and work out a plan for moving forward. At the moment there is no engaging with the Linux stack because you aren't really using it, as long as you hide behind the abstraction there won't be much engagement, and neither side benefits, so why should we merge the code if nobody benefits?

> The platform problem/Windows mindset is scary and makes a lot of decisions for you, open source doesn't have those restrictions, and I don't accept drivers that try and push those development model problems into our codebase.

3 comments

I agree with Dave. If they need an HAL, that is why standards are for. USB does not need any HAL. It is standardized. And this is where Khronos group falls short.

They provide a standard implemented by the driver and not the hardware. There is not even a standard to get performance metrics for GFX cards. Nothing.

I agree with Dave. If you do not want to create the standard, leave others to do it. But having an HAL inside the driver is problematic.

Shall we have a cross-platform standard for writing cross-platform drivers? Write once, run everywhere? Why not as long as it is open source.

But it still needs someone to govern it, like linux kernel project and device companies do not seem interested. Which says a lot for their intentions.

That's an interesting take from someone who develops a kernel that the rest of the world has to rip out all sorts of "linux'isms" from code daily and deal with the pain of porting non portable Linux code to their platform. Jesus the hypocrisy is deep.
So Linux is not allowed to demand quality code that is following their conventions and has to be satisfied with the minimum amount of effort for AMD's Windows code to run? Why should the Linux kernel include an abstraction layer for AMD's Windows code? Why would any sane person agree to that?

> all sorts of "linux'isms" from code daily and deal with the pain of porting non portable Linux code to their platform.

If you're developing for Linux, using Linux specific technology, then of course there would be porting effort required.

Same as if you want to make you Windows stuff work on Linux, there should be porting required - after all, it's a different platform,

What AMD wants to do is to sidestep as much of the porting as possible, by effectively shipping their Windows code inside the Linux kernel.

> So Linux is not allowed to demand quality code that is following their conventions and has to be satisfied with the minimum amount of effort for AMD's Windows code to run? Why should the Linux kernel include an abstraction layer for AMD's Windows code? Why would any sane person agree to that?

Linux is open source, so if the kernel developers desire better designed code, they are free to change the code up to their quality levels. If the kernel development team does not have the manpower for this, they should better think about a way to maintain the kernel that involves less work. One example (among many) would be to think about a way to keep the internal kernel interfaces typically stable over many years so that only rarely there is a lot work to be done for updating all the drivers to the new internal kernel interfaces.

> If you're developing for Linux, using Linux specific technology, then of course there would be porting effort required.

The released open source drivers seem to work quite well (as they do on Windows). The problem is that they don't fit the taste of the kernel developers.

> Linux is open source

Open source does not mean, "any code accepted here!"

> if the kernel developers desire better designed code, they are free to change the code up to their quality levels.

They are also free to reject bad code and demand that if you want you code in, you should improve it.

I don't get this mentality at all; why should the kernel developers accept inferior code and then improve it? Isn't that the responsibility of the vendor who designed the product? After all, AMD is a for profit company, not a charity. Why should the other developers provide charity to make AMD code better? So that AMD can sell more units or have better PR? What?

>The problem is that they don't fit the taste of the kernel developers.

That's not the problem.

The problem is that the drivers were designed for Windows, not Linux and such code is not suitable for inclusion in the Linux kernel.

Anything that breaks transactional states and atomicity isn't 'fit the taste', it's getting fired and we'll get somebody that can do those properly.

If anything, that post highlights the lack of quality among the amd driver team, and doesn't have to do much with 'taste'.

If I'm following the conversation correctly, it doesn't break anything, the kernel developers don't understand it. Also, the followup from Alex Deucher of the AMD team is interesting: https://lists.freedesktop.org/archives/dri-devel/2016-Decemb... Basically, he reckons that the atomic modesetting code is a poorly-thought out and maintained disaster that regularly breaks multiple drivers - and having somewhat followed the changelogs, I can entirely believe this. (Dave Airlie responds by blaming AMD for not sufficiently testing the upstream kernel developers' buggy changes to their drivers.)
You are probably right. But so are the kernel devs.

It seems to be an argument of: we do this for all drivers, vs amd pushing: we want to be the exception for this driver only.

> If the kernel development team does not have the manpower for this, they should better think about a way to maintain the kernel that involves less work.

Or, they could have AMD do the work, since apparently they're the ones who didn't listen -- after being told months ago -- that this rejection could happen when they tried to include a HAL with their driver. I think that perfectly works: the kernel developers don't have to "do all that work" involving un-fucking AMD's driver, and AMD instead has to do the work. Sounds good to me.

There's literally 0 point in accepting the code as-is, because everyone would be on the hook for maintenance it in the mean time, while it got un-crappified, and it would make graphics subsystem maintainers life worse. No. Kick it out, make them do it the right way, and when they come back -- they can talk.

This whole thread has got plenty of of entitled whiners and people with a bone-to-pick against Linux, like yourself, bitching,about OSS maintainers not making their own lives harder because you want feel good about your graphics driver. Get over it. Or, get involved -- maybe you could send a few patches to AMD maintainers to clean out some of the crap.

AMD is not being banned from kernel development, but they're going to have to do it right. Just like the other 20-30 companies that regularly contribute upstream to Linux with their money/developers.

In fact, Linux often accepts drivers for hardware that only certain companies have access to and are of no use to anyone else in the general public. Why? Because they played by the rules, meaning the overall maintenance cost to include those drivers becomes far smaller in the long run. The cost of including the AMDGPU driver, as it is now, is astronomically high in comparison.

> The released open source drivers seem to work quite well (as they do on Windows). The problem is that they don't fit the taste of the kernel developers.

No. Let's be clear: the problem is AMD can't listen, and people like you apparently, can't read. That's about all it comes down to. You are free to now whine and complain about how incredibly important this is and how it's definitely worth breaking the rules over and how much it means to you, and I'm sure the kernel developers owe you this feature, or something (after all, developers are just robots with no lives and if they don't work hard enough, they're bad.)

Meanwhile, it will be ignored, Linux will go on (and continue to crush its competitors in the spaces it matters in), and the world will still turn. And maybe in a year from now AMD will actually have something worth merging. In the mean time, Nvidia will continue to dominate them in the compute market. Maybe actually listening 9 months ago would have saved them some time and market share.

> In the mean time, Nvidia will continue to dominate them in the compute market. Maybe actually listening 9 months ago would have saved them some time and market share.

NVIDIA is about the furthest thing from a shining example of good behavior in the Linux kernel. By not having open source drivers at all, they're far worse.

(By the way, their closed source driver has a HAL too.)

Yeah, this seems like the kernel devs are making the classic "the perfect is the enemy of the good" mistake.

They're sending the message that AMD would be better off shipping closed source drivers, like Nvidia, because that would save them the headache of trying to get their merely good but not perfect open source drivers into the hands of users via dealing with Kernel politics.

But then again, what else is new.

If someone writes application software that depends on the linux kernel, and someone else wants to port that code to another platform, how is the fact that code changes are required the fault of the kernel developers? I don't see any hypocrisy.
I feel X86BSD here, because Linux has a history of being different for the sake of being different. A relatively recent example could be getentropy (BSD) vs getrandom (Linux).

OTOH Linux has some extremely useful syscalls that others just don't have, sometimes causing major performance regressions. Case in point: sync_file_range.

But then Linux also has a history of screwing up and having a bunch of different syscalls on different platforms because somebody introducing a syscall didn't quite think it through. Case in point: sync_file_range. This "only" causes extra work for developers directly working with syscalls - so usually libc devs.

Linux is Linux.

BSD is BSD

Windows also has different sys calls than both Linux and BSD, that's because it's a different OS.

Yes, there's POSIX in there, but generally it is its own OS and you need to treat is as such, same as Windows really.

Yes, and this discussion makes perfect sense on user level code.

Yes, Linux, Mac OSX and BSDs have their differences.

But in the kernel, code is going to (or even has to) be less generic

Not if you choose a uKernel design and para virtualize the legacy OSes.
That's a nice computer science project but ultimately irrelevant in the context of kernel mode drivers, for like 99.99% of people who use Linux.

Not that tiny hypervisors and stuff aren't cool, though.

Indeed
> because Linux has a history of being different for the sake of being different.

Heh.

I get the same feeling about git when I'm working with hg, the Canada[1] of git. For svn, darcs, bzr, and Mercurial, "revert" means to change the working directory to the repo state. Why did git use it to mean creating a new commit that undoes an old commit?

There's no use rallying against the majority software when it doesn't follow the standard. When you're the majority, you just get to make your own standards because you are the standard. BSD being the Canada of Linux, it's a little funny to hear them complaining about things that Linux does.

--

[1] http://itre.cis.upenn.edu/~myl/languagelog/archives/005497.h...

I upvoted your comment because it is a real pain. But I don't agree with blaming the Linux kernel developers for it. Neither do I think it's analogous to this particular discussion either, because a, Linux kernel developers can optimize/prioritize their kernel code as they please. b, In this case, AMD is submitting a patch to make it easier for them to support linux for their GPU. So the "ball is in their court" to find a solution the community finds acceptable.

Your case is about porting code between different OS kernels.

dave airlie forces people at gunpoint to only write software for Linux and nothing else, meaning HEROES like myself have to pick up the slack. fact-a-mundo. it's also perfectly well known that if you dump 100,000 lines of code on a project, they are MANDATED BY LAW to accept it and not have standards to abide by. who do these jerks think they are?????????

i'm definitely not mad and bitter about Linux in any way, grasping at straws in an attempt for relevance. i promise you. pinky swear.

Austin, can you expand on the instances you reference where you've had to pick up the slack? Was it something in GHC?
Re-read it sarcastically...
I don't understand what this means.
I believe X86BSD is referencing the fact that Dave Airlie works on Red Hat Linux
Ah, I believe he is talking about the general pain all non-linux distros have faced over the years where we have to painfully keep replacing linuxisms in the code with portable code.
The problem is: Good driver developers are not always good politicians/diplomats and vice versa. What this followup demands is that developers are suddenly supposed to become politicians to get their implementation accepted. I mean: Lots of developers have a deep hate for "organizational politics" (IMHO rightfully so) - and this is suddenly something that should be accepted/loved when it is about Linux? I prefer to hold up the same standards to all kinds of organisations and don't make exceptions just because it is "for the good/open source/Linux".
That's not how I read it. The driver developers are now acting as politicians, trying to merge their own AMD-specific worldview into an open structure and trying to convince the rest of the DRI world that that is a good thing.

DA instead is saying to the developers that they need to play ball and work with the existing Linux DRI world and not silo themselves off.

> That's not how I read it. The driver developers are now acting as politicians, trying to merge their own AMD-specific worldview into an open structure and trying to convince the rest of the DRI world that that is a good thing.

If AMD decided to simply leave their driver as closed-source blob, they would not have this problem. But all the Linux fanboys that they want AMD to open source their graphics drivers. Just to state one thing clear: AMD already released specifications beforehand such that the kernel developers could have developed an independent graphics driver if they wanted. But it is better to shitstorm companies not to develop a driver than to sully one's hands.

AMD was nice and did its job. But instead of being satisfied with the result they now want AMD to start playing the political game with them (for the protocol: IMHO the correct thing to do would be to bring the driver to the staging area and now it's part of the kernel developers to sully their hands to bring the part up to the standards they want).

NVidia simply refuses to open source their drivers and does not get into this kind of trouble. Lesson learned: Never negotiate with terrorists.

> But all the Linux fanboys

You already lost the argument, if you have to go with that, but I'll try my best to explain anyway; what the kernel developers want is for people to use the standard, already maintained interfaces, instead of companies developing their own and adding unnecessary complexity to the kernel, which would then need to be maintained by someone for a long time.

AMD is basically writing an abstraction layer to allow them to use their Windows driver code, the Linux maintainers are saying; why should we have an "inferior" driver, that's basically "ported" from Windows? If you want to support Linux, write code that interacts with standard Linux interfaces, follows our conventions and benefits the community as a whole.

> Lesson learned: Never negotiate with terrorists.

So not wanting to merge shitty* code into your codebase is now terrorism?

> the Linux maintainers are saying; why should we have an "inferior" driver, that's basically "ported" from Windows?

As I wrote: AMD already indulged a lot (first specifications, then even an open source Linux driver). Even after the first step the kernel developers would be able to write a Linux drivers(though it is a lot of work). I already clarified: AMD did all this to satisfy what the Linux fanboys wanted (while NVidia did nothing). But instead of saying "thanks for all the work you did, AMD. The driver is currently not up to the standards that we desire, but it still helped us to make the driver development a lot less work. We [kernel developers] will do the remaining job and lift the kernel up to the superior quality that we want.". But that is not what the kernel developers did. Instead they want AMD to dance to the kernel developer's piping.

> The driver is currently not up to the standards that we desire, but it still helped us to make the driver development a lot less work. We [kernel developers] will do the remaining job and lift the kernel up to the superior quality that we want.

Do you know who the elusive kernel developers that you keep referring to are? They're mostly employees of various other companies who want their code merged into the kernel and have to follow the same standards to get their code in!

Why should AMD be any different? Why should somebody else pick the slack up for AMD? Does AMD pick the slack for Intel as well? And who would them keep up with their upcoming silicon etc. (It wouldn't be AMD, since this approach makes it easier for them). Why would one company be allowed to sidestep what is required to get your code into the kernel? Is it because they showed some good will in the past? Is that why inferior code should now be allowed?

> they want AMD to dance to the kernel developer's piping.

So let me get this straight. AMD wants to merge their code into the Linux kernel, (not the other way around), but it's the kernel developers who should instead "dance to the AMD developer's piping"?

Look, It's good that they are trying and obviously, the code may be accepted at some point in the future, if it's good enough, but for now, let's not let our emotion, (AMD are the good guys), override our rational thinking.

There is also that the quality of the old closed source fglrx driver was just ass. It would be naive to think all code coming from AMD has acceptable quality.