LVDS display with release fsimx6-V3.0

      LVDS display with release fsimx6-V3.0

      Dear support team,

      I have an armstoneA9r2 running with release fsimx6-V3.0. I want to use it with a lvds display. The configuration for the display in /drivers/video/mxc/ldb.c structure ldb_modedb is not available anymore. So I expected the display configuration to be in the device tree armstonea9r2qdl.dtsi. The only thing I found is:

      Source Code

      1. #ifdef CONFIG_ARMSTONEA9R2_LVDS0
      2. /* LVDS0 must always go to DI0 of an IPU! */
      3. lvds-channel@0 {
      4. reg = <0>;
      5. #ifdef CONFIG_ARMSTONEA9R2_USE_ONE_IPU
      6. crtc = "ipu1-di0";
      7. #else
      8. crtc = "ipu2-di0";
      9. #endif
      10. fsl,data-mapping = CONFIG_ARMSTONEA9R2_LVDS0_MAPPING;
      11. fsl,data-width = <CONFIG_ARMSTONEA9R2_LVDS0_DATA_WIDTH>;
      12. #ifdef __LVDS0_PRIMARY__
      13. primary;
      14. #endif
      15. status = "okay";
      16. display-timings {
      17. native-mode = <&timing0>;
      18. timing0: CONFIG_ARMSTONEA9R2_LVDS0_TIMING;
      19. };
      20. };
      21. #endif

      Where can I set display resolution and timings ?

      Thanks in advance.
      This is now very easy to set in the regular device tree, i.e. armstonea9r2dl.dts or armstonea9r2q.dts. I think the comments are very descriptive and tell what to do. Set the MXCFB0 variable to LVDS0, then define the resolution and timings and other settings in the LVDS section of the same file and you're done. Regarding the displays, you do not need to change anything in the common armstonea9r2qdl.dtsi file anymore.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.
      Thanks, I was in the wrong file. Now I filled in my parameters (the same that are working in V 2.1 ldb.c):

      Source Code

      1. #define CONFIG_ARMSTONEA9R2_LVDS0_MAPPING "spwg"
      2. #define CONFIG_ARMSTONEA9R2_LVDS0_BPP 32
      3. #define CONFIG_ARMSTONEA9R2_LVDS0_PIX_FMT "RGB24"
      4. #define CONFIG_ARMSTONEA9R2_LVDS0_DATA_WIDTH 24
      5. #define CONFIG_ARMSTONEA9R2_LVDS0_TIMING \
      6. wvga { \
      7. clock-frequency = <14065000>; \
      8. hactive = <1280>; \
      9. vactive = <800>; \
      10. hfront-porch = <40>; \
      11. hback-porch = <40>; \
      12. hsync-len = <80>; \
      13. vback-porch = <10>; \
      14. vfront-porch = <3>; \
      15. vsync-len = <10>; \
      16. hsync-active = <0>; \
      17. vsync-active = <0>; \
      18. de-active = <1>; \
      19. pixelclk-active = <0>; \
      20. }

      I can see the /sys/class/graphics/fb0 device is showing me 1280x800 pixel at 32 bpp. I also can control/dim the backlight by using /sys/class/backlight/backlight.ldb/brightness. But I don't see nothing on the screen. The LVDS connection is exactly the same as is working with efusA9. I tried matchbox windowmanager as well as fbv image.jpg and also cat /dev/urandom > /dev/fb0.

      Some additional questions:
      How do I enable double buffering to have a virtual size at 1280x1600 pixel?
      Why is brightness in 16 steps only (0..15) instead of 256 steps on previous releases?

      Thanks for any hint.
      The display is running now. The problem was the clock_frequency. Here you have to set the real frequency and not the parameter as in fb_videomode stucture. The value is about 71 MHz.

      Some additional questions:
      How do I enable double buffering to have a virtual size at 1280x1600 pixel?
      Why is brightness in 16 steps only (0..15) instead of 256 steps on previous releases?
      > How do I enable double buffering to have a virtual size at 1280x1600 pixel?
      Have you tried to change the parameter /sys/class/graphics/fb0/virtual_size to 1280,1600 ?

      > Why is brightness in 16 steps only (0..15) instead of 256 steps on previous releases?
      In the new (original) kernel there are just 7 brightness levels and they are linear. So gamma is not considered.
      We improved this. Now we have 16 brightness levels which gives you much smaller steps and they are arranged to provied a correct gamma curve. That means for the eye the brightness increases equaly.
      The range from 0 to 255 is fully used. The levels are spread out on this range according to the curve like this: 0 1 5 10 18 28 41 56 73 92 113 137 163 192 222 255

      Best Regards,
      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

      Post was edited 1 time, last by “fs-support_PH” ().

      RSchubert wrote:

      Why is brightness in 16 steps only (0..15) instead of 256 steps on previous releases?

      In the old version the PWM values were linear, while the perception of the eye is more like quadratic (gamma 2.2 to 2.5). So a double value for the backligt did not result in the double brightness of the perceived light.

      Unfortunately It is difficult to compute x^2.5 in the kernel when you do not have any math functions at hand. So in the device tree version, the kernel developers decided to use a set of predefined values for the brightnes that are gamma-aware. Which means now a double value also means a double brightness. But the default device trees from NXP/Freescale only used 8 brightness steps. We actually improved this situation already by using 16 brightness levels. If this is still not enough, then you can define your own set of values in the device tree.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.