RK3588 Android12强制HDMI输出特殊分辨率timing

1.把白名单去掉,device/rockchip/common/device.mk中如下位置注释掉
  PRODUCT_COPY_FILES += \
      $(TARGET_DEVICE_DIR)/resolution_white.xml:/system/usr/share/resolution_white.xml
2.安照下面补丁修改,在kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c的默认数组中dw_hdmi_default_modes[] 加入分辨率3840x1436
将数组kernel-5.10/drivers/gpu/drm/drm_edid.c的edid_cea_modes_1[]第127个替换成需要修改的分辨率timming

3.在屏参中打开hdmi0,将hdmi0_mode改为127,这里主要是实现将kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c里面的dw_hdmi_connector_get_modes函数选用强制修改的HDMI屏参数timing。

diff --git a/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index badaee53fe..fca19a43dd 100644
--- a/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@ -170,6 +170,11 @@ static const struct drm_display_mode dw_hdmi_default_modes[] = {
                   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
                   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
           .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+               /* 127 - 3840x1436@30Hz 16:9 */
+       { DRM_MODE("3840x1436", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+                  4104, 4400, 0, 1436, 2168, 2178, 2250, 0,
+                  DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
+          .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
 };

 enum frl_mask {
@@ -2117,6 +2122,9 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
                                case 97:
                                                def_index=7;
                                                break;
+                               case 127:
+                                               def_index=9;
+                                               break;
                                default:
                                                def_index=1;
                                                break;
diff --git a/kernel-5.10/drivers/gpu/drm/drm_edid.c b/kernel-5.10/drivers/gpu/drm/drm_edid.c
index 4fdfb41b91..640f6ffd7e 100644
--- a/kernel-5.10/drivers/gpu/drm/drm_edid.c
+++ b/kernel-5.10/drivers/gpu/drm/drm_edid.c
@@ -1372,10 +1372,15 @@ static const struct drm_display_mode edid_cea_modes_1[] = {
                   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
          .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
        /* 127 - 5120x2160@100Hz 64:27 */
-       { DRM_MODE("5120x2160", DRM_MODE_TYPE_DRIVER, 1485000, 5120, 6216,
-                  6304, 6600, 0, 2160, 2168, 2178, 2250, 0,
+       // { DRM_MODE("5120x2160", DRM_MODE_TYPE_DRIVER, 1485000, 5120, 6216,
+       //         6304, 6600, 0, 2160, 2168, 2178, 2250, 0,
+       //         DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
+       //   .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+                       /* 128 - 3840x1436@30Hz 16:9 */
+       { DRM_MODE("3840x1436", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+                  4104, 4400, 0, 1436, 2168, 2178, 2250, 0,
                   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
-         .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+          .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
 };


 

### RK3588 USB Configuration and Issues For the RK3588 platform, configuring and troubleshooting USB involves several key aspects including driver setup, device recognition, and potential common issues encountered during usage. #### Driver Setup The Buildroot environment provided with the RK3568 SDK includes necessary libraries but requires specific configurations to support various peripherals like USB devices. For USB functionality on RK3588, ensuring that the correct drivers are included in the kernel is crucial[^1]. This typically means enabling options related to USB host controllers such as DWC2 or XHCI within the Linux kernel configuration menu (`make menuconfig`). #### Device Recognition Once appropriate drivers have been configured into the system image built by Buildroot, connecting a USB device should result in it being recognized automatically upon insertion. The dmesg command can be used to check logs for any messages indicating successful detection of new hardware: ```bash dmesg | grep usb ``` If no errors appear here when plugging in your USB gadget, chances are good that basic connectivity has succeeded. #### Common Problems and Solutions However, some typical problems may arise while working with USB ports on this chipset: - **Insufficient Power Supply**: Some high-power external drives might require more power than what an onboard port provides. - **Incompatible Kernel Modules**: Missing modules could prevent certain types of USB equipment from functioning properly even though they physically connect fine. To address these concerns, one approach would involve verifying whether all required firmware files exist under `/lib/firmware/`. Additionally, loading missing module(s) via `modprobe` commands at runtime or adding them permanently through editing `/etc/modules`. Another issue noted specifically around building environments similar to those mentioned earlier pertains to dependency resolution failures due to missing headers during compilation processes involving graphical interfaces over SSH connections[^3]. --related questions-- 1. How does one verify if the proper USB drivers are loaded after booting up? 2. What steps must be taken to ensure sufficient power delivery to connected USB peripherals? 3. Can you provide guidance on resolving dependency issues arising from absent header files during cross-compilation tasks? 4. Is there documentation available detailing how to add custom USB functionalities using Buildroot for RK3588 boards? 5. Are there known limitations regarding speed or performance when utilizing multiple USB devices simultaneously on RK3588 systems? : Mentioned about needing additional setups beyond just having pre-integrated libaries. : Highlighted challenges faced during development which indirectly points towards possible complications in setting up USB-related features requiring specific include paths.
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值