Linux VGA drive transplant experiment "go"

Source: Internet
Author: User

This article was reproduced from: http://m.blog.csdn.net/bzw73/article/details/46564275

With the front LCD driver frame, it is quite easy to re-port the VGA driver. By default, a number of VGA drivers have been supported on the disc, and we have added a driver with a resolution of 1440*900 on this basis. Add struct vga_1440_900 in KERNEL/DRIVERS/VIDEO/SAMSUNG/X4412_LCDS.C:
  1. /* vga-1440x900 */
  2. static struct S3CFB_LCD vga_1440_900 = {
  3. . width = 1440,
  4. . Height = 900,
  5. . BPP = 32,
  6. . Freq = 60,
  7. . Timing = {
  8. . H_FP = 48,
  9. . H_BP = 80,
  10. . H_SW = 32,
  11. . V_FP = 3,
  12. . V_FPE = 1,
  13. . V_BP = 17,
  14. . V_BPE = 1,
  15. . V_SW = 6,
  16. },
  17. . Polarity = {
  18. . RISE_VCLK = 1,
  19. . Inv_hsync = 1,
  20. . Inv_vsync = 0,
  21. . Inv_vden = 0,
  22. },
  23. . Init_ldi = NULL,
  24. };
Copy the code note that all the above data from the VGA standard VESA, debug any other VGA driver, its parameters are required to comply with the VESA standard. Add 1440*900 information to the struct array x4412_lcd_config:
    1. static struct {
    2.          char * name;
    3.          struct S3CFB_LCD * LCD;
    4. } x4412_lcd_config[] = {
    5.          {"ek070tn93",      &NB Sp      &ek070tn93},
    6.          {"Vs070cxn",     & nbsp;         &vs070cxn},
    7.          {" vga-1024x768 ",       &vga_1024_768},
    8.          {" vga-1280x1024 ",     &vga_1280_1024},
    9.          {" vga-1440x900 ",      &vga_1440_900},
    10.          {" vga-1920x1200 ",     &vga_1920_1200},
    11. };
Copy code in KERNEL/DRIVERS/VIDEO/SAMSUNG/S3CFB_OPS.C's S3cfb_map_default_video_memory function, the following program is present by default:
    1. memset (fb->screen_base, 0, Fix->smem_len);
The copy code is modified to:
    1. memset (fb->screen_base, 0, FIX->SMEM_LEN/3);
Copy code This is a bug where the kernel has a video cache with different resolutions. After compiling the kernel, update the kernel image, and after entering Uboot, modify the UBOOT environment variable and execute the following instructions:
    1. Setenv Bootargs "lcd=vga-1440x900 tp=ft5x06-1024x600 cam=ov2655 mac=00:09:c0:ff:ee:58"
Copy code at this point, the Lcd_setup function in X4412_LCDS.C will automatically match the LCD parameters by Uboot the environment variables passed to the kernel, truly realizing the function of a core to manage multiple LCD screens and VGA with multiple resolutions. To this end, for the 1440*900 VGA resolution of the drive transplant finished, porting other types of LCD or other resolution of the VGA driver, and some methods are identical.

Linux VGA drive transplant experiment "go"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.