Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Linux

Alan Cox to NVIDIA: You Can't Use DMA-BUF 946

DMA-BUF is a recent kernel feature that allows multiple GPUs to quickly copy data into each others' framebuffers. A use case would be the NVIDIA Optimus that pairs a fast GPU with an Intel integrated GPU, where the NVIDIA GPU writes into the Intel framebuffer when it is active. But, NVIDIA won't be able to use this infrastructure because it's GPL. Alan Cox replied on LKML to a request from one of their engineers to mark the API non-GPL: "NAK. This needs at the very least the approval of all rights holders for the files concerned and all code exposed by this change. Also I'd note if you are trying to do this for the purpose of combining it with proprietary code then you are still in my view as a (and the view of many other) rights holder to the kernel likely to be in breach of the GPL requirements for a derivative work. You may consider that formal notification of my viewpoint. Your corporate legal team can explain to you why the fact you are now aware of my view is important to them." The rest of the thread is worth a read (a guy from RedHat agrees that this code is GPL and cannot become non-GPL without relicensing from a major subset of graphics system contributors). This has a ripple effect: it means that all of the ARM SoC GPU drivers can't use it either, and it may prevent any proprietary drivers for the proposed DRI version 3.
This discussion has been archived. No new comments can be posted.

Alan Cox to NVIDIA: You Can't Use DMA-BUF

