Merge pull request #8596 from jepler/obsolete-allocation-stuff

Remove some stuff about reserved psram & supervisor allocations
This commit is contained in:
Dan Halbert 2023-11-13 16:55:47 -05:00 committed by GitHub
commit 0294ccfb55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 0 additions and 56 deletions

View File

@ -63,9 +63,6 @@
//| """ //| """
//| Configure and initialize a camera with the given properties //| Configure and initialize a camera with the given properties
//| //|
//| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera framebuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased.
//|
//|
//| .. important:: //| .. important::
//| //|
//| Not all supported sensors have all //| Not all supported sensors have all

View File

@ -41,9 +41,6 @@ NORETURN void mp_raise_espidf_MemoryError(void);
void raise_esp_error(esp_err_t err) NORETURN; void raise_esp_error(esp_err_t err) NORETURN;
#define CHECK_ESP_RESULT(x) do { int res = (x); if (res != ESP_OK) raise_esp_error(res); } while (0) #define CHECK_ESP_RESULT(x) do { int res = (x); if (res != ESP_OK) raise_esp_error(res); } while (0)
void common_hal_espidf_reserve_psram(void);
bool common_hal_espidf_set_reserved_psram(size_t amount);
size_t common_hal_espidf_get_reserved_psram(void);
size_t common_hal_espidf_get_total_psram(void); size_t common_hal_espidf_get_total_psram(void);
intptr_t common_hal_espidf_get_psram_start(void); intptr_t common_hal_espidf_get_psram_start(void);
intptr_t common_hal_espidf_get_psram_end(void); intptr_t common_hal_espidf_get_psram_end(void);

View File

@ -40,5 +40,3 @@
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
#define DOUBLE_TAP_PIN (&pin_GPIO42) #define DOUBLE_TAP_PIN (&pin_GPIO42)
#define DEFAULT_RESERVED_PSRAM (1048576)

View File

@ -37,6 +37,3 @@
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7)
#define DOUBLE_TAP_PIN (&pin_GPIO4) #define DOUBLE_TAP_PIN (&pin_GPIO4)
// a 1024x768 16BPP framebuffer + some breathing room
#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2)

View File

@ -37,5 +37,3 @@
// UART pins attached to the USB-serial converter chip // UART pins attached to the USB-serial converter chip
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1)
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3)
#define DEFAULT_RESERVED_PSRAM (1048576)

View File

@ -40,6 +40,3 @@
// UART pins attached to the USB-serial converter chip // UART pins attached to the USB-serial converter chip
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43)
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44)
// a 800x480 16BPP framebuffer + some breathing room
#define DEFAULT_RESERVED_PSRAM (800 * 800 * 2)

View File

@ -43,5 +43,3 @@
{.clock = &pin_GPIO21, .mosi = &pin_GPIO47, .miso = NULL}, \ {.clock = &pin_GPIO21, .mosi = &pin_GPIO47, .miso = NULL}, \
{.clock = &pin_GPIO39, .mosi = &pin_GPIO40, .miso = &pin_GPIO38}, \ {.clock = &pin_GPIO39, .mosi = &pin_GPIO40, .miso = &pin_GPIO38}, \
} }
#define DEFAULT_RESERVED_PSRAM (1048576)

View File

@ -37,6 +37,3 @@
// UART pins attached to the USB-serial converter chip // UART pins attached to the USB-serial converter chip
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43)
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44)
// a 1024x768 16BPP framebuffer + some breathing room
#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2)

View File

@ -43,6 +43,3 @@
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3)
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (1) #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (1)
// espcamera.FrameSize.QXGA, half a megabyte result image.jpeg
#define DEFAULT_RESERVED_PSRAM (1572864)

View File

@ -39,6 +39,3 @@
// UART pins attached to the USB-serial converter chip // UART pins attached to the USB-serial converter chip
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43)
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44)
// a 1024x768 16BPP framebuffer + some breathing room
#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2)

View File

@ -42,7 +42,6 @@
#else #else
#define esp_himem_reserved_area_size() (0) #define esp_himem_reserved_area_size() (0)
#endif #endif
size_t reserved_psram = DEFAULT_RESERVED_PSRAM;
#endif #endif
static size_t psram_size_usable(void) { static size_t psram_size_usable(void) {
@ -55,21 +54,6 @@ static size_t psram_size_usable(void) {
#endif #endif
} }
bool common_hal_espidf_set_reserved_psram(size_t amount) {
#ifdef CONFIG_SPIRAM
if (!esp_psram_is_initialized()) {
return false;
}
if (amount > psram_size_usable()) {
return false;
}
reserved_psram = amount;
return true;
#else
return false;
#endif
}
size_t common_hal_espidf_get_total_psram(void) { size_t common_hal_espidf_get_total_psram(void) {
return psram_size_usable(); return psram_size_usable();
} }

View File

@ -71,13 +71,4 @@
#define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0) #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0)
#endif #endif
#ifndef DEFAULT_RESERVED_PSRAM
#define DEFAULT_RESERVED_PSRAM (0)
#endif
#if defined(CONFIG_SPIRAM)
#undef CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS
#define CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS (1)
#endif
#endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H #endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H

View File

@ -545,10 +545,6 @@ void background_callback_run_all(void);
#error "CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR must be at least 1" #error "CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR must be at least 1"
#endif #endif
#ifndef CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS
#define CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS (0)
#endif
#ifndef USB_MIDI_EP_NUM_OUT #ifndef USB_MIDI_EP_NUM_OUT
#define USB_MIDI_EP_NUM_OUT (0) #define USB_MIDI_EP_NUM_OUT (0)
#endif #endif