Pass lv_display variable through user_ctx

Description

Hi folks, I have a code with LVGL with ESP32 in ESP IDF and everything works correctly with a hello world, but in the function on_color_trans_done I have to pass lv_display from a global variable. I have seen that in other examples they use

lv_disp_disp_drv_t *disp_driver = (lv_disp_disp_drv_t *)user_ctx;
lv_disp_flush_ready(disp_driver);

but I read that it was removed in version 9.

What MCU/Processor/Board and compiler are you using?

T-Display S3 and Platformio

What LVGL version are you using?

9.2.2

What do you want to achieve?

Pass lv_display variable through user_ctx

What have you tried so far?

Using a global variable lv_display

Code to reproduce

Some parts of the code

// Global variable
lv_display_t *lv_display;
...
static bool on_color_trans_done(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_io_event_data_t *edata, void *user_ctx)
{
    lv_disp_flush_ready(lv_display);
    return false;
}
...
void lvgl_setup(void)
{
...
    lv_display = lv_display_create(SCREEN_WIDTH, SCREEN_HEIGHT);
...
}