Unverified Commit ae2abfc6 authored by K900's avatar K900 Committed by GitHub
Browse files

nixos/hyperv-guest: drop fb_hyperv in favor of drm_hyperv (#372743)

parents 06406636 94e1e0a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
  - [`lib.types.enum`](https://nixos.org/manual/nixos/unstable/#sec-option-types-basic): Previously the `functor.payload` was the list of enum values directly. Now it is an attribute set containing the values in the `values` attribute.
  - [`lib.types.separatedString`](https://nixos.org/manual/nixos/unstable/#sec-option-types-string): Previously the `functor.payload` was the seperator directly. Now it is an attribute set containing the seperator in the `sep` attribute.

- The `virtualisation.hypervGuest.videoMode` option has been removed. Standard tooling can now be used to configure display modes for Hyper-V VMs.

### Deprecations {#sec-nixpkgs-release-25.05-lib-deprecations}

`functor` is an implementation detail and should not be relied upon, but since its status wasn't clear and it has had some use cases without alternatives, changes are being handled as gracefully as possible. Deprecations within functor:
+7 −14
Original line number Diff line number Diff line
@@ -6,22 +6,15 @@ let
  cfg = config.virtualisation.hypervGuest;

in {
  imports = [
    (mkRemovedOptionModule [ "virtualisation" "hypervGuest" "videoMode" ]
      "The video mode can now be configured via standard tools, or in Hyper-V VM settings."
    )
  ];

  options = {
    virtualisation.hypervGuest = {
      enable = mkEnableOption "Hyper-V Guest Support";

      videoMode = mkOption {
        type = types.str;
        default = "1152x864";
        example = "1024x768";
        description = ''
          Resolution at which to initialize the video adapter.

          Supports screen resolution up to Full HD 1920x1080 with 32 bit color
          on Windows Server 2012, and 1600x1200 with 16 bit color on Windows
          Server 2008 R2 or earlier.
        '';
      };
    };
  };

@@ -34,7 +27,7 @@ in {
      initrd.availableKernelModules = [ "hyperv_keyboard" ];

      kernelParams = [
        "video=hyperv_fb:${cfg.videoMode}" "elevator=noop"
        "elevator=noop"
      ];
    };

+2 −0
Original line number Diff line number Diff line
@@ -525,6 +525,8 @@ let
        DRM_I915_GVT_KVMGT = module;
        # Enable Hyper-V Synthetic DRM Driver
        DRM_HYPERV = whenAtLeast "5.14" module;
        # And disable the legacy framebuffer driver when we have the new one
        FB_HYPERV = whenAtLeast "5.14" no;
      }
      // lib.optionalAttrs (stdenv.hostPlatform.system == "aarch64-linux") {
        # enable HDMI-CEC on RPi boards