Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-debian-packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reform
reform-debian-packages
Merge requests
!25
RCORE RK3588 Module Support and Pocket A311D Support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
RCORE RK3588 Module Support and Pocket A311D Support
rk3588-reform2
into
main
Overview
2
Commits
21
Pipelines
0
Changes
11
All threads resolved!
Hide all comments
Closed
minute
requested to merge
rk3588-reform2
into
main
1 year ago
Overview
2
Commits
21
Pipelines
0
Changes
11
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
main
version 7
d9e758c4
11 months ago
version 6
afb4920c
11 months ago
version 5
7b676470
11 months ago
version 4
e0503347
11 months ago
version 3
30c1749b
11 months ago
version 2
a6a35cae
11 months ago
version 1
2399dd3d
1 year ago
main (base)
and
latest version
latest version
ae559aac
21 commits,
11 months ago
version 7
d9e758c4
38 commits,
11 months ago
version 6
afb4920c
34 commits,
11 months ago
version 5
7b676470
32 commits,
11 months ago
version 4
e0503347
18 commits,
11 months ago
version 3
30c1749b
9 commits,
11 months ago
version 2
a6a35cae
9 commits,
11 months ago
version 1
2399dd3d
8 commits,
1 year ago
11 files
+
1646
−
32
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
linux/patches6.6/meson-g12b-bananapi-cm4-mnt-pocket-reform/0000-a311d-pocket-panel-fixup.patch
0 → 100644
+
75
−
0
Options
diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
index 81b4680..998e77b 100644
--- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
+++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
@@ -145,9 +145,9 @@
static int jdi_panel_unprepare(struct drm_panel *panel)
gpiod_set_value(jdi->enable_gpio, 0);
- gpiod_set_value(jdi->reset_gpio, 1);
+ if (!IS_ERR(jdi->reset_gpio)) gpiod_set_value(jdi->reset_gpio, 1);
- gpiod_set_value(jdi->dcdc_en_gpio, 0);
+ if (!IS_ERR(jdi->dcdc_en_gpio)) gpiod_set_value(jdi->dcdc_en_gpio, 0);
jdi->prepared = false;
@@ -171,10 +171,10 @@
static int jdi_panel_prepare(struct drm_panel *panel)
msleep(20);
- gpiod_set_value(jdi->dcdc_en_gpio, 1);
+ if (!IS_ERR(jdi->dcdc_en_gpio)) gpiod_set_value(jdi->dcdc_en_gpio, 1);
usleep_range(10, 20);
- gpiod_set_value(jdi->reset_gpio, 0);
+ if (!IS_ERR(jdi->reset_gpio)) gpiod_set_value(jdi->reset_gpio, 0);
usleep_range(10, 20);
gpiod_set_value(jdi->enable_gpio, 1);
@@ -237,6 +237,15 @@
static int jdi_panel_get_modes(struct drm_panel *panel,
return -ENOMEM;
}
+ // on A311D, we shift the vsync by one line to counteract VIU_OSD_HOLD_FIFO_LINES
+ if (of_property_present(dev->of_node, "vsync-shift")) {
+ uint32_t vsync_shift = 0;
+ of_property_read_u32(dev->of_node, "vsync-shift", &vsync_shift);
+ dev_warn(dev, "vsync-shift from device tree: %d\n", vsync_shift);
+ mode->vsync_start += vsync_shift;
+ mode->vsync_end += vsync_shift;
+ }
+
drm_mode_set_name(mode);
drm_mode_probed_add(connector, mode);
@@ -331,12 +340,12 @@
static int jdi_panel_add(struct jdi_panel *jdi)
jdi->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(jdi->reset_gpio))
- return dev_err_probe(dev, PTR_ERR(jdi->reset_gpio),
+ dev_err_probe(dev, PTR_ERR(jdi->reset_gpio),
"cannot get reset-gpios %d\n", ret);
jdi->dcdc_en_gpio = devm_gpiod_get(dev, "dcdc-en", GPIOD_OUT_LOW);
if (IS_ERR(jdi->dcdc_en_gpio))
- return dev_err_probe(dev, PTR_ERR(jdi->dcdc_en_gpio),
+ dev_err_probe(dev, PTR_ERR(jdi->dcdc_en_gpio),
"cannot get dcdc-en-gpio %d\n", ret);
jdi->backlight = drm_panel_create_dsi_backlight(jdi);
@@ -365,7 +374,13 @@
static int jdi_panel_probe(struct mipi_dsi_device *dsi)
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_HSE;
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_HSE;
+
+ // on a311d it works only without burst, but imx8mplus needs burst mode
+ if (of_property_present(dsi->dev.of_node, "burst-mode")) {
+ dsi->mode_flags |= MIPI_DSI_MODE_VIDEO_BURST;
+ dev_warn(&dsi->dev, "DSI burst mode enabled via device tree\n");
+ }
jdi = devm_kzalloc(&dsi->dev, sizeof(*jdi), GFP_KERNEL);
if (!jdi)
Loading