summary refs log tree commit diff
path: root/host/Rory-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-desktop')
-rw-r--r--host/Rory-desktop/configuration.nix9
-rw-r--r--host/Rory-desktop/hacks/drm-amd-3437.patch13
-rw-r--r--host/Rory-desktop/optional/gui/wayland.nix1
3 files changed, 23 insertions, 0 deletions
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index 73b361f..c7e0b1e 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -39,8 +39,17 @@ args@{
         efiInstallAsRemovable = true;
       };
     };
+    kernelPatches = [
+      {
+        # FIXME: https://gitlab.freedesktop.org/drm/amd/-/issues/3437
+        name = "drm-amd-3437-hack";
+        patch = /hacks/drm-amd-3437.patch;
+      }
+    ];
+
     #readOnlyNixStore = false;
   };
+  programs.noisetorch.enable = true;
 
   environment.sessionVariables = {
     ZSH_DISABLE_COMPFIX = "true";
diff --git a/host/Rory-desktop/hacks/drm-amd-3437.patch b/host/Rory-desktop/hacks/drm-amd-3437.patch
new file mode 100644
index 0000000..1867762
--- /dev/null
+++ b/host/Rory-desktop/hacks/drm-amd-3437.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+index c556c8b653fa..272ad5e4a328 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -180,7 +180,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
+ 		 * When GTT is just an alternative to VRAM make sure that we
+ 		 * only use it as fallback and still try to fill up VRAM first.
+ 		 */
+-		if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM)
++		if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM && !(adev->flags & AMD_IS_APU))
+ 			places[c].flags |= TTM_PL_FLAG_FALLBACK;
+ 		c++;
+ 	}
\ No newline at end of file
diff --git a/host/Rory-desktop/optional/gui/wayland.nix b/host/Rory-desktop/optional/gui/wayland.nix
index fd0cd90..689dee7 100644
--- a/host/Rory-desktop/optional/gui/wayland.nix
+++ b/host/Rory-desktop/optional/gui/wayland.nix
@@ -44,4 +44,5 @@
     ];
   };
 
+  xdg.portal.wlr.enable = true;
 }