Difference between revisions of "Display Output Setting"

From ESS-WIKI
Jump to: navigation, search
(add test command without EG-52)
(Modify description)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
 
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/matrix-gui-2.0 stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/weston stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ gst-launch-1.0 playbin uri=file:///usr/share/ti/video/TearOfSteel-Short-1920x800.mov audio-sink="alsasink" video-sink="kmssink scale=true"</div>
 
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/matrix-gui-2.0 stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/weston stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ gst-launch-1.0 playbin uri=file:///usr/share/ti/video/TearOfSteel-Short-1920x800.mov audio-sink="alsasink" video-sink="kmssink scale=true"</div>
 
If you don't have EG-52 on the board, please test with the following instructions:
 
If you don't have EG-52 on the board, please test with the following instructions:
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/matrix-gui-2.0 stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/weston stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ gst-launch-1.0 filesrc location=/usr/share/ti/video/TearOfSteel-Short-1920x800.mov ! decodebin name=decoder decoder. ! videoconvert ! kmssink</div>
+
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/matrix-gui-2.0 stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ /etc/init.d/weston stop</div><div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">$ gst-launch-1.0 filesrc location=/usr/share/ti/video/TearOfSteel-Short-1920x800.mov&nbsp;! decodebin&nbsp;! videoconvert&nbsp;! kmssink</div>
 
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:
 
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:
  
Line 22: Line 22:
 
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">panel-timing {<br/>clock-frequency = &lt;29500000&gt;;<br/>hactive = &lt;800&gt;;<br/>vactive = &lt;480&gt;;<br/>hfront-porch = &lt;24&gt;;<br/>hback-porch = &lt;96&gt;;<br/>hsync-len = &lt;72&gt;;<br/>vback-porch = &lt;3&gt;;<br/>vfront-porch = &lt;10&gt;;<br/>vsync-len = &lt;7&gt;;<br/>hsync-active = &lt;0&gt;;<br/>vsync-active = &lt;0&gt;;<br/>de-active = &lt;1&gt;;<br/>pixelclk-active = &lt;1&gt;;<br/>};</div>
 
<div style="background: rgb(238, 238, 238); padding: 5px 10px; border: 1px solid rgb(204, 204, 204);">panel-timing {<br/>clock-frequency = &lt;29500000&gt;;<br/>hactive = &lt;800&gt;;<br/>vactive = &lt;480&gt;;<br/>hfront-porch = &lt;24&gt;;<br/>hback-porch = &lt;96&gt;;<br/>hsync-len = &lt;72&gt;;<br/>vback-porch = &lt;3&gt;;<br/>vfront-porch = &lt;10&gt;;<br/>vsync-len = &lt;7&gt;;<br/>hsync-active = &lt;0&gt;;<br/>vsync-active = &lt;0&gt;;<br/>de-active = &lt;1&gt;;<br/>pixelclk-active = &lt;1&gt;;<br/>};</div>
 
&nbsp;
 
&nbsp;
 +
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.
 
'''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.

Latest revision as of 03:14, 21 February 2019

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.