Move DISP_BUF_SIZE calculation to a helper function so we can use it with LVGL v7 and LVGL v8.
DISP_BUF_SIZE is used for:
- Holding the calculation of the required size of the display draw buffer.
- Calculating the SPI max transfer size when configuring the ESP32 SPI Master peripheral.
DISP_BUF_SIZE value is determined by the LVGL v7 configuration option LV_HOR_RES_MAX and sometimes by also using the LVGL v7 configuration option LV_VER_RES_MAX. Both of those options are no longer present in LVGL v8, so the DISP_BUF_SIZE value has to be calculated differently.