Implement Tulip Creative Computer 4r11 - #608
Conversation
|
There is no proper fix for the display being yellow-green and the icons being a shade lighter, as that's one of the drawbacks of RGB332 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Tulip 4R11 device integration with hardware properties, device-tree nodes, module registration, display, touch, audio, and USB host configuration. Extends the GT911 driver with reset pulsing and coordinate calibration. Adds RGB565-to-RGB332 software conversion for RGB displays. Applies persisted touch calibration during LVGL startup. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Drivers/rgb-display-module/source/rgb_display.cpp (1)
240-270: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winFree
rgb332_scratchon later startup failures.If semaphore creation or callback registration fails, the function frees
internalbut leaks the RGB332 scratch buffer. A retry can leak one full-frame buffer per failed start.Proposed fix
internal->frame_complete_semaphore = xSemaphoreCreateBinary(); if (internal->frame_complete_semaphore == nullptr) { + heap_caps_free(internal->rgb332_scratch); esp_lcd_panel_del(internal->panel_handle); free(internal); return ERROR_OUT_OF_MEMORY; @@ LOG_E(TAG, "Failed to register panel event callbacks"); vSemaphoreDelete(internal->frame_complete_semaphore); + heap_caps_free(internal->rgb332_scratch); esp_lcd_panel_del(internal->panel_handle); free(internal); return ERROR_RESOURCE;
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f1d48502-bd33-4702-b25f-d8ea6fa44b12
⛔ Files ignored due to path filters (9)
partitions-16mb-no-sd-dev.csvis excluded by!**/*.csvpartitions-16mb-no-sd.csvis excluded by!**/*.csvpartitions-16mb-with-sd.csvis excluded by!**/*.csvpartitions-32mb-no-sd-dev.csvis excluded by!**/*.csvpartitions-32mb-no-sd.csvis excluded by!**/*.csvpartitions-4mb-with-sd.csvis excluded by!**/*.csvpartitions-8mb-no-sd-dev.csvis excluded by!**/*.csvpartitions-8mb-no-sd.csvis excluded by!**/*.csvpartitions-8mb-with-sd.csvis excluded by!**/*.csv
📒 Files selected for processing (14)
Devices/tulip-4r11/CMakeLists.txtDevices/tulip-4r11/LICENSE-Apache-2.0.mdDevices/tulip-4r11/device.propertiesDevices/tulip-4r11/devicetree.yamlDevices/tulip-4r11/source/module.cppDevices/tulip-4r11/tulip-4r11.dtsDrivers/dummy-i2s-amp-module/bindings/ti,pcm5101a.yamlDrivers/dummy-i2s-amp-module/include/bindings/dummy_i2s_amp.hDrivers/dummy-i2s-amp-module/source/dummy_i2s_amp.cppDrivers/gt911-module/bindings/goodix,gt911.yamlDrivers/gt911-module/include/drivers/gt911.hDrivers/gt911-module/source/gt911.cppDrivers/rgb-display-module/source/rgb_display.cppTactility/Source/Tactility.cpp
Removed outdated comment about Tulip 4 R11 Y range.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
Drivers/rgb-display-module/source/rgb_display.cpp (1)
246-296: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winRelease mapper resources on every startup failure path.
The unsupported-format path frees
internalbut leavespanel_handleallocated. The semaphore and callback-registration failure paths delete the panel but leavepixel_mapper_scratchand mapper state allocated.Use one cleanup path that destroys mapper state, frees scratch memory, deletes the panel, and frees
internal. Otherwise, repeated failed starts can exhaust display or heap resources.Drivers/gt911-module/bindings/goodix,gt911.yaml (2)
41-46: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winConstrain
reset-pulsesto the downstream type.
reset_controller_pinacceptsuint8_t, but this binding accepts any signedint. A value of-1becomes 255 pulses, while 256 becomes zero pulses. Reject values outside the supported range before the driver narrows them.
59-68: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winValidate the coordinate scale values.
The driver multiplies coordinates by
x-scaleandy-scalebefore clamping. The binding permits zero, negative, and arbitrarily large values. Require positive bounded values, or validate them before the arithmetic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a8a412ed-9826-427b-b000-630c625a100b
📒 Files selected for processing (10)
Devices/tulip-4r11/device.propertiesDevices/tulip-4r11/tulip-4r11.dtsDrivers/gt911-module/bindings/goodix,gt911.yamlDrivers/gt911-module/include/drivers/gt911.hDrivers/gt911-module/source/gt911.cppDrivers/rgb-display-module/bindings/espressif,esp32-rgb-display.yamlDrivers/rgb-display-module/include/drivers/rgb_display.hDrivers/rgb-display-module/source/rgb_display.cppTactilityKernel/include/tactility/drivers/software_pixel_mapper.hTactilityKernel/source/drivers/software_pixel_mapper.cpp
💤 Files with no reviewable changes (1)
- Drivers/gt911-module/include/drivers/gt911.h
🚧 Files skipped from review as they are similar to previous changes (3)
- Devices/tulip-4r11/device.properties
- Devices/tulip-4r11/tulip-4r11.dts
- Drivers/gt911-module/source/gt911.cpp
|
I confirmed that GT911 still works fine on other devices 👍 |
|
Thanks, this looks great! |
This pull request adds support for the Tulip Creative Computer 4 (rev R11) hardware platform, including device configuration, driver bindings, and hardware-specific adjustments. The changes introduce a new device definition, update driver modules to support the Tulip 4 R11's peripherals, and enhance the GT911 touch controller driver for greater board compatibility.
Driver and binding improvements
Summary by CodeRabbit