mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2024-11-30 06:49:43 +01:00
linux_pinebookpro_latest: workaround for display init
And follow latest from Nixpkgs
This commit is contained in:
parent
fad3d88578
commit
3d97b020e1
3 changed files with 6427 additions and 65 deletions
|
@ -0,0 +1,51 @@
|
|||
From 84517c6e2aac4fb32c8b02b5713297b37c140b4f Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Sun, 26 Jul 2020 19:31:59 -0400
|
||||
Subject: [PATCH] [HACK] Revert "pwm: Read initial hardware state at request
|
||||
time"
|
||||
|
||||
This is a WORKAROUND for the issue where recent kernels will hang at
|
||||
display initialization with recent kernels.
|
||||
|
||||
This reverts commit cfc4c189bc70b1acc17e6f1abf1dc1c0ae890bd8.
|
||||
---
|
||||
drivers/pwm/core.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
|
||||
index 004b2ea9b5fd..245e2fcfc779 100644
|
||||
--- a/drivers/pwm/core.c
|
||||
+++ b/drivers/pwm/core.c
|
||||
@@ -117,14 +117,6 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
|
||||
}
|
||||
}
|
||||
|
||||
- if (pwm->chip->ops->get_state) {
|
||||
- pwm->chip->ops->get_state(pwm->chip, pwm, &pwm->state);
|
||||
- trace_pwm_get(pwm, &pwm->state);
|
||||
-
|
||||
- if (IS_ENABLED(CONFIG_PWM_DEBUG))
|
||||
- pwm->last = pwm->state;
|
||||
- }
|
||||
-
|
||||
set_bit(PWMF_REQUESTED, &pwm->flags);
|
||||
pwm->label = label;
|
||||
|
||||
@@ -305,6 +297,14 @@ int pwmchip_add_with_polarity(struct pwm_chip *chip,
|
||||
pwm->hwpwm = i;
|
||||
pwm->state.polarity = polarity;
|
||||
|
||||
+ if (pwm->chip->ops->get_state) {
|
||||
+ pwm->chip->ops->get_state(pwm->chip, pwm, &pwm->state);
|
||||
+ trace_pwm_get(pwm, &pwm->state);
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_PWM_DEBUG))
|
||||
+ pwm->last = pwm->state;
|
||||
+ }
|
||||
+
|
||||
radix_tree_insert(&pwm_tree, pwm->pwm, pwm);
|
||||
}
|
||||
|
||||
--
|
||||
2.25.4
|
||||
|
|
@ -1,24 +1,19 @@
|
|||
{ stdenv
|
||||
, pkgs
|
||||
, lib
|
||||
, kernelPatches
|
||||
, buildPackages
|
||||
, fetchFromGitLab
|
||||
, perl
|
||||
, buildLinux
|
||||
, modDirVersionArg ? null
|
||||
, ... } @ args:
|
||||
{ pkgs, lib, linux_5_7, kernelPatches, ... } @ args:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib)
|
||||
concatStrings
|
||||
intersperse
|
||||
take
|
||||
splitString
|
||||
optionalString
|
||||
;
|
||||
version = "5.7";
|
||||
additionalConfig = {
|
||||
linux_5_7.override({
|
||||
kernelPatches = lib.lists.unique (kernelPatches ++ [
|
||||
pkgs.kernelPatches.bridge_stp_helper
|
||||
pkgs.kernelPatches.request_key_helper
|
||||
pkgs.kernelPatches.export_kernel_fpu_functions."5.3"
|
||||
{
|
||||
name = "pinebookpro-5.7.patch";
|
||||
patch = ./pinebookpro-5.7.patch;
|
||||
}
|
||||
{
|
||||
name = "0001-HACK-Revert-pwm-Read-initial-hardware-state-at-reque.patch";
|
||||
patch = ./0001-HACK-Revert-pwm-Read-initial-hardware-state-at-reque.patch;
|
||||
}
|
||||
{
|
||||
name = "pinebookpro-config-fixes";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
|
@ -37,35 +32,8 @@ let
|
|||
ROCKCHIP_LVDS y
|
||||
ROCKCHIP_RGB y
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
buildLinux (args // {
|
||||
inherit version;
|
||||
|
||||
kernelPatches = lib.lists.unique (kernelPatches ++ [
|
||||
pkgs.kernelPatches.bridge_stp_helper
|
||||
pkgs.kernelPatches.request_key_helper
|
||||
pkgs.kernelPatches.export_kernel_fpu_functions."5.3"
|
||||
additionalConfig
|
||||
}
|
||||
]);
|
||||
|
||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
|
||||
|
||||
# branchVersion needs to be x.y
|
||||
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.manjaro.org";
|
||||
owner = "tsys";
|
||||
repo = "linux-pinebook-pro";
|
||||
rev = "a8f4db8a726e5e4552e61333dcd9ea1ff35f39f9";
|
||||
sha256 = "1vbach0y28c29hjjx4sc9hda4jxyqfhv4wlip3ky93vf4gxm2fij";
|
||||
};
|
||||
|
||||
postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
|
||||
mkdir -p "$out/nix-support"
|
||||
cp -v "$buildRoot/.config" "$out/nix-support/build.config"
|
||||
'';
|
||||
} // (args.argsOverride or {}))
|
||||
})
|
||||
//
|
||||
(args.argsOverride or {})
|
||||
|
|
6343
kernel/latest/pinebookpro-5.7.patch
Normal file
6343
kernel/latest/pinebookpro-5.7.patch
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue