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
* 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
* 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
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)