Skip to content

linux-postmarketos-exynos4: split panel patch

As stated in the MRs that added the panel patch, the ea8061 and s6evr02 panel drivers are originally from work by Simon Shields (fourkbomb). Let's base our patches on the original commits to preserve authorship, and note which modifications have been done, and by who. This is a step towards making these patches ready for submission to upstream.

@jack_kekzoz you did the work to make the s6evr02 driver work with more recent kernel versions. Do you think that is an accurate description of your work? Are you fine with having that stated and to have your Signed-off-by added to that patch?

@affenull2345 you did the work to make the ea8061 driver work with more recent kernel versions, and updated the device trees so that both type of panels can be used. Do you think the descriptions in these two patches: [1], [2] accurately describe your work, and are you fine with having your Signed-off-by tag on those patches?


This MR should not bring any functional changes (but I don't have any hardware to actually test it on), applying patches and diffing the kernel source gives this tiny, mostly cosmetic, diff:

diff/fold.
diff --git a/arch/arm/boot/dts/exynos4412-n710x-ea8061.dts b/arch/arm/boot/dts/exynos4412-n710x-ea8061.dts
index 134dca2649ea..1b47392eb93b 100644
--- a/arch/arm/boot/dts/exynos4412-n710x-ea8061.dts
+++ b/arch/arm/boot/dts/exynos4412-n710x-ea8061.dts
@@ -2,15 +2,16 @@
 /dts-v1/;
 #include "exynos4412-n710x.dtsi"
 
-&ea8061 {
+&dsi_in_ea8061 {
+       remote-endpoint = <&dsi_out>;
        status = "okay";
 };
 
-&dsi_in_ea8061 {
+&dsi_out {
+       remote-endpoint = <&dsi_in_ea8061>;
        status = "okay";
 };
 
-&dsi_out {
+&ea8061 {
        status = "okay";
-       remote-endpoint = <&dsi_in_ea8061>;
 };
diff --git a/arch/arm/boot/dts/exynos4412-n710x-s6evr02.dts b/arch/arm/boot/dts/exynos4412-n710x-s6evr02.dts
index ae799e0a3e80..b82df0480fbc 100644
--- a/arch/arm/boot/dts/exynos4412-n710x-s6evr02.dts
+++ b/arch/arm/boot/dts/exynos4412-n710x-s6evr02.dts
@@ -2,15 +2,16 @@
 /dts-v1/;
 #include "exynos4412-n710x.dtsi"
 
-&s6evr02 {
+&dsi_in_s6evr02 {
+       remote-endpoint = <&dsi_out>;
        status = "okay";
 };
 
-&dsi_in_s6evr02 {
+&dsi_out {
+       remote-endpoint = <&dsi_in_s6evr02>;
        status = "okay";
 };
 
-&dsi_out {
+&s6evr02 {
        status = "okay";
-       remote-endpoint = <&dsi_in_s6evr02>;
 };
diff --git a/arch/arm/boot/dts/exynos4412-n710x.dtsi b/arch/arm/boot/dts/exynos4412-n710x.dtsi
index d67c83a9ab0b..5e6b941f5cb7 100644
--- a/arch/arm/boot/dts/exynos4412-n710x.dtsi
+++ b/arch/arm/boot/dts/exynos4412-n710x.dtsi
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
 #include "exynos4412-midas.dtsi"
 
 / {
@@ -93,7 +94,6 @@ timing0_s6evr02: timing-0 {
 
                port {
                        dsi_in_s6evr02: endpoint {
-                               remote-endpoint = <&dsi_out>;
                                status = "disabled";
                        };
                };
@@ -153,6 +153,7 @@ touchscreen@48 {
                touchscreen-size-y = <1280>;
                avdd-supply = <&ldo23_reg>;
                vdd-supply = <&ldo24_reg>;
+
        };
 };
 
diff --git a/drivers/gpu/drm/panel/panel-magnachip-ea8061.c b/drivers/gpu/drm/panel/panel-magnachip-ea8061.c
index c4521c42986c..ee105606907b 100644
--- a/drivers/gpu/drm/panel/panel-magnachip-ea8061.c
+++ b/drivers/gpu/drm/panel/panel-magnachip-ea8061.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * MIPI-DSI based ea8061 AMOLED LCD 5.5 inch panel driver.
  *
@@ -12,10 +13,6 @@
  * Eunchul Kim <chulspro.kim@samsung.com>
  * Tomasz Figa <t.figa@samsung.com>
  * Andrzej Hajda <a.hajda@samsung.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
 */
 
 #include <linux/delay.h>
@@ -538,7 +535,7 @@ static void ea8061_read_mtp_id(struct ea8061 *ctx)
        ea8061_dcs_write_seq_static(ctx, 0xfd, 0xd1);
 
        ret = ea8061_dcs_read(ctx, 0xfe, id, ARRAY_SIZE(id));
-       if (ret < ARRAY_SIZE(id) || id[0] == 0x00) {
+       if (ret < 0 || ret < ARRAY_SIZE(id) || id[0] == 0x00) {
                dev_err(ctx->dev, "read id failed\n");
                ctx->error = -EIO;
                return;
@@ -626,7 +623,8 @@ static int ea8061_enable(struct drm_panel *panel)
        return 0;
 }
 
-static int ea8061_get_modes(struct drm_panel *panel, struct drm_connector *connector)
+static int ea8061_get_modes(struct drm_panel *panel,
+                           struct drm_connector *connector)
 {
        struct ea8061 *ctx = panel_to_ea8061(panel);
        struct drm_display_mode *mode;
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6evr02.c b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c
index 4081e0691c94..037b4364cdd4 100644
--- a/drivers/gpu/drm/panel/panel-samsung-s6evr02.c
+++ b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c
@@ -713,7 +713,8 @@ static int s6evr02_probe(struct mipi_dsi_device *dsi)
 
        ctx->brightness = GAMMA_LEVEL_NUM - 1;
 
-       drm_panel_init(&ctx->panel, dev, &s6evr02_drm_funcs, DRM_MODE_CONNECTOR_DSI);
+       drm_panel_init(&ctx->panel, dev, &s6evr02_drm_funcs,
+                      DRM_MODE_CONNECTOR_DSI);
 
        drm_panel_add(&ctx->panel);

Merge request reports