[fb] Use system_map_mmio to map framebuffer

Update fb driver to use new j6_init_desc_framebuffer format with
physical address, and system_map_mmio to map the framebuffer into its
memory.
This commit is contained in:
Justin C. Miller
2021-02-04 20:44:27 -08:00
parent fe05d45cde
commit e4aafca7c3
3 changed files with 35 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ public:
enum class pixel_order : uint8_t { bgr8, rgb8, };
screen(void *addr, unsigned hres, unsigned vres, pixel_order order);
screen(volatile void *addr, unsigned hres, unsigned vres, unsigned scanline, pixel_order order);
unsigned width() const { return m_resx; }
unsigned height() const { return m_resy; }
@@ -22,8 +22,10 @@ public:
void update();
private:
pixel_t *m_fb, *m_back;
volatile pixel_t *m_fb;
pixel_t *m_back;
pixel_order m_order;
unsigned m_scanline;
unsigned m_resx, m_resy;
screen() = delete;