Comments Filter:
  • by quasius ( 1075773 ) on Thursday October 11, 2012 @03:42PM (#41622363)
    Well, I guess that's yet another way to make sure Linux stays niche in desktop use forever.
  • Honest Question (Score:5, Interesting)

    by Anonymous Coward on Thursday October 11, 2012 @03:43PM (#41622369)

    As AC since I'm sure this will garner much hate, but this is honest speculation with the intent of stoking real discussion:

    1. NVIDIA and Intel want to use a new whiz-bang feature in the Linux kernel to bring faster and more feature-rich graphics to Linux. This is a good thing, a very good thing.
    2. The current licensing in the kernel makes that impossible unless NVIDIA open sources its IP. Whether this is good is questionable because:
            a. It means NVIDIA has to give up a competitive edge OR
            b. NVIDIA has to write code and implement hardware in a manner that specifically prevents them from having a competitive edge.
    3. NVIDIA's only other option is massive duplication of effort and a fork of the Linux kernel. This is a questionable premise.

    So, given that NVIDIA's choice is to give up a competitive edge or to intentionally implement its feature set in an obstructionist manner, how is the GPL "good" in this case?

    • by faragon ( 789704 ) on Thursday October 11, 2012 @04:01PM (#41622645) Homepage

      So, given that NVIDIA's choice is to give up a competitive edge or to intentionally implement its feature set in an obstructionist manner, how is the GPL "good" in this case?

      Because it is THE LAW. </Dredd>

    • Re:Honest Question (Score:5, Insightful)

      by Anonymous Coward on Thursday October 11, 2012 @04:04PM (#41622681)

      I appreciate how you used the term "competitive edge" three times in such a short post. Oh, wait, no, I meant "I am nauseated by how". Don't they teach marketing shills anything in terms of subtlety any more?

      Anyway, you seem to be asserting that Nvidia's "competitive edge" is completely software-related. As in, the hardware — the actual graphics-computing stuff they sell, mind you — is somehow less important than the exact underpinnings of the drivers. This is an assertion that makes no sense to kernel developers. The drivers are just there to provide a way for the OS to communicate with the hardware. The hardware is supposed to be the magical part here.

      In my opinion, the ridiculously secretive nature of Nvidia, especially in the face of their major competitors opening up their drivers, is highly suspicious. After all, I thought they sold video cards, not drivers. It makes me think they're hiding Bad Things(tm) in the drivers. Unlicensed IP, perhaps? Evidence that their "value" models of video cards are actually the "premium" cards with drivers that shut down certain features? Crappy code? Or maybe just a behind-the-times product manager?

      • Re:Honest Question (Score:5, Insightful)

        by nut ( 19435 ) on Friday October 12, 2012 @07:22AM (#41629147)

        I read once (I think in a post on slashdot a couple of years back) that many hardware manufacturers keep their device drivers proprietary in order to hide the details of the hardware implementation.
        And that this is not so much to maintain, "a competitive edge," as to protect themselves from patent lawsuits from their competitors.

        So my reference is possibly not the most reliable, but my point is that they might not be hiding stuff just to screw over consumers. There are many other possible reasons.

    • Re:Honest Question (Score:5, Insightful)

      by Bill, Shooter of Bul ( 629286 ) on Thursday October 11, 2012 @04:14PM (#41622831) Journal

      How much of a "competitive edge" is really in their driver? And what kind of IP would be "open sourced"? This is GPL V2 we are talking about, they don't have to abandon any patents covered by the code or anything.

      Intel and AMD actually do open source drivers for linux. Those can make use of the wizbang. Who is at a competitive edge in that case? The one that makes a driver that can use the wizbang, or the one who cant*?

      Note there is a non Nvidia sponsered open source driver for their cards. They are more than welecome to add any whizbang they want with that.

    • by Sycraft-fu ( 314770 ) on Thursday October 11, 2012 @04:23PM (#41622961)

      They have many licensed components in their code. So they have to remove all that and rework it, and do it in such a fashion as to not get sued by those companies (who might claim that the nVidia programmers couldn't work on the new code since they'd seen the licensed code). This isn't just some more minor features such as S3 texture compression, but OpenGL itself. Go look it up, OpenGL isn't a free "do whatever you like" setup. There is licensing for it for companies like nVidia.

      Even worse is that because the issue isn't just opening the source, but actually GPLing it, that makes it so much harder. Some of their licensed components are things the companies might be ok with source distribution. However nVidia doesn't have the right to relicense that code under the GPL. So even if they opened it, it wouldn't do any good as the GPL is what is required here.

      So the argument of "just open the driver" is somewhat unrealistic. It isn't just that nVidia likes to have a competitive edge, though they surely do, but that it would be a major issue and a lot more work to try and do so, if it were even possible.

      Again, take the OpenGL issue since it is a pretty fundamental one. nVidia licenses the code and has the latest OpenGL 4.3 implemented on cards that support it. Ok so let's say they decide to grab the Mesa code for an OSS branch. It's MIT license which is GPL compatible so good to go right? Well, not really. Mesa is OpenGL 3.1, 3 years out of date, and it only recently got that. So they can either deal without a bunch of features on all platforms, have two different drivers one full featured on Windows and such, one with less features, or they can invest a ton of work to try and make their own up to date OSS OpenGL implementation and hope they aren't sued.

      None of those sound like very good uses of resources.

    • Re:Honest Question (Score:5, Insightful)

      by Yvanhoe ( 564877 ) on Thursday October 11, 2012 @04:31PM (#41623071) Journal
      Well, we do want an open source system, for a variety of legitimate reasons. NVIDIA's edge is in hardware design, not software design. I, for one, would be happy that they provided an open source driver that give me access to all the 1 year old functionalities of their cards. That would not make them lose any edge.

      Also, a thing that NVIDIA probably fails to realize is that open sourcing their drivers will result in far more developers on it, therefore will probably raise their quality.

      I honestly doubt that ATI could get an edge from looking at the code of NVIDIA's drivers. Maybe some small marginal improvement but nothing that would improve their hardware.

      I think that this argument has been mainly FUD. Linux developers are a small population but they are opinion leaders in the market. The first company that goes open source will probably receive a popularity boost that will offset the little "edge" that they fear losing. Right now, this is Intel, despite very inferior hardwares, that is becoming more popular because of their 100% open source drivers.
      • Re:Honest Question (Score:5, Insightful)

        by dudpixel ( 1429789 ) on Thursday October 11, 2012 @11:08PM (#41626753)

        I disagree. AMD has had open source drivers (and specs) for years now, and the quality is still terrible. Intel has open source drivers and I still wouldn't choose Intel graphics for anything serious.

        Sure, if all you want is a picture on your screen, then even the nouveau driver will get you there. But if you want fast graphics, like you get on windows, then this licensing crap is just another way of ensuring it won't come to linux.

        If NVIDIA started only offering its binary driver on BSD, windows and OSX, I think it's more likely that Linux users (particularly commercial ones) would switch to another OS, than switch to another graphics card manufacturer.

        If the quality of the other drivers/hardware was better, then that might not be the case, but AFAIC(oncerned) AMD's drivers are a bit flaky (even on windows) and intel's hardware has yet to come near the performance of AMD/NVIDIA.

    • by spikenerd ( 642677 ) on Thursday October 11, 2012 @04:34PM (#41623139)

      how is the GPL "good" in this case?

      Your are looking at it from the perspective of the company that did NOT write the code and is NOT interested in contributing. The GPL is not good for them. The GPL is "good" for everyone else. It is "good" for the whole world because it is NOT good for moochers. Yeah, it would be nice if we could let everyone, including moochers, use our open source code, but then we would accomplish less good overall. So, it is "good" that the GPL is so bad for NVIDIA.

    • by peppepz ( 1311345 ) on Thursday October 11, 2012 @05:09PM (#41623657)
      1. I want to give away a large amount of money to the poor. This is a good thing, a very good thing. I know that the bank near my house has a large amount of money.
      2. The current licensing of the bank makes it impossible for me to get the money, unless I work hard to earn it. Whether this is good is questionable because:
      a. It means that I have to get tired OR
      b. It means that I have to work like everybody else does for a living, preventing me to have an easier life than all the others.
      3) My only other option is that I have to find a less easy way to obtain the money rather than simply picking it up the from the bank. This is a questionable premise.

      So, given that my choice is to work to earn money or to give up the idea of giving money to the poor, how are private property laws "good" in this case?

  • They woul dhave a bad time coming along anyway, since they can't be compatible with the secure boot (UEFI) way of working (workaround if one prefers), that is being adopted by major distributions: all Kernel level code, and X11 code, will have to be signed to work out of the box in a UEFI restricted boot environment. And any distro that would sign binary code coming from NVIDIA or whoever else would be mad.

    It may be we get some months across a new "no working 3d drivers" dark ages on the Linux desktop, but one way or the other, the time for proprietary drivers is past.

    • by Kjella ( 173770 ) on Thursday October 11, 2012 @04:12PM (#41622795) Homepage

      And any distro that would sign binary code coming from NVIDIA or whoever else would be mad.

      Sometimes I wonder what reality Slashdot lives in, a distro signing a nVidia driver would be no different than say Microsoft signing a nVidia driver. Of course the puritan distributions won't but they don't ship proprietary code anyway, it's not like Ubuntu would "vouch" more for nVidia than Microsoft does. If the nVidia code is full of shitty security holes that's not really the distro's problem as long as it's "genuine" nVidia code.

  • by JDG1980 ( 2438906 ) on Thursday October 11, 2012 @03:44PM (#41622379)

    Am I missing something? Isn't this going to hurt Linux a lot more than it is going to hurt nVidia? Sure, it would be great if nVidia open-sourced their driver code, but it's pretty clear that this is not going to happen. What effect will this have other than to make Linux drivers for nVidia cards of inferior quality?

    For Linux the religion, this is a triumph. For Linux the operating system, it is a major setback.

    • by pipatron ( 966506 ) <pipatron@gmail.com> on Thursday October 11, 2012 @03:56PM (#41622565) Homepage
      So what, exactly, is linux to you? If you want a proprietary operating system with closed drivers, there are plenty. Bending over sideways for a paranoid corporation just to get high definition pornography in 3D on your notebook sounds like a real bad idea to me.
    • by IBitOBear ( 410965 ) on Thursday October 11, 2012 @04:47PM (#41623327) Homepage Journal

      Linux developers don't care, nor shoud they, about the decision of one company to play nice or not.

      Linux kernel developers have been letting Nvidia get away with the whole "binary blob" thing for a long time. Nvidia has taken no real steps to come into conformance with the GPL requirements. They keep getting a pass for their bad citizenship.

      Eventually bad actors (Nvidia) either have to shape up, or they need to ship out.

      At the moment Nvidia is freeloading on the linux kernel. They are putting themselves in there for free. Now they are asking to break even more rules, or more accurately, to have the rules changed in the name of their personal interests. Nvidia has fouled their own bed, but now they are whining that they don't want to have to lie in the filth of their own making. They are a full grown company. They know what they _ought_ to be doing. They want a pass to have things their own way regardless.

      Sometimes you have to tell a spoilt child that they don't get the lolly this time.

      • by Chirs ( 87576 ) on Thursday October 11, 2012 @06:36PM (#41624721)

        The current Nvidia binary blob resides in a bit of a grey area. They have a binary blob that was originally written without looking at the linux specs, and is not a derivative work of the kernel.

        They then have an open-source "shim" that is clearly a derivative work of the kernel that allows the binary blob (which has its own API) to interface with the kernel (which has a different API).

        The GPL says that any derivative work must be released under the GPL. Normally (as a logic shortcut) this means anything linked against the kernel, however in this case there is a real argument that the binary blob is NOT in fact a derivative work.

        However, now we have a new funky feature being added to the kernel. If the binary blob is updated to make use of it, then there is a reasonable argument that it now actually IS a derivative work of the kernel and thus should be released under the GPL.

    • by Svartalf ( 2997 ) on Thursday October 11, 2012 @05:34PM (#41624017) Homepage

      No, it's not.

      You and everyone KEEP presuming the only space at stake here. There's another and they want to play in this space badly because it's big-bucks for them or they wouldn't have done it in the first place. (Hint: There was no good reason for the Linux drivers they've made to date- because there really wasn't a market for those end-user drivers (these are treated as such by the community, but they're not really for the consumer market...) until recently in the first place.

      Think engineering workstations (early reasons...seriously, for both AMD and NVidia...) and supercomputing clusters using GPGPU computation (There's a reason for the opening of AMD's stuff...that's part of that.).

      If they want to play in that space...they're going to have to change attitudes, much like AMD did.

  • by Sez Zero ( 586611 ) on Thursday October 11, 2012 @03:44PM (#41622383) Journal

    You may consider that formal notification of my viewpoint. Your corporate legal team can explain to you why the fact you are now aware of my view is important to them.

    Translation: Go see your corp lawyers. FYI, you're about to get spanked.

    • Re:Translation (Score:4, Interesting)

      by gstoddart ( 321705 ) on Thursday October 11, 2012 @03:54PM (#41622535) Homepage

      Translation: Go see your corp lawyers. FYI, you're about to get spanked.

      Slightly more neutral translation: now that you have been officially informed we will not be marking it as non-GPL, if you use it, you are in violation of copyright. And your having been told means you don't have a legal leg to stand on if you ignore this.

      Oh, and, FYI, you're about to be spanked. ;-)

      • Re:Translation (Score:4, Insightful)

        by pavon ( 30274 ) on Thursday October 11, 2012 @04:15PM (#41622847)

        No, that isn't the implication. Whether they are in violation of copyright or not depends on whether their drivers are a derivative work of Linux, and if so whether fair use would allow them anyway. Both of these things are decided by courts not by the copyright holder. The significance of his notification is in determining whether the infringement is willful or not, and thus eligible for stronger penalties.

  • Face Reality: (Score:4, Insightful)

    by CajunArson ( 465943 ) on Thursday October 11, 2012 @03:45PM (#41622401) Journal

    While Linus got lots of publicity for mouthing off at Nvidia over Optimus support, the truth is that X.org just recently released server 1.13 that has initial support for Optimus-like technologies and it would not have mattered one bit what license Nvidia used for its driver code.

    The cold hard truth is: Nvidia isn't going to GPL its drivers and it couldn't do so even if it wanted to. Nvidia's developers *have* been trying to help out with adding code to the kernel for DMA-BUF that will be GPL and will help other pieces of hardware in addition to Nvidia hardware. There will probably have to be a compromise at some point on this even if the idealogical purists get their panties in a knot over it.

    • Re:Face Reality: (Score:5, Insightful)

      by amorsen ( 7485 ) <benny+slashdot@amorsen.dk> on Thursday October 11, 2012 @03:54PM (#41622537)

      Nvidia isn't going to GPL its drivers and it couldn't do so even if it wanted to.

      Of course Nvidia could GPL its drivers. That "they can't do it" been said ever since the first proprietary Nvidia Linux driver, and back then it was blamed on non-specified technology licensed from SGI. SGI then stated publicly that they had absolutely no problem with their technology ending up in a GPL'd Linux driver.

      It is just a pitiful excuse. Luckily, between "secure boot" and this, the excuse will not last much longer. Then it will be either GPL or nothing at all.

      • Re:Face Reality: (Score:5, Interesting)

        by Svartalf ( 2997 ) on Thursday October 11, 2012 @05:36PM (#41624053) Homepage

        In truth, that statement was a LIE, and they knew it. If there was actual cards that I could've laid hands on back when the NV1 was out, there would've been a Utah-GLX driver because they made the programming interfaces for an NV1 publicly available at the time I was one of the Utah-GLX developers.

  • Hmmm... (Score:5, Interesting)

    by Ynot_82 ( 1023749 ) on Thursday October 11, 2012 @03:50PM (#41622457)

    Playing devil's Advocate here, as personally I agree with this (and don't let the proprietary nVidia driver anywhere near my system).
    But just for kicks, how does the recent case of Oracle trying (and failing) to claim copyright on the Java APIs affect this.

    If you cannot copyright an API, then you cannot apply a copyright license either.

    What if nVidia challenged this with exactly the same arguments that Google used with Dalvik.

    • Re:Hmmm... (Score:5, Informative)

      by Anonymous Coward on Thursday October 11, 2012 @04:03PM (#41622671)

      You are getting muddled. The googVorc case was if oracle could copy right the API (that is, the list of function name, their hierarchy, intput/outputs) and prevent google from doing a clean room implementation that complies with their API. In this case, they are saying NVIDIA can't make an API call _into their code_ and ship proprietary bundles linked against their GPL library. NVIDIA could do a clean-room re-implementation of the kernel if they wanted to, but that is not what is going on here.

      If you don't have the constraint that linking is derivative then the whole notion of copy-left is dead, as you can fully use any library in any application. The authors are giving you a license to use their code for free, they can put what ever restrictions on that license they want.

  • by Anonymous Coward on Thursday October 11, 2012 @04:42PM (#41623255)

    The preceeding mail from Jan-2012 mentions the reason why they need to have the drivers that interact with the interface gpl-ed:

    'A bug on a driver using such low-level interface could cause side effects
    at the wrong places. In order to handle such bugs, the developers and the
    maintainers of both subsystems need to see the source code of the entire
    pipeline, with is not possible if is there any non-GPL'd driver.

    NAK

    Mauro.'

  • Hmmm (Score:5, Insightful)

    by AdmV0rl0n ( 98366 ) on Thursday October 11, 2012 @05:26PM (#41623891) Homepage Journal

    I've never really understood so much of the background on this. I really don't. Nvidia are probably *the only* fucking company that really went the whole way and really release the right 'kind of ' full drivers for Linux. Yes, they are closed source binary. Yes, they are proprietry. Yes, they don't comply with religious level political idealogy. But they contribute in a less than optimal way to your platform.

    And your platform, at least in the short and medium term would be vastly shittier without their efforts.

    So, next you publicly go viral dropping a bucket of shit over them. Their response has been moderatly to try to come in and talk, make changes and be more of a interactive unit with you. I bet that the devs inside the company are probably very pro making progress but face real world limits of legal and other things that they themselves are not empowered to fundamentally change.

    I'm not surprised at Alan's answer - but here is my raw take on this. What would have been the better way forward was to take their request and frame it globally to that group of people and put Nvidia's request forward. I appreciate that many would likely answer no, and I appreciate this would perhaps not be what Nvidia wanted, but it would have opened a bridge for interaction and perhaps longer term bridge building. Instead, they get a fuck you, fuck your company, and do this our way or the highway.; What were Nvidia trying to do? Provide an answer to the problem they had a bucket of shit thrown over them in public about. ie - trying to solve a problem they were abused about.

    The benefit of doing this is fixing something in linux - albeit with a closed driver that people asked for. Linux users asked for this. Linux Kernal people bitched about it. Linux coders refusing to help provide this moves this off being a purely Nvidia are a bunch of fucks to shooting your own platform in both feet.

    I don't fucking get it. These bits of code I presume are already fully in Linux. Sat there in daylight .Refusing to let Nvidia use them to help you do something_you_asked for is demented. Or rather - let me reframe that - Its really lame to not engage in a process to find a way forward instead of ramming the ideology down the throat of a vendor who is a closed source bunch - but have come to try and engage with you on a problem.

    Let me put it more plainly. Linux needs Nvidia more than Nvidia needs linux - but together you make something that is symbiotic. You think your mythical Ubuintu tablets are going to surface on the very proprietry ARM platform by not getting down and working with people like Nvidia on problems. Linux won't run 'well' on their platform without their help. You want to be there? Take your heads out of your asses.

    As much as Linux gets hobbled by closed source folks not playing the game, its just as hobbled by killing off their interactions and opportunities by being too hard headed about the religio-political idealogy.

    And a fucking note to the Intel GPU Linux fanboys. The drivers have almost always been shit. And the hardware is low end garbage. I'll take a Linux box with Nvidia GPU *EVERY fucking time over intel gfx. Every time.

  • by jcdr ( 178250 ) on Thursday October 11, 2012 @06:37PM (#41624747)

    The GPU is no anymore a peripheral device, it's more and more integrated on the same die as the CPU. Intel, AMD or ARM have plans to lowering the difference even more on how GPU and CPU will exchange data and will view the rest of the system. Basically, the CPU cores and GPU cores will share the same location into the architecture. This move is not so different from the integration of the FPU core into the CPU that have existed back to the 80486/68040 days. About ten years before the FPU integration, the FPU chips was a lucrative business: this part was so expensive that it was an option that only a few can buy. Not anymore, FPU less CPU are now only found in the lower part of the ARM embedded market. There is no x86_64 chip without FPU by the design of the instruction set. GPU is the next core to get the same integration.

    What this means ?

    First, since Nvidia don't own a licence to build x86_64 chip, the game is actually already over for them. There known that since the failed merge talk with AMD and explain why there focus on the high end and ARM chips since this time. This also explain why Linus Torvalds "fuck you Nvidia" response was focused on the Tegra ARM SoC despite the fact that the original question was about a x86_64 laptop.

    Secondly, Intel and AMD known that sooner or later, the GPU core will be so integrated with the CPU core that there cannot be managed anymore by only a driver to do in a efficient way there new roles aside of the graphic display. The trigger point will probably be when the GPU will passe on the CPU side of the MMU (or something that look like this). At this stage the paging management for the GPU will be almost impracticable from within a driver to cooperate efficiently with the core operating system, not counting the brainfuck crap in case there are not developed by closely related peoples. This don't automatically say that GPU driver will cease to exist for some graphic aspect, but the GPUCPU part will end up into the kernel for the most critical aspects. It's easy to see why on Linux, access to the GPU from a proprietary driver is really not an option for the future (even if the current issue is only about DMA sharing data between devices).

  • by Blaskowicz ( 634489 ) on Friday October 12, 2012 @12:14AM (#41627075)

    Face it, the only reason for DMA-BUF at all is to use multiple GPUs, some better than others. It will typically be an Optimus laptop with Intel + Nvidia, or maybe AMD APU + AMD GPU. But without proprietary drivers the bigger GPU is entirely pointless! Say you have an Intel IGP plus a nvidia GPU, if you use nouveau on the nvidia GPU then you lose so much performance and battery life it's useless and you're better off disabling it and staying on Intel. Unless you like wasting your money for a minor improvment with terrible inefficiency.

    So, linux is really jumping the shark, I guess what's left is distros should switch to BSD just like debian/kFreebSD, starting with Mint. Unless this terrible situation is resolved.

Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, In kernel as it is in user!

Working...