Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    d1-h的lcd显示问题

    D1系列-RISC-V
    3
    4
    413
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lbuque LV 4 last edited by

      sdk: tina v2.0
      board: Lichee 86 Panel
      lcd: st7701s spi+rgb 408*960

      这是要显示的图片

      test.bmp

      这个是使用 echo /tmp/filename.bmp > /sys/class/disp/disp/attr/capture_dum p 截图出来的图片

      9c722b95-8b6c-495f-93c0-93221403aab5-image.png

      ps: 因为截图出来的图像无法上传,所以使用截图代替

      这个lcd显示的图片,显示了两张一样的图片

      f5bc72aa-73ed-403d-9c07-61bcc906655f-e122a7efcda66150bdc164f42f9adcd.jpg

      屏幕的初始化代码,使用的是屏厂提供的。

      以下是lcd部分的dts

      &lcd0 {
      	lcd_used             = <1>;
      	lcd_driver_name      = "st7701s_rgb_320X960";
      
      	lcd_if               = <0>;
      	lcd_hv_if            = <0>;
      
      	lcd_width            = <110>;
      	lcd_height           = <36>;
      	lcd_x                = <408>; // 408
      	lcd_y                = <960>;
      	lcd_dclk_freq        = <10>;
      	lcd_hbp              = <31>; // 31
      	lcd_ht               = <489>; //489
      	lcd_hspw             = <1>; // 1
      	lcd_vbp              = <5>; // 31
      	lcd_vt               = <968>; // 489
      	lcd_vspw             = <1>; // 1
      
      	lcd_backlight        = <50>;
      	lcd_pwm_used         = <1>;
      	lcd_pwm_ch           = <7>;
      	lcd_pwm_freq         = <20000>;
      	lcd_pwm_pol          = <1>;
      	lcd_bright_curve_en  = <0>;
      
      	lcd_frm              = <1>;
      	lcd_io_phase         = <0x0000>;
      	lcd_gamma_en         = <0>;
      	lcd_cmap_en          = <0>;
      	lcd_hv_clk_phase     = <0>;
      	lcd_hv_sync_polarity = <0>;
      	lcd_rb_swap          = <0>;
      
      	lcd_power            = "vcc-lcd";
      	lcd_pin_power        = "vcc-pd";
      	lcd_gpio_0           = <&pio PG 13 GPIO_ACTIVE_HIGH>;
      	lcd_gpio_1           = <&pio PE 14 GPIO_ACTIVE_HIGH>;
      	lcd_gpio_2           = <&pio PE 12 GPIO_ACTIVE_HIGH>;
      	lcd_gpio_3           = <&pio PE 15 GPIO_ACTIVE_HIGH>;
      	/*
      	lcd_gpio_0           = <&pio PG 13 1 1 1 1>;
      	lcd_gpio_1           = <&pio PE 14 1 1 1 1>;
      	lcd_gpio_2           = <&pio PE 12 1 1 1 1>;
      	lcd_gpio_3           = <&pio PE 15 1 1 1 1>;
      	*/
      	pinctrl-0            = <&rgb18_pins_a>;
      	pinctrl-1            = <&rgb18_pins_b>;
      	status               = "okay";
      };
      
      1 Reply Last reply Reply Quote Share 0
      • Y
        YterAA LV 7 last edited by

        lcd的dts上面还有一个disp的dts,调整fb大小

        L 1 Reply Last reply Reply Quote Share 0
        • L
          lbuque LV 4 @YterAA last edited by

          @yteraa 以下是我的disp部分dts

          &disp {
          	disp_init_enable         = <1>;
          	disp_mode                = <0>;
          
          	screen0_output_type      = <1>;
          	screen0_output_mode      = <4>;
          
          	screen1_output_type      = <3>;
          	screen1_output_mode      = <10>;
          
          	screen1_output_format    = <0>;
          	screen1_output_bits      = <0>;
          	screen1_output_eotf      = <4>;
          	screen1_output_cs        = <257>;
          	screen1_output_dvi_hdmi  = <2>;
          	screen1_output_range     = <2>;
          	screen1_output_scan      = <0>;
          	screen1_output_aspect_ratio = <8>;
          
          	dev0_output_type         = <1>;
          	dev0_output_mode         = <4>;
          	dev0_screen_id           = <0>;
          	dev0_do_hpd              = <0>;
          
          	dev1_output_type         = <4>;
          	dev1_output_mode         = <10>;
          	dev1_screen_id           = <1>;
          	dev1_do_hpd              = <1>;
          
          	def_output_dev           = <0>;
          	hdmi_mode_check          = <1>;
          
          	fb0_format               = <0>;
          	fb0_width                = <0>;
          	fb0_height               = <0>;
          
          	fb1_format               = <0>;
          	fb1_width                = <0>;
          	fb1_height               = <0>;
          	chn_cfg_mode             = <1>;
          
          	disp_para_zone           = <1>;
          	/*VCC-LCD*/
          /*	dc1sw-supply = <&reg_dc1sw>;*/
          	/*VCC-DSI*/
          /*	eldo3-supply = <&reg_eldo3>;*/
          	/*VCC-PD*/
          /*	dcdc1-supply = <&reg_dcdc1>;*/
          };
          

          我没有找到这部分dts的相关详细说明

          J 1 Reply Last reply Reply Quote Share 0
          • J
            bobo LV 3 @lbuque last edited by

            @lbuque 在 d1-h的lcd显示问题 中说:

            fb0_width = <0>;
            fb0_height = <0>;

            如果你需要framebuffer是全屏显示,把fb0的长宽参数填写成你的屏幕分辨率。uboot-dts里面也改一下试试。

            1 Reply Last reply Reply Quote Share 0
            • 1 / 1
            • First post
              Last post

            Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策