Compare commits
4 commits
9053cc6308
...
087cb1caf9
Author | SHA1 | Date | |
---|---|---|---|
087cb1caf9 | |||
a18b8a685e | |||
7ec8fa2d44 | |||
761a33c1fb |
4 changed files with 64 additions and 38 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -174,11 +174,11 @@
|
||||||
},
|
},
|
||||||
"logseq-fix-nixpkgs": {
|
"logseq-fix-nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706807864,
|
"lastModified": 1707316439,
|
||||||
"narHash": "sha256-Zxctw9B6bbrw5QR4vpF/bAn8SgreeVBrdibAYXn+HWk=",
|
"narHash": "sha256-3dVL8Wk7ECMiQrHVO1ys7FawMLo7iyQJyKG+aie1eaE=",
|
||||||
"owner": "schmittlauch",
|
"owner": "schmittlauch",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e6cd575ea5c2d1182485d57234b31856ffc6b7d2",
|
"rev": "6f1431c8e2dfdfdfe25837c2cc94857900153cab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -222,11 +222,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706913249,
|
"lastModified": 1707092692,
|
||||||
"narHash": "sha256-x3M7iV++CsvRXI1fpyFPduGELUckZEhSv0XWnUopAG8=",
|
"narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e92b6015881907e698782c77641aa49298330223",
|
"rev": "faf912b086576fd1a15fca610166c98d47bc667e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -270,11 +270,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706826059,
|
"lastModified": 1707238373,
|
||||||
"narHash": "sha256-N69Oab+cbt3flLvYv8fYnEHlBsWwdKciNZHUbynVEOA=",
|
"narHash": "sha256-WKxT0yLzWbFZwYi92lI0yWJpYtRaFSWHGX8QXzejapw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "25e3d4c0d3591c99929b1ec07883177f6ea70c9d",
|
"rev": "fb0c047e30b69696acc42e669d02452ca1b55755",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -119,7 +119,6 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
nixHelpers = [
|
nixHelpers = [
|
||||||
lorri
|
|
||||||
nixpkgs-review
|
nixpkgs-review
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nix-top
|
nix-top
|
||||||
|
@ -282,6 +281,7 @@ in
|
||||||
programs.direnv =
|
programs.direnv =
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -324,6 +324,7 @@ in
|
||||||
|
|
||||||
systemd.user.startServices = true;
|
systemd.user.startServices = true;
|
||||||
|
|
||||||
|
# for backwards compatibility
|
||||||
services.lorri.enable = true;
|
services.lorri.enable = true;
|
||||||
|
|
||||||
# media button control support from Bluetooth devices
|
# media button control support from Bluetooth devices
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
From 6e77e6de7582f35138fa1c7523268602ecb2e0a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
|
||||||
|
Date: Tue, 6 Feb 2024 10:39:24 -0800
|
||||||
|
Subject: [PATCH] drm/buddy: Improve alloc_range error handling routine
|
||||||
|
|
||||||
|
If alloc_range() couldn't allocate the requuired size,
|
||||||
|
return -ENOSPC.
|
||||||
|
|
||||||
|
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/drm_buddy.c | 11 ++++++++++-
|
||||||
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c
|
||||||
|
index f57e6d74fb0e..d5aba6392da0 100644
|
||||||
|
--- a/drivers/gpu/drm/drm_buddy.c
|
||||||
|
+++ b/drivers/gpu/drm/drm_buddy.c
|
||||||
|
@@ -483,9 +483,9 @@ static int __alloc_range(struct drm_buddy *mm,
|
||||||
|
struct list_head *blocks,
|
||||||
|
u64 *total_allocated_on_err)
|
||||||
|
{
|
||||||
|
+ u64 total_allocated = 0, allocated_size = 0;
|
||||||
|
struct drm_buddy_block *block;
|
||||||
|
struct drm_buddy_block *buddy;
|
||||||
|
- u64 total_allocated = 0;
|
||||||
|
LIST_HEAD(allocated);
|
||||||
|
u64 end;
|
||||||
|
int err;
|
||||||
|
@@ -539,6 +539,15 @@ static int __alloc_range(struct drm_buddy *mm,
|
||||||
|
} while (1);
|
||||||
|
|
||||||
|
list_splice_tail(&allocated, blocks);
|
||||||
|
+
|
||||||
|
+ list_for_each_entry(block, blocks, link)
|
||||||
|
+ allocated_size += drm_buddy_block_size(mm, block);
|
||||||
|
+
|
||||||
|
+ if (allocated_size < size) {
|
||||||
|
+ err = -ENOSPC;
|
||||||
|
+ goto err_free;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_undo:
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
|
@ -24,40 +24,18 @@ in
|
||||||
argsOverride = rec {
|
argsOverride = rec {
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
|
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
|
||||||
hash = "sha256-LiNkYsgTJby9MctxxLWKUhsH1hNnGRJNDjyv+FwsXXU=";
|
hash = "sha256-9CfwhjawHkMjNYqqJAHq9dQnpeWm0qH/UOAnSu82mNQ=";
|
||||||
};
|
};
|
||||||
version = "6.8-rc2";
|
version = "6.8-rc3";
|
||||||
modDirVersion = "6.8.0-rc2";
|
modDirVersion = "6.8.0-rc3";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
# revert some commits that introduced the clourful graphics artefacts flickering,
|
# revert some commits that introduced the clourful graphics artefacts flickering,
|
||||||
# at least that's the current working hypothesis in https://gitlab.freedesktop.org/drm/amd/-/issues/3097
|
# at least that's the current working hypothesis in https://gitlab.freedesktop.org/drm/amd/-/issues/3097
|
||||||
boot.kernelPatches = [
|
boot.kernelPatches = [
|
||||||
{name = "revert 9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
{name = "patch attempt from https://gitlab.freedesktop.org/drm/amd/-/issues/3097#note_2271482";
|
||||||
patch = (pkgs.fetchpatch {
|
patch = ./0001-drm-buddy-Improve-alloc_range-error-handling-routine.patch;
|
||||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=9ae587f850a6702428273fcf4a2a9b392349b2a3";
|
}
|
||||||
hash = "sha256-5Uu8zxRSQuqE8oymjwPMt/ylsItpkQVDhbrOSMj8g3I=";
|
|
||||||
revert = true;
|
|
||||||
});}
|
|
||||||
{name = "revert 2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
|
||||||
patch = (pkgs.fetchpatch {
|
|
||||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=2eb412aa25ed2bf59f5ad5f7a09787d182d67934";
|
|
||||||
hash = "sha256-VtsH6bmwaLxPZ+uXvVE6qVWD2/aIKf9GLuMTNKq6d8M=";
|
|
||||||
revert = true;
|
|
||||||
});}
|
|
||||||
{name = "revert 0a1844bf0b532d84324453374ad6845f64066c28";
|
|
||||||
patch = (pkgs.fetchpatch {
|
|
||||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=0a1844bf0b532d84324453374ad6845f64066c28";
|
|
||||||
hash = "sha256-Zd2pcYiOmuuzcc7THNtJW/YTjPyzO7HmQYKJNzy9YPw=";
|
|
||||||
revert = true;
|
|
||||||
});
|
|
||||||
# alternatively, 8569c3154538 can be reverted as well
|
|
||||||
extraStructuredConfig = with lib.kernel; {
|
|
||||||
DRM_I915 = no;
|
|
||||||
DRM_I915_GVT = lib.mkForce unset;
|
|
||||||
DRM_I915_GVT_KVMGT = lib.mkForce unset;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# temporary workaround for white flickering graphics artefacts
|
# temporary workaround for white flickering graphics artefacts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue