From 39dc15dc4abf859e33d0c81a05a525fdd84e80b8 Mon Sep 17 00:00:00 2001 From: Scott C Date: Wed, 28 May 2025 19:27:07 -0400 Subject: [PATCH] linux-postmarketos-omap: panel-lg-ld070ws1: Mode, Orientation, Devicetree Updates, Many Cleanups Many updates made throughout to bring this driver from the rough initial state previously committed to something much more comprehensive and correct/ final. Make various updates to allow setting the panel mode from the device tree: - add functionality to be able to read a display mode / panel-timing from the device tree - wanted to add this to make explicit that nook color requires building kernel with a certain dss flag/value set also requiring that pixel clock to be <= functional clock / 4 - make bus_flags in device tree fail probe - Allow setting panel orientation Update spi init function to modernize bit handling and remove older redundant function Facilitate apparent need for min FCK / PCK = 4 with Barnes & Noble Encore / Nook Color - switch the default display mode to match the apparent need for min FCK / PCK = 4 with Barnes & Noble Encore / Nook Color - tweak the modes array and remove the sizing since that is actually set elsewhere Clean-Up All Over: - Clean up logging to hopefully be close to kernel norms/ standards. - Driver now only generates logs when probe completes and when panel is powered off / on. - Some additional logging is generated when debug is enabled. - Remove extra/unnecessary code from enable function that was added when initially developing - Remove commented code and updated formatting - Tweake mode names to not include @ sign - remove some likely unnecessary bus flags Part-of: --- ...d-lg-ld070ws1-for-barnesnoble-encore.patch | 449 +++++++++--------- .../linux-postmarketos-omap/APKBUILD | 4 +- 2 files changed, 219 insertions(+), 234 deletions(-) diff --git a/device/community/linux-postmarketos-omap/0011-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch b/device/community/linux-postmarketos-omap/0011-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch index 15a044b20..5699babd9 100644 --- a/device/community/linux-postmarketos-omap/0011-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch +++ b/device/community/linux-postmarketos-omap/0011-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch @@ -32,15 +32,13 @@ index 7dcf72646..2a9a835a3 100644 obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o diff --git a/drivers/gpu/drm/panel/panel-lg-ld070ws1.c b/drivers/gpu/drm/panel/panel-lg-ld070ws1.c new file mode 100644 -index 000000000..bef966d49 +index 000000000..b671571cc --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-ld070ws1.c -@@ -0,0 +1,498 @@ +@@ -0,0 +1,483 @@ +/* + * Panel Driver for panel on Barnes & Noble Nook Color, which is a LG LD070WS1 + * -+ * Based on the ....... driver -+ * + * Author: Scott C <> + */ + @@ -51,13 +49,17 @@ index 000000000..bef966d49 +#include +#include + ++#include