}
}
+static uint32_t exynos4210_fimd_global_width(Exynos4210fimdState *s)
+{
+ return ((s->vidtcon[2] >> FIMD_VIDTCON2_HOR_SHIFT) &
+ FIMD_VIDTCON2_SIZE_MASK) + 1;
+}
+
+static uint32_t exynos4210_fimd_global_height(Exynos4210fimdState *s)
+{
+ return ((s->vidtcon[2] >> FIMD_VIDTCON2_VER_SHIFT) &
+ FIMD_VIDTCON2_SIZE_MASK) + 1;
+}
+
static void exynos4210_update_resolution(Exynos4210fimdState *s)
{
DisplaySurface *surface = qemu_console_surface(s->console);
/* LCD resolution is stored in VIDEO TIME CONTROL REGISTER 2 */
- uint32_t width = ((s->vidtcon[2] >> FIMD_VIDTCON2_HOR_SHIFT) &
- FIMD_VIDTCON2_SIZE_MASK) + 1;
- uint32_t height = ((s->vidtcon[2] >> FIMD_VIDTCON2_VER_SHIFT) &
- FIMD_VIDTCON2_SIZE_MASK) + 1;
+ uint32_t width = exynos4210_fimd_global_width(s);
+ uint32_t height = exynos4210_fimd_global_height(s);
if (s->ifb == NULL || surface_width(surface) != width ||
surface_height(surface) != height) {
bool blend = false;
uint8_t *host_fb_addr;
bool is_dirty = false;
- int global_width;
+ uint32_t global_width;
if (!s || !s->console || !s->enabled ||
surface_bits_per_pixel(qemu_console_surface(s->console)) == 0) {
return true;
}
- global_width = (s->vidtcon[2] & FIMD_VIDTCON2_SIZE_MASK) + 1;
+ global_width = exynos4210_fimd_global_width(s);
exynos4210_update_resolution(s);
surface = qemu_console_surface(s->console);