diff --git a/Boards/btt-panda-touch/device.properties b/Boards/btt-panda-touch/device.properties index 6af6f839..ac706624 100644 --- a/Boards/btt-panda-touch/device.properties +++ b/Boards/btt-panda-touch/device.properties @@ -11,6 +11,7 @@ spiRamMode=OCT spiRamSpeed=120M tinyUsb=false esptoolFlashFreq=120M +fixRgbDisplayGlitch=true [display] size=2.4" diff --git a/Boards/cyd-4848s040c/device.properties b/Boards/cyd-4848s040c/device.properties index 2ff93f20..acfe80e6 100644 --- a/Boards/cyd-4848s040c/device.properties +++ b/Boards/cyd-4848s040c/device.properties @@ -10,6 +10,7 @@ spiRam=true spiRamMode=OCT spiRamSpeed=80M tinyUsb=false +fixRgbDisplayGlitch=true [display] size=4" @@ -24,7 +25,7 @@ warningMessage= theme=DefaultDark colorDepth=16 -# Fixes glitches in the display driverf when rendering new screens/apps +# Fixes glitches in the display driver when rendering new screens/apps [sdkconfig] CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y CONFIG_SPIRAM_RODATA=y diff --git a/Boards/cyd-8048s043c/device.properties b/Boards/cyd-8048s043c/device.properties index 602cb2c5..808caaf8 100644 --- a/Boards/cyd-8048s043c/device.properties +++ b/Boards/cyd-8048s043c/device.properties @@ -10,6 +10,7 @@ spiRam=true spiRamMode=OCT spiRamSpeed=80M tinyUsb=false +fixRgbDisplayGlitch=true [display] size=4.3" diff --git a/Documentation/ideas.md b/Documentation/ideas.md index bfeddd35..62c06d36 100644 --- a/Documentation/ideas.md +++ b/Documentation/ideas.md @@ -32,6 +32,10 @@ - Support direct installation of an `.app` file with `tactility.py install helloworld.app ` - Support `tactility.py target ` to remember the device IP address. - minitar/untarFile(): "entry->metadata.path" can escape its confined path (e.g. "../something") +- Consider these defaults when PSRAM is present: + CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y + CONFIG_SPIRAM_RODATA=y + CONFIG_SPIRAM_XIP_FROM_PSRAM=y ## Medium Priority diff --git a/device.py b/device.py index ea24b2cf..87daefa4 100644 --- a/device.py +++ b/device.py @@ -130,7 +130,7 @@ def write_spiram_variables(output_file, device_properties: ConfigParser): output_file.write("CONFIG_SPIRAM=y\n") mode = get_property_or_exit(device_properties, "hardware", "spiRamMode") # Mode - if mode is not "AUTO": + if mode != "AUTO": output_file.write(f"CONFIG_SPIRAM_MODE_{mode}=y\n") else: output_file.write("CONFIG_SPIRAM_TYPE_AUTO=y\n") @@ -185,6 +185,12 @@ def write_custom_sdkconfig(output_file, device_properties: ConfigParser): value = section[key].replace("\"", "\\\"") output_file.write(f"{key.upper()}={value}\n") +def write_rgb_display_glitch_fix(output_file, device_properties: ConfigParser): + enabled = get_boolean_property_or_false(device_properties, "hardware", "fixRgbDisplayGlitch") + if enabled: + output_file.write("# Fixes glitches in the display driver when rendering new screens/apps\n") + output_file.write("CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y\n") + def write_properties(output_file, device_properties: ConfigParser, device_id: str): write_defaults(output_file) output_file.write("\n\n# Hardware: Main\n") @@ -197,6 +203,7 @@ def write_properties(output_file, device_properties: ConfigParser, device_id: st write_iram_fix(output_file, device_properties) write_usb_variables(output_file, device_properties) write_custom_sdkconfig(output_file, device_properties) + write_rgb_display_glitch_fix(output_file, device_properties) def main(device_id: str): devices = list_devices() diff --git a/sdkconfig.board.btt-panda-touch b/sdkconfig.board.btt-panda-touch index fe722915..71db03b4 100644 --- a/sdkconfig.board.btt-panda-touch +++ b/sdkconfig.board.btt-panda-touch @@ -57,3 +57,5 @@ CONFIG_LV_DPI_DEF=139 CONFIG_LV_COLOR_DEPTH=16 CONFIG_LV_COLOR_DEPTH_16=y CONFIG_LV_THEME_DEFAULT_DARK=y +# Fixes glitches in the display driver when rendering new screens/apps +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/sdkconfig.board.cyd-4848s040c b/sdkconfig.board.cyd-4848s040c index 15adc502..91c07b3b 100644 --- a/sdkconfig.board.cyd-4848s040c +++ b/sdkconfig.board.cyd-4848s040c @@ -60,3 +60,5 @@ CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y CONFIG_SPIRAM_RODATA=y CONFIG_SPIRAM_XIP_FROM_PSRAM=y CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y +# Fixes glitches in the display driver when rendering new screens/apps +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/sdkconfig.board.cyd-8048s043c b/sdkconfig.board.cyd-8048s043c index bc41eaf8..51318c06 100644 --- a/sdkconfig.board.cyd-8048s043c +++ b/sdkconfig.board.cyd-8048s043c @@ -56,3 +56,5 @@ CONFIG_LV_DPI_DEF=217 CONFIG_LV_COLOR_DEPTH=16 CONFIG_LV_COLOR_DEPTH_16=y CONFIG_LV_THEME_DEFAULT_DARK=y +# Fixes glitches in the display driver when rendering new screens/apps +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y diff --git a/sdkconfig.board.lilygo-tlora-pager b/sdkconfig.board.lilygo-tlora-pager index 41e7893f..7ba8bd4c 100644 --- a/sdkconfig.board.lilygo-tlora-pager +++ b/sdkconfig.board.lilygo-tlora-pager @@ -46,7 +46,7 @@ CONFIG_FLASHMODE_DIO=y CONFIG_ESPTOOLPY_FLASHFREQ_40M=y # Hardware: SPIRAM CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_MODE_AUTO=y +CONFIG_SPIRAM_TYPE_AUTO=y CONFIG_SPIRAM_SPEED_120M=y CONFIG_SPIRAM_USE_MALLOC=y CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y