linux-postmarketos-exynos5: test some patches for enabling graphics output on later kernels
This commit is contained in:
parent
56dfe8baa8
commit
49e1a85afb
|
@ -2,6 +2,8 @@
|
|||
, linux ? linux_6_1, linux_6_1
|
||||
, linuxManualConfig
|
||||
, optimizeForSize ? false
|
||||
, useEdpPanel ? false #< use `edp-panel` driver in snow device tree (fails to fix graphics)
|
||||
, revertPanelSimplePatch ? false #< revert the commit which removed B116XW03 panel from panel-edp driver (fixes display output)
|
||||
, sane-kernel-tools
|
||||
, writeTextFile
|
||||
#v nixpkgs calls `.override` on the kernel to configure additional things
|
||||
|
@ -13,6 +15,17 @@
|
|||
let
|
||||
defconfigPmos = builtins.readFile ./config-postmarketos-exynos5.arm7;
|
||||
|
||||
patches = {
|
||||
useEdpPanel = {
|
||||
name = "snow: use edp-panel driver";
|
||||
patch = ./snow-panel-fix.patch;
|
||||
};
|
||||
revertPanelSimplePatch = {
|
||||
name = "revert ad3e33fe071dffea07279f96dab4f3773c430fe2, and get snow to use edp-panel again";
|
||||
patch = ./snow-panel-revert-b116xw03.patch;
|
||||
};
|
||||
};
|
||||
|
||||
# remove CONFIG_LOCALVERSION else nixpkgs complains about mismatched modDirVersion
|
||||
withoutOsFlavor = defconfig: lib.replaceStrings
|
||||
[ ''CONFIG_LOCALVERSION="-postmarketos-exynos5"'' ]
|
||||
|
@ -64,10 +77,14 @@ let
|
|||
)
|
||||
)
|
||||
);
|
||||
in linuxManualConfig {
|
||||
in (linuxManualConfig {
|
||||
inherit (linux) extraMakeFlags modDirVersion src version;
|
||||
inherit features randstructSeed;
|
||||
kernelPatches = args.kernelPatches or [];
|
||||
kernelPatches = (args.kernelPatches or []) ++ lib.optionals useEdpPanel [
|
||||
patches.useEdpPanel
|
||||
] ++ lib.optionals revertPanelSimplePatch [
|
||||
patches.revertPanelSimplePatch
|
||||
];
|
||||
|
||||
configfile = writeTextFile {
|
||||
name = "config-postmarketos-exynos5.arm7";
|
||||
|
@ -76,4 +93,8 @@ in linuxManualConfig {
|
|||
# nixpkgs requires to know the config as an attrset, to do various eval-time assertions.
|
||||
# this forces me to include the defconfig inline, instead of fetching it the way i do all the other pmOS kernel stuff.
|
||||
config = sane-kernel-tools.parseDefconfig defconfigStr;
|
||||
}
|
||||
}).overrideAttrs (base: {
|
||||
passthru = (base.passthru or {}) // {
|
||||
sanePatches = patches;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/arch/arm/boot/dts/samsung/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/samsung/exynos5250-snow-common.dtsi
|
||||
index 65b000df176e..bc8060890137 100644
|
||||
--- a/arch/arm/boot/dts/samsung/exynos5250-snow-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/samsung/exynos5250-snow-common.dtsi
|
||||
@@ -205,7 +205,7 @@ backlight: backlight {
|
||||
};
|
||||
|
||||
panel: panel {
|
||||
- compatible = "auo,b116xw03";
|
||||
+ compatible = "edp-panel";
|
||||
power-supply = <&fet6>;
|
||||
backlight = <&backlight>;
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
|
||||
index 95c8472d878a..feb665df35a1 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-edp.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-edp.c
|
||||
@@ -976,6 +976,32 @@ static const struct panel_desc auo_b116xak01 = {
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct drm_display_mode auo_b116xw03_mode = {
|
||||
+ .clock = 70589,
|
||||
+ .hdisplay = 1366,
|
||||
+ .hsync_start = 1366 + 40,
|
||||
+ .hsync_end = 1366 + 40 + 40,
|
||||
+ .htotal = 1366 + 40 + 40 + 32,
|
||||
+ .vdisplay = 768,
|
||||
+ .vsync_start = 768 + 10,
|
||||
+ .vsync_end = 768 + 10 + 12,
|
||||
+ .vtotal = 768 + 10 + 12 + 6,
|
||||
+ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
|
||||
+};
|
||||
+
|
||||
+static const struct panel_desc auo_b116xw03 = {
|
||||
+ .modes = &auo_b116xw03_mode,
|
||||
+ .num_modes = 1,
|
||||
+ .bpc = 6,
|
||||
+ .size = {
|
||||
+ .width = 256,
|
||||
+ .height = 144,
|
||||
+ },
|
||||
+ .delay = {
|
||||
+ .enable = 400,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct drm_display_mode auo_b133han05_mode = {
|
||||
.clock = 142600,
|
||||
.hdisplay = 1920,
|
||||
@@ -1699,6 +1725,9 @@ static const struct of_device_id platform_of_match[] = {
|
||||
}, {
|
||||
.compatible = "auo,b116xa01",
|
||||
.data = &auo_b116xak01,
|
||||
+ }, {
|
||||
+ .compatible = "auo,b116xw03",
|
||||
+ .data = &auo_b116xw03,
|
||||
}, {
|
||||
.compatible = "auo,b133han05",
|
||||
.data = &auo_b133han05,
|
||||
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
|
||||
index dd7928d9570f..95959dcc6e0e 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-simple.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-simple.c
|
||||
@@ -919,38 +919,6 @@ static const struct panel_desc auo_b101xtn01 = {
|
||||
},
|
||||
};
|
||||
|
||||
-static const struct drm_display_mode auo_b116xw03_mode = {
|
||||
- .clock = 70589,
|
||||
- .hdisplay = 1366,
|
||||
- .hsync_start = 1366 + 40,
|
||||
- .hsync_end = 1366 + 40 + 40,
|
||||
- .htotal = 1366 + 40 + 40 + 32,
|
||||
- .vdisplay = 768,
|
||||
- .vsync_start = 768 + 10,
|
||||
- .vsync_end = 768 + 10 + 12,
|
||||
- .vtotal = 768 + 10 + 12 + 6,
|
||||
- .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
|
||||
-};
|
||||
-
|
||||
-static const struct panel_desc auo_b116xw03 = {
|
||||
- .modes = &auo_b116xw03_mode,
|
||||
- .num_modes = 1,
|
||||
- .bpc = 6,
|
||||
- .size = {
|
||||
- .width = 256,
|
||||
- .height = 144,
|
||||
- },
|
||||
- .delay = {
|
||||
- .prepare = 1,
|
||||
- .enable = 200,
|
||||
- .disable = 200,
|
||||
- .unprepare = 500,
|
||||
- },
|
||||
- .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
|
||||
- .bus_flags = DRM_BUS_FLAG_DE_HIGH,
|
||||
- .connector_type = DRM_MODE_CONNECTOR_LVDS,
|
||||
-};
|
||||
-
|
||||
static const struct display_timing auo_g070vvn01_timings = {
|
||||
.pixelclock = { 33300000, 34209000, 45000000 },
|
||||
.hactive = { 800, 800, 800 },
|
||||
@@ -4134,9 +4102,6 @@ static const struct of_device_id platform_of_match[] = {
|
||||
}, {
|
||||
.compatible = "auo,b101xtn01",
|
||||
.data = &auo_b101xtn01,
|
||||
- }, {
|
||||
- .compatible = "auo,b116xw03",
|
||||
- .data = &auo_b116xw03,
|
||||
}, {
|
||||
.compatible = "auo,g070vvn01",
|
||||
.data = &auo_g070vvn01,
|
Loading…
Reference in New Issue
Block a user