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

picodvi: support 640x240 and 800x240 (tested @1bpp) #9102

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

jepler
Copy link
Member

@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.

ports/raspberrypi/common-hal/picodvi/Framebuffer.c Outdated Show resolved Hide resolved
@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
Member 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
22 checks passed
@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