Skip to content

Conversation

@jepler
Copy link

@jepler jepler commented Mar 27, 2024

and dynamically calculate dvi_vertical_repeat

the 640x240 mode was useful for a little project of mine

and dynamically calculate dvi_vertical_repeat

the 640x240 mode was useful for a little project of mine
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on one thing I don't understand.

Could you test this against some existing working cases to check for regression? Thanks.

@jepler jepler changed the title pico_dvi: support 640x240 (tested @1bpp) and 800x240 (not tested) pico_dvi: support 640x240 and 800x240 (tested @1bpp) Mar 29, 2024
@dhalbert
Copy link
Collaborator

Were you able to test this on an older working test case? Thanks. I just want to make sure there is no regression due to the new code further down in the change.

@jepler
Copy link
Author

jepler commented Mar 29, 2024

I tested the following modes:

    {"width":320, "height":240, "color_depth":8},
    {"width":640, "height":240, "color_depth":1}, # (new)
    {"width":640, "height":480, "color_depth":1},
    {"width":800, "height":240, "color_depth":1}, # (new)
    {"width":800, "height":480, "color_depth":1}):

the 400x240@8bpp mode would not initialize:

MemoryError: memory allocation failed, allocating 110412 bytes

This allocation is the framebuffer of 96000 bytes plus the "TDMS buffers":

    size_t total_allocation_size = sizeof(uint32_t) * (framebuffer_size + DVI_N_TMDS_BUFFERS * self->tmdsbuf_size);

@jepler jepler requested a review from dhalbert March 29, 2024 14:52
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dhalbert dhalbert merged commit a5830ce into adafruit:main Apr 3, 2024
@dhalbert dhalbert changed the title pico_dvi: support 640x240 and 800x240 (tested @1bpp) picodvi: support 640x240 and 800x240 (tested @1bpp) Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants