1
0
Fork 0
forked from len0rd/rockbox
Commit graph

11 commits

Author SHA1 Message Date
Solomon Peachy
c63b82a895 debug: Report if double-buffered fb is enabled
(Only applies to hosted targets if FB_DOUBLEBUF is enabled)

Change-Id: I6ef3ead5f6ef12b26e3dd0d07ac582cff98deaed
2025-05-08 12:35:03 -04:00
Solomon Peachy
6acbf74d7f Add support for double buffering to hosted framebuffer code
Requires kernel-level support to work.  No in-tree users yet

Change-Id: Iec7e22971aa24fc7a26996a3d507143955c0ab5c
2025-05-02 13:48:31 -04:00
Solomon Peachy
1f43b14127 linux-fbdev: Don't overrun the framebuffer when it's larger than expected
We expect a fixed FRAMEBUFFER_SIZE that's width*height*bitdepth, and we
mmap()ed that in.  However, when doing the initial fb clear, we
were using the hardware-provided 'finfo.smem_len' which could be
larger than FRAMEBUFFER_SIZE.  This overran our mmap and triggered
a segfault.

Correct this by mmaping (and clearing) the entire smem_len.  As a safety
measure, panic if smem_len is smaller than our expected FRAMEBUFFER_SIZE

Change-Id: I3222139c7aed6e8e8ee232b1730edd5cd70065ff
2025-05-02 11:42:31 -04:00
Solomon Peachy
e55618d07a hosted: Minor corrections to the linux framebuffer driver.
* Query variable info _before_ mmaping the framebuffer
 * Sanity-check the resolution/bitdepth, and if it doens't match
   try to set it to what we want.

This is functionally a no-op.

Change-Id: I087ff81775d8f63bf7846b7fef19f6fc36c1cc84
2024-07-01 09:51:50 -04:00
Solomon Peachy
5cfd3ae4e6 hosted: Use O_CLOEXEC for all open() and "e" for fopen() calls
This way we'll automatically close the files upon exec()

Change-Id: Ic0daca8fb56432830de4a2f4a86a77337121ecc7
2020-10-11 01:47:03 -04:00
Solomon Peachy
9892e468d5 hosted: Don't use O_SYNC for the framebuffer handle.
Change-Id: Iff4b1947fe053313d677b894c78250760aaef967
2020-10-02 09:48:59 -04:00
Solomon Peachy
9ee618e889 hosted: Fix overzealous spamming of backlight and lcd enable
This caused random delays in LCD activity, and also caused key inputs to go nuts

Change-Id: Ie483c86f7461455308f8c5f8999df313521c6b55
2020-10-02 02:24:42 +00:00
Solomon Peachy
021b55735b hosted: fix shutdown crash in framebuffer code.
Change-Id: I78315b81ab8df0408abc64d5edb6af37db568ad7
2020-10-01 14:01:21 +00:00
Solomon Peachy
0a7b23097a Hosted: Improvements in the LCD code. (Roman Stolyarov)
* Kill LCD when turning off the backlight
 * Fix logic errors in lcd_enable() calls
 * Use ioctls instead of sysfs to twiddle lcd enable

Change-Id: I6864ff63d87b747ac48719b0f4ba2de00333a1d3
2020-10-01 12:49:39 +00:00
Solomon Peachy
5cdfe30e79 hiby: Use HAVE_LCD_ENABLE instead of HAVE_LCD_SLEEP
Change-Id: I93819f5ecaad9101a711a0cca626570c7aef0e57
2020-04-08 16:36:43 +02:00
Solomon Peachy
53b93ea6a6 hiby: Refactor X3ii/X20 and Rocker LCD code
Once some missing power optimization stuff was added to the X3ii code,
they were completely identical.

Change-Id: I68e4db5e270e8ff22f91e521616a054bd7baa95d
2020-04-08 15:56:06 +02:00
Renamed from firmware/target/hosted/agptek/lcd-agptek.c (Browse further)