Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: display: fix zero-buffers-in-SRAM case in DCNANO LCDIF #58879

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions drivers/display/display_mcux_dcnano_lcdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ static const struct display_driver_api mcux_dcnano_lcdif_api = {

#define MCUX_DCNANO_LCDIF_PIXEL_BYTES(n) \
(DISPLAY_BITS_PER_PIXEL(DT_INST_PROP(n, pixel_format)) / 8)
#define MCUX_DCNANO_LCDIF_FB_SIZE(n) DT_INST_PROP(n, width) * \
DT_INST_PROP(n, height) * MCUX_DCNANO_LCDIF_PIXEL_BYTES(n)

/* When using external framebuffer mem, we should not allocate framebuffers
* in SRAM. Instead, we use external framebuffer address and size
* from devicetree.
*/
#ifdef CONFIG_MCUX_DCNANO_LCDIF_EXTERNAL_FB_MEM
#define MCUX_DCNANO_LCDIF_FRAMEBUFFER_DECL(n)
#define MCUX_DCNANO_LCDIF_FB_SIZE(n) DT_INST_PROP(n, width) * \
DT_INST_PROP(n, height) * MCUX_DCNANO_LCDIF_PIXEL_BYTES(n)
#define MCUX_DCNANO_LCDIF_FRAMEBUFFER(n) \
(uint8_t *)CONFIG_MCUX_DCNANO_LCDIF_EXTERNAL_FB_ADDR
#else
Expand All @@ -275,8 +275,6 @@ static const struct display_driver_api mcux_dcnano_lcdif_api = {
DT_INST_PROP(n, height) * \
MCUX_DCNANO_LCDIF_PIXEL_BYTES(n) * \
CONFIG_MCUX_DCNANO_LCDIF_FB_NUM]
#define MCUX_DCNANO_LCDIF_FB_SIZE(n) \
sizeof(mcux_dcnano_lcdif_frame_buffer_##n) / CONFIG_MCUX_DCNANO_LCDIF_FB_NUM
#define MCUX_DCNANO_LCDIF_FRAMEBUFFER(n) mcux_dcnano_lcdif_frame_buffer_##n
#endif

Expand Down