From nobody Tue Nov 26 22:40:49 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1704405557; cv=none; d=zohomail.com; s=zohoarc; b=XEItwWq7RpWGIFfegqkeoM89Te7ajqoViCyyUUuzFm0NBTAdNaqJ7ZEk3rsGpR3N16rZvjXvtJB2tNJ1DicyAMvMbqKpnf39ho+PMP1arUjbGMAEuYnN6b/ot/wTNWXS3Bhf4PXFtjTp9F+dZGbrUDcjQLLAUfw0eukw3DTIiTA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704405557; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cYtvpGOJsiUPqkI0epr0yc71idGp9+0xtJJsMQORx8I=; b=W8ypZBT18i7MaVLsE7QY9vhlVyLX397m9ya7UYL8cOWyoO/JvEvdH8j/kZBP8XjeLl43G3x9qaP43HSrj6J1XP4jD6La/hId9i7w2jeesdUV4yN8Dxs3I/oSEFJbdb2o2v4k1mB4sNl/TETF8KdOnDoLkBWxQEvudi/b8EcwHwM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704405557249304.7901788071798; Thu, 4 Jan 2024 13:59:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLVjQ-0001ZD-OF; Thu, 04 Jan 2024 16:58:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLVjO-0001Z3-UE for qemu-devel@nongnu.org; Thu, 04 Jan 2024 16:58:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLVjM-0003OB-Jj for qemu-devel@nongnu.org; Thu, 04 Jan 2024 16:58:26 -0500 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-JRHFPQs0N_ahmBYrypu4rQ-1; Thu, 04 Jan 2024 16:58:22 -0500 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a28f0137fd9so32008166b.2 for ; Thu, 04 Jan 2024 13:58:22 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id h24-20020a17090791d800b00a235b01886dsm114229ejz.10.2024.01.04.13.58.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 13:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704405503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cYtvpGOJsiUPqkI0epr0yc71idGp9+0xtJJsMQORx8I=; b=HejoVz4jDe4Ta1DONXsk3TeVylR26QwGMbJ8a6o3YxbFWBo6qHgVaBqQwqLSximBbhiNPq ZeoXCDwwPyxQJn8Sb9g9wqYcQkII51VW6NHfryxHNMhrQNd+acBxlfwzp0jFXDUwVNUyAa RUvJ6lElVOt7c+iNHyVMNGHIenW+/NA= X-MC-Unique: JRHFPQs0N_ahmBYrypu4rQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704405500; x=1705010300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cYtvpGOJsiUPqkI0epr0yc71idGp9+0xtJJsMQORx8I=; b=IaCCVPi6N3xR/SG4GtJ/v3Wqfoaz+qqu6SzrL7GEF1ihxKBqfms2FF8028a7aCcQsa vQlvRhpWiXj5GhroipH+vOjiwEUew2jKxQ3bev7rrLNdWis2VWJmOmQJ1VmGbX6l3NJY kBPyaOqN7/McgQ9nxlemx7T5BCZvTdNKdZATJYlqph63ZrvE2nXFNcCU3KZ8h/GBiuJQ zdPOoCRjmjN/2hagspzJ8dQA3+FPseaf7GHFoHw6WEV1qHtK3UuWNI4XiPuR7e1k7Sqw mAI0JzokxPBeJzlb6m8eg2hj1dDqaiBHnO8dgfr2vq0pjEyjTD7U5eWMkVQiNDIn/oVg +Yxw== X-Gm-Message-State: AOJu0YyaH9aSTaGT7U44vpEdTOX6iZun/8iNLE74PEb76O1PAII5xcYO f6vVIy45Oln6N5lldGM57U9NyimNpHqqZn0K26E2v9q4GWBvGtFxmlRNj4Lb7oB0g+/x/BJH4nH hVmdNDZu7xQywCnWZk0hkpERSvkLr5GRCCdtibiZeaZPhO9d+ZU1j7mlLYgrFg6vx4ApuRmI6/G 8FY7Zgyd4= X-Received: by 2002:a17:907:829a:b0:a19:e62:1fc4 with SMTP id mr26-20020a170907829a00b00a190e621fc4mr469757ejc.30.1704405500602; Thu, 04 Jan 2024 13:58:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlxNASFcQ5w5De+4OX4vcxl5eMrfgj48/jM9qsDZ631hG1asP9U6ECam77I3lLKLg0K67Iug== X-Received: by 2002:a17:907:829a:b0:a19:e62:1fc4 with SMTP id mr26-20020a170907829a00b00a190e621fc4mr469749ejc.30.1704405500221; Thu, 04 Jan 2024 13:58:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: kraxel@redhat.com, balaton@eik.bme.hu, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 2/8] vga: introduce VGADisplayParams Date: Thu, 4 Jan 2024 22:58:05 +0100 Message-ID: <20240104215813.156153-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240104215813.156153-1-pbonzini@redhat.com> References: <20240104215813.156153-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-2.691, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1704405558017100003 The next patches will introduce more parameters that cause a full refresh. Instead of adding arguments to get_offsets and lines to update_basic_params, do everything through a struct. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- hw/display/vga_int.h | 15 ++++---- hw/display/cirrus_vga.c | 24 +++++------- hw/display/vga.c | 82 +++++++++++++++++------------------------ 3 files changed, 52 insertions(+), 69 deletions(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 7cf0d11201a..6be61e04284 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -56,6 +56,12 @@ struct VGACommonState; typedef uint8_t (* vga_retrace_fn)(struct VGACommonState *s); typedef void (* vga_update_retrace_info_fn)(struct VGACommonState *s); =20 +typedef struct VGADisplayParams { + uint32_t line_offset; + uint32_t start_addr; + uint32_t line_compare; +} VGADisplayParams; + typedef struct VGACommonState { MemoryRegion *legacy_address_space; uint8_t *vram_ptr; @@ -90,10 +96,7 @@ typedef struct VGACommonState { uint8_t palette[768]; int32_t bank_offset; int (*get_bpp)(struct VGACommonState *s); - void (*get_offsets)(struct VGACommonState *s, - uint32_t *pline_offset, - uint32_t *pstart_addr, - uint32_t *pline_compare); + void (*get_params)(struct VGACommonState *s, VGADisplayParams *params); void (*get_resolution)(struct VGACommonState *s, int *pwidth, int *pheight); @@ -111,9 +114,7 @@ typedef struct VGACommonState { int graphic_mode; uint8_t shift_control; uint8_t double_scan; - uint32_t line_offset; - uint32_t line_compare; - uint32_t start_addr; + VGADisplayParams params; uint32_t plane_updated; uint32_t last_line_offset; uint8_t last_cw, last_ch; diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index b80f98b6c4c..e6d2581d4eb 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -798,9 +798,9 @@ static int cirrus_bitblt_videotovideo_copy(CirrusVGASta= te * s) if (blit_is_unsafe(s, false)) return 0; =20 - return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.start_addr, - s->cirrus_blt_srcaddr - s->vga.start_addr, - s->cirrus_blt_width, s->cirrus_blt_height); + return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.params.start_a= ddr, + s->cirrus_blt_srcaddr - s->vga.params.start_addr, + s->cirrus_blt_width, s->cirrus_blt_height); } =20 /*************************************** @@ -1101,30 +1101,26 @@ static void cirrus_write_bitblt(CirrusVGAState * s,= unsigned reg_value) * ***************************************/ =20 -static void cirrus_get_offsets(VGACommonState *s1, - uint32_t *pline_offset, - uint32_t *pstart_addr, - uint32_t *pline_compare) +static void cirrus_get_params(VGACommonState *s1, + VGADisplayParams *params) { CirrusVGAState * s =3D container_of(s1, CirrusVGAState, vga); - uint32_t start_addr, line_offset, line_compare; + uint32_t line_offset; =20 line_offset =3D s->vga.cr[0x13] | ((s->vga.cr[0x1b] & 0x10) << 4); line_offset <<=3D 3; - *pline_offset =3D line_offset; + params->line_offset =3D line_offset; =20 - start_addr =3D (s->vga.cr[0x0c] << 8) + params->start_addr =3D (s->vga.cr[0x0c] << 8) | s->vga.cr[0x0d] | ((s->vga.cr[0x1b] & 0x01) << 16) | ((s->vga.cr[0x1b] & 0x0c) << 15) | ((s->vga.cr[0x1d] & 0x80) << 12); - *pstart_addr =3D start_addr; =20 - line_compare =3D s->vga.cr[0x18] | + params->line_compare =3D s->vga.cr[0x18] | ((s->vga.cr[0x07] & 0x10) << 4) | ((s->vga.cr[0x09] & 0x40) << 3); - *pline_compare =3D line_compare; } =20 static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s) @@ -2925,7 +2921,7 @@ void cirrus_init_common(CirrusVGAState *s, Object *ow= ner, s->linear_mmio_mask =3D s->real_vram_size - 256; =20 s->vga.get_bpp =3D cirrus_get_bpp; - s->vga.get_offsets =3D cirrus_get_offsets; + s->vga.get_params =3D cirrus_get_params; s->vga.get_resolution =3D cirrus_get_resolution; s->vga.cursor_invalidate =3D cirrus_cursor_invalidate; s->vga.cursor_draw_line =3D cirrus_cursor_draw_line; diff --git a/hw/display/vga.c b/hw/display/vga.c index 02a7deb66f8..aebc1aeaaef 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1042,52 +1042,40 @@ static int update_palette256(VGACommonState *s) return full_update; } =20 -static void vga_get_offsets(VGACommonState *s, - uint32_t *pline_offset, - uint32_t *pstart_addr, - uint32_t *pline_compare) +static void vga_get_params(VGACommonState *s, + VGADisplayParams *params) { - uint32_t start_addr, line_offset, line_compare; - if (vbe_enabled(s)) { - line_offset =3D s->vbe_line_offset; - start_addr =3D s->vbe_start_addr; - line_compare =3D 65535; + params->line_offset =3D s->vbe_line_offset; + params->start_addr =3D s->vbe_start_addr; + params->line_compare =3D 65535; } else { /* compute line_offset in bytes */ - line_offset =3D s->cr[VGA_CRTC_OFFSET]; - line_offset <<=3D 3; + params->line_offset =3D s->cr[VGA_CRTC_OFFSET] << 3; =20 /* starting address */ - start_addr =3D s->cr[VGA_CRTC_START_LO] | + params->start_addr =3D s->cr[VGA_CRTC_START_LO] | (s->cr[VGA_CRTC_START_HI] << 8); =20 /* line compare */ - line_compare =3D s->cr[VGA_CRTC_LINE_COMPARE] | + params->line_compare =3D s->cr[VGA_CRTC_LINE_COMPARE] | ((s->cr[VGA_CRTC_OVERFLOW] & 0x10) << 4) | ((s->cr[VGA_CRTC_MAX_SCAN] & 0x40) << 3); } - *pline_offset =3D line_offset; - *pstart_addr =3D start_addr; - *pline_compare =3D line_compare; } =20 /* update start_addr and line_offset. Return TRUE if modified */ static int update_basic_params(VGACommonState *s) { int full_update; - uint32_t start_addr, line_offset, line_compare; + VGADisplayParams current; =20 full_update =3D 0; =20 - s->get_offsets(s, &line_offset, &start_addr, &line_compare); + s->get_params(s, ¤t); =20 - if (line_offset !=3D s->line_offset || - start_addr !=3D s->start_addr || - line_compare !=3D s->line_compare) { - s->line_offset =3D line_offset; - s->start_addr =3D start_addr; - s->line_compare =3D line_compare; + if (memcmp(¤t, &s->params, sizeof(current))) { + s->params =3D current; full_update =3D 1; } return full_update; @@ -1188,7 +1176,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) } full_update |=3D update_basic_params(s); =20 - line_offset =3D s->line_offset; + line_offset =3D s->params.line_offset; =20 vga_get_text_resolution(s, &width, &height, &cw, &cheight); if ((height * width) <=3D 1) { @@ -1227,7 +1215,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) } =20 cursor_offset =3D ((s->cr[VGA_CRTC_CURSOR_HI] << 8) | - s->cr[VGA_CRTC_CURSOR_LO]) - s->start_addr; + s->cr[VGA_CRTC_CURSOR_LO]) - s->params.start_addr; if (cursor_offset !=3D s->cursor_offset || s->cr[VGA_CRTC_CURSOR_START] !=3D s->cursor_start || s->cr[VGA_CRTC_CURSOR_END] !=3D s->cursor_end) { @@ -1241,7 +1229,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) s->cursor_start =3D s->cr[VGA_CRTC_CURSOR_START]; s->cursor_end =3D s->cr[VGA_CRTC_CURSOR_END]; } - cursor_ptr =3D s->vram_ptr + (s->start_addr + cursor_offset) * 4; + cursor_ptr =3D s->vram_ptr + (s->params.start_addr + cursor_offset) * = 4; if (now >=3D s->cursor_blink_time) { s->cursor_blink_time =3D now + VGA_TEXT_CURSOR_PERIOD_MS / 2; s->cursor_visible_phase =3D !s->cursor_visible_phase; @@ -1251,7 +1239,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) linesize =3D surface_stride(surface); ch_attr_ptr =3D s->last_ch_attr; line =3D 0; - offset =3D s->start_addr * 4; + offset =3D s->params.start_addr * 4; for(cy =3D 0; cy < height; cy++) { d1 =3D dest; src =3D s->vram_ptr + offset; @@ -1331,7 +1319,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) dest +=3D linesize * cheight; line1 =3D line + cheight; offset +=3D line_offset; - if (line < s->line_compare && line1 >=3D s->line_compare) { + if (line < s->params.line_compare && line1 >=3D s->params.line_com= pare) { offset =3D 0; } line =3D line1; @@ -1461,10 +1449,10 @@ static void vga_draw_graphic(VGACommonState *s, int= full_update) disp_width =3D width; depth =3D s->get_bpp(s); =20 - region_start =3D (s->start_addr * 4); - region_end =3D region_start + (ram_addr_t)s->line_offset * height; + region_start =3D (s->params.start_addr * 4); + region_end =3D region_start + (ram_addr_t)s->params.line_offset * heig= ht; region_end +=3D width * depth / 8; /* scanline length */ - region_end -=3D s->line_offset; + region_end -=3D s->params.line_offset; if (region_end > s->vbe_size || depth =3D=3D 0 || depth =3D=3D 15) { /* * We land here on: @@ -1529,7 +1517,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) share_surface =3D false; } =20 - if (s->line_offset !=3D s->last_line_offset || + if (s->params.line_offset !=3D s->last_line_offset || disp_width !=3D s->last_width || height !=3D s->last_height || s->last_depth !=3D depth || @@ -1540,12 +1528,12 @@ static void vga_draw_graphic(VGACommonState *s, int= full_update) s->last_scr_height =3D height; s->last_width =3D disp_width; s->last_height =3D height; - s->last_line_offset =3D s->line_offset; + s->last_line_offset =3D s->params.line_offset; s->last_depth =3D depth; s->last_byteswap =3D byteswap; full_update =3D 1; } - if (surface_data(surface) !=3D s->vram_ptr + (s->start_addr * 4) + if (surface_data(surface) !=3D s->vram_ptr + (s->params.start_addr * 4) && is_buffer_shared(surface)) { /* base address changed (page flip) -> shared display surfaces * must be updated with the new base address */ @@ -1555,8 +1543,8 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) if (full_update) { if (share_surface) { surface =3D qemu_create_displaysurface_from(disp_width, - height, format, s->line_offset, - s->vram_ptr + (s->start_addr * 4)); + height, format, s->params.line_offset, + s->vram_ptr + (s->params.start_addr * 4)); dpy_gfx_replace_surface(s->con, surface); } else { qemu_console_resize(s->con, disp_width, height); @@ -1620,9 +1608,9 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) #if 0 printf("w=3D%d h=3D%d v=3D%d line_offset=3D%d cr[0x09]=3D0x%02x cr[0x1= 7]=3D0x%02x linecmp=3D%d sr[0x01]=3D0x%02x\n", width, height, v, line_offset, s->cr[9], s->cr[VGA_CRTC_MODE], - s->line_compare, sr(s, VGA_SEQ_CLOCK_MODE)); + s->params.line_compare, sr(s, VGA_SEQ_CLOCK_MODE)); #endif - addr1 =3D (s->start_addr * 4); + addr1 =3D (s->params.start_addr * 4); bwidth =3D DIV_ROUND_UP(width * bits, 8); y_start =3D -1; d =3D surface_data(surface); @@ -1630,7 +1618,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) y1 =3D 0; =20 if (!full_update) { - if (s->line_compare < height) { + if (s->params.line_compare < height) { /* split screen mode */ region_start =3D 0; } @@ -1686,14 +1674,14 @@ static void vga_draw_graphic(VGACommonState *s, int= full_update) if (!multi_run) { mask =3D (s->cr[VGA_CRTC_MODE] & 3) ^ 3; if ((y1 & mask) =3D=3D mask) - addr1 +=3D s->line_offset; + addr1 +=3D s->params.line_offset; y1++; multi_run =3D multi_scan; } else { multi_run--; } /* line compare acts on the displayed lines */ - if (y =3D=3D s->line_compare) + if (y =3D=3D s->params.line_compare) addr1 =3D 0; d +=3D linesize; } @@ -1810,9 +1798,7 @@ void vga_common_reset(VGACommonState *s) s->graphic_mode =3D -1; /* force full update */ s->shift_control =3D 0; s->double_scan =3D 0; - s->line_offset =3D 0; - s->line_compare =3D 0; - s->start_addr =3D 0; + memset(&s->params, '\0', sizeof(s->params)); s->plane_updated =3D 0; s->last_cw =3D 0; s->last_ch =3D 0; @@ -1934,7 +1920,7 @@ static void vga_update_text(void *opaque, console_ch_= t *chardata) =20 /* Update "hardware" cursor */ cursor_offset =3D ((s->cr[VGA_CRTC_CURSOR_HI] << 8) | - s->cr[VGA_CRTC_CURSOR_LO]) - s->start_addr; + s->cr[VGA_CRTC_CURSOR_LO]) - s->params.start_addr; if (cursor_offset !=3D s->cursor_offset || s->cr[VGA_CRTC_CURSOR_START] !=3D s->cursor_start || s->cr[VGA_CRTC_CURSOR_END] !=3D s->cursor_end || full_update) { @@ -1950,7 +1936,7 @@ static void vga_update_text(void *opaque, console_ch_= t *chardata) s->cursor_end =3D s->cr[VGA_CRTC_CURSOR_END]; } =20 - src =3D (uint32_t *) s->vram_ptr + s->start_addr; + src =3D (uint32_t *) s->vram_ptr + s->params.start_addr; dst =3D chardata; =20 if (full_update) { @@ -2195,7 +2181,7 @@ bool vga_common_init(VGACommonState *s, Object *obj, = Error **errp) xen_register_framebuffer(&s->vram); s->vram_ptr =3D memory_region_get_ram_ptr(&s->vram); s->get_bpp =3D vga_get_bpp; - s->get_offsets =3D vga_get_offsets; + s->get_params =3D vga_get_params; s->get_resolution =3D vga_get_resolution; s->hw_ops =3D &vga_ops; switch (vga_retrace_method) { --=20 2.43.0