On 2014-11-13 14:10, Fabio Estevam wrote:
On Thu, Nov 13, 2014 at 7:01 PM, Stefan <[email protected]> wrote:
With interface-pix-fmt = "bgr666"; colors are ok,
but there is some noise on the screen - looks like twinkling pixel faults.
This is just the case for images in framebuffer, not for console text.

Reason is, that pixelclk-active is not used to set value of sig_cfg.clk_pol,
so it's rising instead of falling edge.

Used the following workaround:

--- a/drivers/staging/imx-drm/ipuv3-crtc.c
+++ b/drivers/staging/imx-drm/ipuv3-crtc.c
@@ -166,7 +166,9 @@
         sig_cfg.Vsync_pol = 1;

     sig_cfg.enable_pol = 1;
-   sig_cfg.clk_pol = 0;
+   sig_cfg.clk_pol = 0; /* rising edge */
+   if (mode->private_flags & DRM_MODE_FLAG_PCSYNC) /* falling edge  */
+       sig_cfg.clk_pol = 1;
     sig_cfg.width = mode->hdisplay;
     sig_cfg.height = mode->vdisplay;
     sig_cfg.pixel_fmt = out_pixel_fmt;
diff --git a/drivers/staging/imx-drm/parallel-display.c
b/drivers/staging/imx-drm/parallel-display.c
index 4ca61af..bf7eee4 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -26,6 +26,8 @@
  #include <drm/drm_panel.h>
  #include <linux/videodev2.h>
  #include <video/of_display_timing.h>
+#include <video/videomode.h>
+#include <video/of_videomode.h>

  #include "imx-drm.h"

@@ -80,11 +82,15 @@

     if (np) {
         struct drm_display_mode *mode = drm_mode_create(connector->dev);
+       struct videomode vm;
         if (!mode)
             return -EINVAL;
         of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE);
         drm_mode_copy(mode, &imxpd->mode);
         mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+       /* imxpd->mode.flags does not contain all flags from devicetree */
+       of_get_videomode(np, &vm, OF_USE_NATIVE_MODE);
+       mode->private_flags=vm.flags;
         drm_mode_probed_add(connector, mode);
         num_modes++;

It would be nice if you could submit this as a formal patch to the
[email protected] list.

Stefan,

Could you also send (at least to me if you don't want to CC the list)
your final device tree that works with your LCD display?

Thanks

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to