1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 11:03:37 +03:00

quirks: Implement qualcomm framebuffer quirks as tasks

This commit is contained in:
Samuel Dionne-Riel 2019-12-24 19:41:17 -05:00
parent 4c40fa259f
commit 687a100da4
5 changed files with 30 additions and 7 deletions

View File

@ -28,7 +28,7 @@
./initrd.nix ./initrd.nix
./mobile-device.nix ./mobile-device.nix
./nixpkgs.nix ./nixpkgs.nix
./quirks-qualcomm.nix ./quirks/qualcomm/default.nix
./system-target.nix ./system-target.nix
./system-types.nix ./system-types.nix
] ]

View File

@ -0,0 +1,5 @@
{
imports = [
./framebuffer.nix
];
}

View File

@ -34,9 +34,7 @@ in
extraUtils = with pkgs; [ extraUtils = with pkgs; [
msm-fb-handle msm-fb-handle
]; ];
initFramebuffer = '' tasks = [ ./msm-fb-handle-task.rb ];
msm-fb-handle &
'';
}; };
}) })
(mkIf cfg.msm-fb-refresher.enable { (mkIf cfg.msm-fb-refresher.enable {
@ -44,9 +42,7 @@ in
extraUtils = with pkgs; [ extraUtils = with pkgs; [
msm-fb-refresher msm-fb-refresher
]; ];
initFramebuffer = '' tasks = [ ./msm-fb-refresher-task.rb ];
msm-fb-refresher --loop &
'';
}; };
}) })
]; ];

View File

@ -0,0 +1,11 @@
class Tasks::MSMFBHandle < SingletonTask
def initialize()
add_dependency(:SingletonTask, :Graphics)
end
def run()
@pid = System.spawn("msm-fb-handle")
end
# FIXME: cleanup when cleanup is implemented
end

View File

@ -0,0 +1,11 @@
class Tasks::MSMFBRefresher < SingletonTask
def initialize()
add_dependency(:SingletonTask, :Graphics)
end
def run()
@pid = System.spawn("msm-fb-refresher", "--loop")
end
# FIXME: cleanup when cleanup is implemented
end