Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia_legacy_340: Remove unneeded/failing patch #51457

Merged
merged 1 commit into from Dec 4, 2018

Conversation

binarin
Copy link
Contributor

@binarin binarin commented Dec 3, 2018

Motivation for this change

Packages wasn't building as the patch was not applying and it's no longer needed after upgrade in 045575e. Now the same result is achieved by the following lines in the driver package itself:

#if defined(NV_DRM_LEGACY_PCI_INIT_PRESENT)
#define nv_drm_pci_init drm_legacy_pci_init
#define nv_drm_pci_exit drm_legacy_pci_exit
#else
#define nv_drm_pci_init drm_pci_init
#define nv_drm_pci_exit drm_pci_exit
#endif
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

The patch is not applying and no longer needed after upgrade in
045575e. Now the same result is
achieved by the following lines in the driver package itself:

    #if defined(NV_DRM_LEGACY_PCI_INIT_PRESENT)
    #define nv_drm_pci_init drm_legacy_pci_init
    #define nv_drm_pci_exit drm_legacy_pci_exit
    #else
    #define nv_drm_pci_init drm_pci_init
    #define nv_drm_pci_exit drm_pci_exit
    #endif
@binarin
Copy link
Contributor Author

binarin commented Dec 3, 2018

Probably a right thing to do, but I'm not totally sure. Maybe @florianjacob knows more about this. At least it's building successfully now =)

@c0bw3b
Copy link
Contributor

c0bw3b commented Dec 3, 2018

Related: #51220 / cc @Mic92

This would need a backport if it is indeed solving build failures

@c0bw3b c0bw3b added the 9.needs: port to stable A PR needs a backport to the stable release. label Dec 3, 2018
@florianjacob
Copy link
Contributor

I had no idea what the patch was for as well, and did not look into it much when I updated to 340.107 as I wrongly interpreted the condition to be kernel <4.14 instead of <=4.14

I can confirm that the patch is now indeed integrated in upstream 340.107, with nvidia's direct intention to fix the issue for which the patch was created. To quote:

        drm_legacy_pci_init)
            #
            # Determine if drm_legacy_pci_init() is present. drm_pci_init() was
            # deprecated and renamed to drm_legacy_pci_init by:
            #
            #  2017-05-24  10631d724deff712343d96dd3017cd323349f761
            #
            CODE="
            #include <drm/drmP.h>

            void conftest_drm_legacy_pci_init(void) {
                drm_legacy_pci_init();
            }"

            compile_check_conftest "$CODE" "NV_DRM_LEGACY_PCI_INIT_PRESENT" "" "functions"
        ;;

@Mic92 Mic92 merged commit 708164f into NixOS:master Dec 4, 2018
@Mic92
Copy link
Member

Mic92 commented Dec 4, 2018

backported to 27b3ca8

@florianjacob
Copy link
Contributor

Compiled with 4.14, rebooted, everything works fine. 👍

@samueldr samueldr removed the 9.needs: port to stable A PR needs a backport to the stable release. label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants