Rotation not working in v9.2.0

Description

Earlier in my application I have used version 8.3.9 and in that rotation was working perfectly fine. Now I have migrated to version 9.2.0 and the rotation API is not working. Any suggestions where I might have been missing? Thanks

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

Custom board

What LVGL version are you using?

9.2.0

What do you want to achieve?

Rotate the scree 180 degree

What have you tried so far?

Applied the APIs mentioned as in official documentation of version 9.2.0

Code to reproduce

void lvgl_init(void)
{
    // LVGL initialization
      lv_init();
      // Create a display
      disp = lv_display_create(MY_DISP_HOR_RES, MY_DISP_VER_RES);

      // set the display rotation
      lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_180);

      // Set the flush callback function
      lv_display_set_flush_cb(disp, disp_flush);

      // Set the draw buffers
      lv_display_set_buffers(disp, buf_1, buf_2, (MY_DISP_HOR_RES * BYTES_PER_PIXEL), LV_DISPLAY_RENDER_MODE_PARTIAL);
}

static void disp_flush(lv_disp_t* display, const lv_area_t * area, uint8_t * color_p)
{
    lv_draw_sw_rgb565_swap(buf_1, (MY_DISP_HOR_RES * MY_DISP_VER_RES));
    lcd_send_data(area->x1, area->y1, area->x2, area->y2, (uint8_t *)color_p);

    lv_display_flush_ready(display);
}