Display Output Setting

From ESS-WIKI
Revision as of 03:14, 21 February 2019 by Alex.cheng (Talk | contribs) (Modify description)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Execute the following instructions, then you will see the video demo on the default display screen.

$ /etc/init.d/matrix-gui-2.0 stop
$ /etc/init.d/weston stop
$ gst-launch-1.0 playbin uri=file:///usr/share/ti/video/TearOfSteel-Short-1920x800.mov audio-sink="alsasink" video-sink="kmssink scale=true"

If you don't have EG-52 on the board, please test with the following instructions:

$ /etc/init.d/matrix-gui-2.0 stop
$ /etc/init.d/weston stop
$ gst-launch-1.0 filesrc location=/usr/share/ti/video/TearOfSteel-Short-1920x800.mov ! decodebin ! videoconvert ! kmssink

The default supported LVDS is Dual-Channel and 1920 × 1080 resolutions. If you want to support Single-Channel 7 inch screen, the modification is as follows:

1) Open the mux_rom7510a2.h header file found in {UBOOT}/board/ti/advantech/. Modify the pinmux of GPMC_CS0 from PIN_OUTPUT_PULLDOWN to PIN_OUTPUT_PULLUP

Original:

{GPMC_CS0, (M14 | PIN_OUTPUT_PULLDOWN)},/* gpmc_cs0.gpio2_19 */

Modified:

{GPMC_CS0, (M14 | PIN_OUTPUT_PULLUP)},/* gpmc_cs0.gpio2_19 */

2) Open the am57xx-rom7510a2.dts device tree file found in {LINUX}/arch/ arm/boot/dts/. Change the original panel-timing to panel-timing of 7 inch screen.

The following configuration is only used as a sample( The actual timings of the screen you used should be based on its datasheet):

panel-timing {
clock-frequency = <148500000

Original:

panel-timing {
clock-frequency = <148500000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <24>;
hback-porch = <54>;
hsync-len = <12>;
vback-porch = <3>;
vfront-porch = <40>;
vsync-len = <7>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};

Modified:

panel-timing {
clock-frequency = <29500000>;
hactive = <800>;
vactive = <480>;
hfront-porch = <24>;
hback-porch = <96>;
hsync-len = <72>;
vback-porch = <3>;
vfront-porch = <10>;
vsync-len = <7>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
};

  Modified for IDK-1110WR LCD panel:

panel-timing {
   clock-frequency = < 51200000>;
   hactive = < 1024>;
   vactive = < 600>;
   hfront-porch = < 150>;
   hback-porch = < 150>;
   hsync  -  len = < 20>;
   vback-porch = < 15>;
   vfront-porch = < 15>;
   vsync  -  len = < 5>;
   hsync-active = < 0>;
   vsync  -  active = < 0>;
   de-active = < 1>;
   pixelclk-active = < 1>;
};

3) Open the "dispc.c" file found in {LINUX}/drivers/gpu/drm/omapdrm/dss/. Modify the driver code to make IDK-1110W correct color.

diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 7a9c926..8744992 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -3026,8 +3026,15 @@ static void dispc_mgr_setup(enum omap_channel channel,
  dispc_mgr_enable_alpha_fixed_zorder(channel,
      info->partial_alpha_enabled);
  if (dss_has_feature(FEAT_CPR)) {
+#ifdef CONFIG_ARCH_AM57XX_ADVANTECH
+  if (channel != OMAP_DSS_CHANNEL_LCD) {
+    dispc_mgr_enable_cpr(channel, info->cpr_enable);
+    dispc_mgr_set_cpr_coef(channel, &info->cpr_coefs);
+  }
+#else
    dispc_mgr_enable_cpr(channel, info->cpr_enable);
    dispc_mgr_set_cpr_coef(channel, &info->cpr_coefs);
+#endif
   }
 }
 
@@ -4548,6 +4555,26 @@ static int dispc_runtime_resume(struct device *dev)
    dispc_restore_context();
 
    dispc_restore_gamma_tables();
+
+#ifdef CONFIG_ARCH_AM57XX_ADVANTECH
+   {
+     enum omap_channel channel = OMAP_DSS_CHANNEL_LCD;
+     struct omap_dss_cpr_coefs coefs = {
+	 .rr = 0x40,
+	 .rg = 0x0,
+	 .rb = 0x0,
+	 .gr = 0x0,
+	 .gg = 0x40,
+	 .gb = 0x0,
+	 .br = 0x0,
+	 .bg = 0x0,
+	 .bb = 0x40,
+     };
+
+     dispc_mgr_set_cpr_coef(channel, &coefs);
+     dispc_mgr_enable_cpr(channel, true);
+   }
+#endif
  }

Note:The voltage required for different screen backlighting is different, so you have to choose the appropriate backlight voltage. You can refer the detail jump information to select backlight voltage from ROMDB7502_User_Manual.