This commit is contained in:
Joshua Elmasri
2025-10-15 21:46:24 -05:00
parent ceff2a381f
commit e8b8791267
4 changed files with 362 additions and 108 deletions

97
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757497936, "lastModified": 1760047618,
"narHash": "sha256-BSfvr7wdY5SbathVlrOW7vCyI9UGVIe2b9rTJ0O5IKo=", "narHash": "sha256-vMhDAwwSrwMd5xWcTiA56fsk7LRz4tHOsKhrt2hXi48=",
"owner": "aylur", "owner": "aylur",
"repo": "astal", "repo": "astal",
"rev": "344a6dce56437a190b99e516a6cab8332cccf19e", "rev": "71b008e5fb59e0a992724db78d54a5ddcf234515",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -41,16 +41,17 @@
"base16-fish": { "base16-fish": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1622559957, "lastModified": 1754405784,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
"owner": "tomyun", "owner": "tomyun",
"repo": "base16-fish", "repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "tomyun", "owner": "tomyun",
"repo": "base16-fish", "repo": "base16-fish",
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"type": "github" "type": "github"
} }
}, },
@@ -90,11 +91,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1756083905, "lastModified": 1758112371,
"narHash": "sha256-UqYGTBgI5ypGh0Kf6zZjom/vABg7HQocB4gmxzl12uo=", "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "b655eaf16d4cbec9c3472f62eee285d4b419a808", "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -126,11 +127,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756770412, "lastModified": 1759362264,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751", "rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -218,11 +219,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758719930, "lastModified": 1760500983,
"narHash": "sha256-DgHe1026Ob49CPegPMiWj1HNtlMTGQzfSZQQVlHC950=", "narHash": "sha256-zfY4F4CpeUjTGgecIJZ+M7vFpwLc0Gm9epM/iMQd4w8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "142acd7a7d9eb7f0bb647f053b4ddfd01fdfbf1d", "rev": "c53e65ec92f38d30e3c14f8d628ab55d462947aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -261,16 +262,16 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1758742491, "lastModified": 1760455212,
"narHash": "sha256-A+RQ4I6mLcbKQEpx3hQLYhZBP50WXw2RmOrjvUKUNc4=", "narHash": "sha256-VUHdp3PXvaUQPrdzZkNNp+S6Db1Q6HnNAnocqvmzJ4w=",
"owner": "NixOS", "owner": "LunNova",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "333add93dbfea789e04fc97990eeb2c96da650e9", "rev": "bfd0d13dc984b8f6fcedccd2c26f1a2c7b5e3261",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "LunNova",
"ref": "master", "ref": "push-nmzswnymunon",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -283,11 +284,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758525110, "lastModified": 1759818599,
"narHash": "sha256-iEF0aG6df4NjPV88uqwAph/WujIabENZabS7C9Ljf0A=", "narHash": "sha256-4Go3gVl3E+geWMcFQ+06qlkO/lJlSvS9dyhYiXLWYq0=",
"owner": "tpwrules", "owner": "tpwrules",
"repo": "nixos-apple-silicon", "repo": "nixos-apple-silicon",
"rev": "9eb8ad09af823be7088dcfa908071e71cc19359a", "rev": "24ab28e47b586f741910b3a2f0428f3523a0fff3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -298,11 +299,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1758427187, "lastModified": 1760524057,
"narHash": "sha256-pHpxZ/IyCwoTQPtFIAG2QaxuSm8jWzrzBGjwQZIttJc=", "narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "554be6495561ff07b6c724047bdd7e0716aa7b46", "rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -321,11 +322,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1758718199, "lastModified": 1760538614,
"narHash": "sha256-xbkAs3NM9K2sPEhz0MB9kDfDPBXNkkEDueKpPkZzzSc=", "narHash": "sha256-RSim5VyR6tqq3tJImSNYIXIjdA6k+0BWz6JFgQTkQiQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "fd835f3dd13872841ef394e97be71276f75957b9", "rev": "d60696f62d0f9265dd9eff8e54ce2cd4b20c92e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -346,11 +347,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756961635, "lastModified": 1758998580,
"narHash": "sha256-hETvQcILTg5kChjYNns1fD5ELdsYB/VVgVmBtqKQj9A=", "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "6ca27b2654ac55e3f6e0ca434c1b4589ae22b370", "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -415,11 +416,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1758716250, "lastModified": 1760472212,
"narHash": "sha256-PvOo4vSk7WAOhSifgL+rzExihquU9DOIOQPrUVuFHpE=", "narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "526c882800837cce7676f3e11bb3e13e975c6032", "rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -509,11 +510,11 @@
"tinted-schemes": { "tinted-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1754779259, "lastModified": 1757716333,
"narHash": "sha256-8KG2lXGaXLUE0F/JVwLQe7kOVm21IDfNEo0gfga5P4M=", "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "schemes", "repo": "schemes",
"rev": "097d751b9e3c8b97ce158e7d141e5a292545b502", "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -525,11 +526,11 @@
"tinted-tmux": { "tinted-tmux": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1754788770, "lastModified": 1757811970,
"narHash": "sha256-LAu5nBr7pM/jD9jwFc6/kyFY4h7Us4bZz7dvVvehuwo=", "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "tinted-tmux", "repo": "tinted-tmux",
"rev": "fb2175accef8935f6955503ec9dd3c973eec385c", "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -541,11 +542,11 @@
"tinted-zed": { "tinted-zed": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1755613540, "lastModified": 1757811247,
"narHash": "sha256-zBFrrTxHLDMDX/OYxkCwGGbAhPXLi8FrnLhYLsSOKeY=", "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-zed", "repo": "base16-zed",
"rev": "937bada16cd3200bdbd3a2f5776fc3b686d5cba0", "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -564,11 +565,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758731146, "lastModified": 1760581975,
"narHash": "sha256-PavIsqbvGzUMNVhIDnjjokgr8U3Z7GhPTtga/yMQlcU=", "narHash": "sha256-iAIGFKM6CHrCU7Aoe/6RRV4ALDc3zph+sN2nPNAKym4=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "ce268148d6d6f9522d9cda5e6d8f05619e92d07f", "rev": "2455291102af7efe99db2432f3f526f2d17525e6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -12,7 +12,7 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager"; inputs.home-manager.follows = "home-manager";
}; };
master.url = "github:NixOS/nixpkgs/master"; master.url = "github:LunNova/nixpkgs/push-nmzswnymunon";
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";

View File

@@ -41,7 +41,13 @@ boot = {
# Enable "Silent Boot" # Enable "Silent Boot"
consoleLogLevel = 0; consoleLogLevel = 0;
initrd.verbose = false; initrd.verbose = false;
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_zen;
/*kernelPatches = [
{
name = "dsc";
patch = ../../patches/vesa-dsc-fixed-bpp.patch;
}
];*/
kernelParams = [ kernelParams = [
"quiet" "quiet"
"splash" "splash"
@@ -58,6 +64,10 @@ boot = {
}; };
services.udev.extraRules = ''
ACTION=="add", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0101", TAG+="uaccess", MODE="0660"
'';
boot.extraModulePackages = with config.boot.kernelPackages; [ hid-tmff2 ]; boot.extraModulePackages = with config.boot.kernelPackages; [ hid-tmff2 ];
networking.hostName = "nixos"; # Define your hostname. networking.hostName = "nixos"; # Define your hostname.
@@ -76,6 +86,7 @@ boot = {
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"electron-31.7.7" "electron-31.7.7"
"mbedtls-2.28.10"
]; ];
environment.variables.AMD_VULKAN_ICD = "RADV"; environment.variables.AMD_VULKAN_ICD = "RADV";
@@ -83,6 +94,7 @@ boot = {
# Set your time zone. # Set your time zone.
time.timeZone = "America/Chicago"; time.timeZone = "America/Chicago";
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.sessionVariables.SDL_GAMECONTROLLERCONFIG = "03002f67c4100000c082000011010000,Shifter,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,platform:Linux";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
@@ -171,6 +183,42 @@ boot = {
# use the example session manager (no others are packaged yet so this is enabled by default, # use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/alsa.conf" ''
monitor.alsa.rules = [
{
matches = [
{
device.name = "~alsa_card.*"
}
]
actions = {
update-props = {
# Device settings
api.alsa.use-acp = true
}
}
}
{
matches = [
{
node.name = "~alsa_input.*"
}
{
node.name = "~alsa_output.*"
}
]
actions = {
# Node settings
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]
'')
];
}; };
services.pulseaudio.configFile = pkgs.runCommand "default.pa" {} '' services.pulseaudio.configFile = pkgs.runCommand "default.pa" {} ''
sed 's/module-udev-detect$/module-udev-detect tsched=0/' \ sed 's/module-udev-detect$/module-udev-detect tsched=0/' \
@@ -243,8 +291,8 @@ hardware.pulseaudio.extraConfig = ''
}; };
fileSystems."/mnt/More-Games" = { /*fileSystems."/mnt/More-Games" = {
device = "/dev/disk/by-uuid/fdbbe9a8-da6e-4ef2-b4e5-5154f181ee66"; device = "/dev/sdb1";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"users" "users"
@@ -252,7 +300,7 @@ hardware.pulseaudio.extraConfig = ''
"x-gvfs-show" "x-gvfs-show"
"exec" "exec"
]; ];
}; };*/
@@ -268,33 +316,7 @@ hardware.pulseaudio.extraConfig = ''
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
]; ];
services.open-webui = {
enable = true;
port = 3246;
host = "0.0.0.0";
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434/api";
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
ENABLE_RAG_WEB_SEARCH = "True";
RAG_WEB_SEARCH_ENGINE = "kagi";
};
};
services.ollama = {
# package = pkgs.unstable.ollama; # If you want to use the unstable channel package for example
enable = true;
host = "0.0.0.0";
acceleration = "rocm"; # Or "rocm"
environmentVariables = { # I haven't been able to get this to work, but please see the serviceConfig workaround below
# HOME = "/home/ollama";
# OLLAMA_MODELS = "/home/ollama/models";
OLLAMA_HOST = "0.0.0.0:11434"; # Make Ollama accesible outside of localhost
# OLLAMA_ORIGINS = "http://localhost:8080,http://192.168.0.10:*"; # Allow access, otherwise Ollama returns 403 forbidden due to CORS
};
};
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
@@ -316,12 +338,12 @@ hardware.pulseaudio.extraConfig = ''
git git
bibata-cursors bibata-cursors
killall killall
usbutils
mangohud mangohud
aonsoku # cemu broken with latest update
cemu
teamspeak6-client
oterm oterm
unetbootin wget
wlx-overlay-s
labymod-launcher labymod-launcher
unzip unzip
winetricks winetricks
@@ -333,33 +355,16 @@ hardware.pulseaudio.extraConfig = ''
python3 python3
pavucontrol pavucontrol
bluebubbles bluebubbles
gnomeExtensions.tray-icons-reloaded
cider
xfce.thunar xfce.thunar
gnomeExtensions.open-bar
parallel-launcher parallel-launcher
wallust
termsonic termsonic
steamtinkerlaunch steamtinkerlaunch
grub2
vivaldi
cargo
#inputs.zen-browser.packages."${system}".default
kdePackages.kdenlive kdePackages.kdenlive
wineWowPackages.wayland wineWowPackages.wayland
blueman blueman
fuse
linux-wallpaperengine
ntfs3g
lapce lapce
prismlauncher prismlauncher
librewolf
protonup-qt protonup-qt
mlt
nspr
nss_latest
nssTools
dconf
openjdk23 openjdk23
heroic heroic
protontricks protontricks
@@ -367,22 +372,15 @@ hardware.pulseaudio.extraConfig = ''
playerctl playerctl
wine wine
#alvr #alvr
bottles
cava cava
pop-icon-theme
gnome-tweaks
libnotify
libreoffice libreoffice
hunspell
hunspellDicts.en_US
neovide neovide
flatpak flatpak
gradience
]; ];
# VirtualBox # VirtualBox
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = false;
users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ]; users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
services.flatpak.enable = true; services.flatpak.enable = true;
@@ -401,6 +399,17 @@ hardware.pulseaudio.extraConfig = ''
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
}; };
hardware.steam-hardware.enable=true;
services.monado = {
enable = true;
defaultRuntime = true; # Register as default OpenXR runtime
};
systemd.user.services.monado.environment = {
STEAMVR_LH_ENABLE = "1";
XRT_COMPOSITOR_COMPUTE = "1";
WMR_HANDTRACKING = "0";
};
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override {

View File

@@ -0,0 +1,244 @@
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 3b4065099..639699e3b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -189,6 +189,9 @@ static const struct edid_quirk {
/* Rotel RSX-1058 forwards sink's EDID but only does HDMI 1.1*/
EDID_QUIRK('E', 'T', 'R', 13896, EDID_QUIRK_FORCE_8BPC),
+ /* Bigscreen Beyond Headset */
+ EDID_QUIRK('B', 'I', 'G', 0x1234, EDID_QUIRK_NON_DESKTOP),
+
/* Valve Index Headset */
EDID_QUIRK('V', 'L', 'V', 0x91a8, EDID_QUIRK_NON_DESKTOP),
EDID_QUIRK('V', 'L', 'V', 0x91b0, EDID_QUIRK_NON_DESKTOP),
From c33583995576e9ac532c4ad9e260324b1c4fa3a3 Mon Sep 17 00:00:00 2001
From: Yaroslav Bolyukin <iam@lach.pw>
Date: Sun, 30 Oct 2022 19:04:26 +0100
Subject: [PATCH 3/3] drm/amd: use fixed dsc bits-per-pixel from edid
VESA vendor header from DisplayID spec may contain fixed bit per pixel
rate, it should be respected by drm driver
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 ++
drivers/gpu/drm/amd/display/dc/dc_types.h | 3 +++
2 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
index 38d71b5c1f2d..f2467b64268b 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -103,6 +103,8 @@ static bool dc_stream_construct(struct dc_stream_state *stream,
/* EDID CAP translation for HDMI 2.0 */
stream->timing.flags.LTE_340MCSC_SCRAMBLE = dc_sink_data->edid_caps.lte_340mcsc_scramble;
+ stream->timing.dsc_fixed_bits_per_pixel_x16 =
+ dc_sink_data->edid_caps.dsc_fixed_bits_per_pixel_x16;
memset(&stream->timing.dsc_cfg, 0, sizeof(stream->timing.dsc_cfg));
stream->timing.dsc_cfg.num_slices_h = 0;
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h
index dc78e2404b48..65915a10ab48 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_types.h
@@ -231,6 +231,9 @@ struct dc_edid_caps {
bool edid_hdmi;
bool hdr_supported;
+ /* DisplayPort caps */
+ uint32_t dsc_fixed_bits_per_pixel_x16;
+
struct dc_panel_patch panel_patch;
};
--
2.38.1
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 3b4065099..15268afa3 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6391,7 +6391,7 @@ static void drm_parse_vesa_mso_data(struct drm_connector *connector,
if (oui(vesa->oui[0], vesa->oui[1], vesa->oui[2]) != VESA_IEEE_OUI)
return;
- if (sizeof(*vesa) != sizeof(*block) + block->num_bytes) {
+ if (block->num_bytes < 5) {
drm_dbg_kms(connector->dev,
"[CONNECTOR:%d:%s] Unexpected VESA vendor block size\n",
connector->base.id, connector->name);
@@ -6414,24 +6414,37 @@ static void drm_parse_vesa_mso_data(struct drm_connector *connector,
break;
}
- if (!info->mso_stream_count) {
- info->mso_pixel_overlap = 0;
- return;
- }
+ info->mso_pixel_overlap = 0;
+
+ if (info->mso_stream_count) {
+ info->mso_pixel_overlap = FIELD_GET(DISPLAYID_VESA_MSO_OVERLAP, vesa->mso);
+
+ if (info->mso_pixel_overlap > 8) {
+ drm_dbg_kms(connector->dev,
+ "[CONNECTOR:%d:%s] Reserved MSO pixel overlap value %u\n",
+ connector->base.id, connector->name,
+ info->mso_pixel_overlap);
+ info->mso_pixel_overlap = 8;
+ }
- info->mso_pixel_overlap = FIELD_GET(DISPLAYID_VESA_MSO_OVERLAP, vesa->mso);
- if (info->mso_pixel_overlap > 8) {
drm_dbg_kms(connector->dev,
- "[CONNECTOR:%d:%s] Reserved MSO pixel overlap value %u\n",
- connector->base.id, connector->name,
- info->mso_pixel_overlap);
- info->mso_pixel_overlap = 8;
+ "[CONNECTOR:%d:%s] MSO stream count %u, pixel overlap %u\n",
+ connector->base.id, connector->name,
+ info->mso_stream_count, info->mso_pixel_overlap);
+ }
+
+ if (block->num_bytes < 7) {
+ /* DSC bpp is optional */
+ return;
}
+ info->dp_dsc_bpp = FIELD_GET(DISPLAYID_VESA_DSC_BPP_INT, vesa->dsc_bpp_int) * 16 +
+ FIELD_GET(DISPLAYID_VESA_DSC_BPP_FRACT, vesa->dsc_bpp_fract);
+
drm_dbg_kms(connector->dev,
- "[CONNECTOR:%d:%s] MSO stream count %u, pixel overlap %u\n",
- connector->base.id, connector->name,
- info->mso_stream_count, info->mso_pixel_overlap);
+ "[CONNECTOR:%d:%s] DSC bits per pixel %u\n",
+ connector->base.id, connector->name,
+ info->dp_dsc_bpp);
}
static void drm_update_mso(struct drm_connector *connector,
@@ -6479,6 +6492,7 @@ static void drm_reset_display_info(struct drm_connector *connector)
info->mso_stream_count = 0;
info->mso_pixel_overlap = 0;
info->max_dsc_bpp = 0;
+ info->dp_dsc_bpp = 0;
kfree(info->vics);
info->vics = NULL;
diff --git a/drivers/gpu/drm/drm_edid.c.rej b/drivers/gpu/drm/drm_edid.c.rej
new file mode 100644
index 000000000..de3b3bf4e
--- /dev/null
+++ b/drivers/gpu/drm/drm_edid.c.rej
@@ -0,0 +1,9 @@
+diff a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c (rejected hunks)
+@@ -6376,6 +6389,7 @@ static void drm_reset_display_info(struct drm_connector *connector)
+ info->mso_stream_count = 0;
+ info->mso_pixel_overlap = 0;
+ info->max_dsc_bpp = 0;
++ info->dp_dsc_bpp = 0;
+ }
+
+ static u32 update_display_info(struct drm_connector *connector,
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index fe88d7fc6..1de1d1726 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -803,6 +803,12 @@ struct drm_display_info {
*/
u32 max_dsc_bpp;
+ /**
+ * @dp_dsc_bpp: DP Display-Stream-Compression (DSC) timing's target
+ * DST bits per pixel in 6.4 fixed point format. 0 means undefined
+ */
+ u16 dp_dsc_bpp;
+
/**
* @vics: Array of vics_len VICs. Internal to EDID parsing.
*/
diff --git a/include/drm/drm_connector.h.rej b/include/drm/drm_connector.h.rej
new file mode 100644
index 000000000..d54d40443
--- /dev/null
+++ b/include/drm/drm_connector.h.rej
@@ -0,0 +1,13 @@
+diff a/include/drm/drm_connector.h b/include/drm/drm_connector.h (rejected hunks)
+@@ -721,6 +721,11 @@ struct drm_display_info {
+ * monitor's default value is used instead.
+ */
+ u32 max_dsc_bpp;
++ /**
++ * @dp_dsc_bpp: DP Display-Stream-Compression (DSC) timing's target
++ * DST bits per pixel in 6.4 fixed point format. 0 means undefined
++ */
++ u16 dp_dsc_bpp;
+ };
+
+ int drm_display_info_set_bus_formats(struct drm_display_info *info,
diff --git a/include/drm/drm_displayid.h b/include/drm/drm_displayid.h
index 566497eeb..3a4bd0816 100644
--- a/drivers/gpu/drm/drm_displayid_internal.h
+++ b/drivers/gpu/drm/drm_displayid_internal.h
@@ -131,12 +131,16 @@ struct displayid_detailed_timing_block {
#define DISPLAYID_VESA_MSO_OVERLAP GENMASK(3, 0)
#define DISPLAYID_VESA_MSO_MODE GENMASK(6, 5)
+#define DISPLAYID_VESA_DSC_BPP_INT GENMASK(5, 0)
+#define DISPLAYID_VESA_DSC_BPP_FRACT GENMASK(3, 0)
struct displayid_vesa_vendor_specific_block {
struct displayid_block base;
u8 oui[3];
u8 data_structure_type;
u8 mso;
+ u8 dsc_bpp_int;
+ u8 dsc_bpp_fract;
} __packed;
/*
diff --git a/include/drm/drm_displayid.h.rej b/include/drm/drm_displayid.h.rej
new file mode 100644
index 000000000..61fbd38e0
--- /dev/null
+++ b/include/drm/drm_displayid.h.rej
@@ -0,0 +1,18 @@
+diff a/include/drm/drm_displayid.h b/include/drm/drm_displayid.h (rejected hunks)
+@@ -131,12 +131,16 @@ struct displayid_detailed_timing_block {
+
+ #define DISPLAYID_VESA_MSO_OVERLAP GENMASK(3, 0)
+ #define DISPLAYID_VESA_MSO_MODE GENMASK(6, 5)
++#define DISPLAYID_VESA_DSC_BPP_INT GENMASK(5, 0)
++#define DISPLAYID_VESA_DSC_BPP_FRACT GENMASK(3, 0)
+
+ struct displayid_vesa_vendor_specific_block {
+ struct displayid_block base;
+ u8 oui[3];
+ u8 data_structure_type;
+ u8 mso;
++ u8 dsc_bpp_int;
++ u8 dsc_bpp_fract;
+ } __packed;
+
+ /* DisplayID iteration */
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index d4395b92fb85..6c7f589e19ac 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -136,6 +136,8 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
edid_caps->edid_hdmi = connector->display_info.is_hdmi;
+ edid_caps->dsc_fixed_bits_per_pixel_x16 = connector->display_info.dp_dsc_bpp;
+
apply_edid_quirks(dev, edid_buf, edid_caps);
sad_count = drm_edid_to_sad((struct edid *) edid->raw_edid, &sads);