From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498051936156510.3801486542129; Wed, 21 Jun 2017 06:32:16 -0700 (PDT) Received: from localhost ([::1]:54001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfjv-0004ot-Hm for importer@patchew.org; Wed, 21 Jun 2017 09:32:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbf-0005M6-Jl for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbd-0003Ye-W4 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41874) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbd-0003Y6-Mx for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C2EA75BEC9 for ; Wed, 21 Jun 2017 13:23:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9DE66A2C1; Wed, 21 Jun 2017 13:23:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 265A231E61; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C2EA75BEC9 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C2EA75BEC9 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:35 +0200 Message-Id: <20170621132340.27686-2-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 21 Jun 2017 13:23:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/6] egl-helpers: add helpers to handle opengl framebuffers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a collection of egl_fb_*() helper functions to manage and use opengl framebuffers, which is a common pattern in UI code with opengl support. Signed-off-by: Gerd Hoffmann Message-id: 20170614084149.31314-2-kraxel@redhat.com --- include/ui/egl-helpers.h | 15 ++++++++++ ui/egl-helpers.c | 76 ++++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 91 insertions(+) diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index c785d60e91..be8908737c 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -8,6 +8,21 @@ extern EGLDisplay *qemu_egl_display; extern EGLConfig qemu_egl_config; =20 +typedef struct egl_fb { + int width; + int height; + GLuint texture; + GLuint framebuffer; + bool delete_texture; +} egl_fb; + +void egl_fb_destroy(egl_fb *fb); +void egl_fb_setup_default(egl_fb *fb, int width, int height); +void egl_fb_create_for_tex(egl_fb *fb, int width, int height, GLuint textu= re); +void egl_fb_create_new_tex(egl_fb *fb, int width, int height); +void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip); +void egl_fb_read(void *dst, egl_fb *src); + #ifdef CONFIG_OPENGL_DMABUF =20 extern int qemu_egl_rn_fd; diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 4a4d3370ee..bb19a5eeca 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -24,6 +24,82 @@ EGLDisplay *qemu_egl_display; EGLConfig qemu_egl_config; =20 +/* ------------------------------------------------------------------ */ + +void egl_fb_destroy(egl_fb *fb) +{ + if (!fb->framebuffer) { + return; + } + + if (fb->delete_texture) { + glDeleteTextures(1, &fb->texture); + fb->delete_texture =3D false; + } + glDeleteFramebuffers(1, &fb->framebuffer); + + fb->width =3D 0; + fb->height =3D 0; + fb->texture =3D 0; + fb->framebuffer =3D 0; +} + +void egl_fb_setup_default(egl_fb *fb, int width, int height) +{ + fb->width =3D width; + fb->height =3D height; + fb->framebuffer =3D 0; /* default framebuffer */ +} + +void egl_fb_create_for_tex(egl_fb *fb, int width, int height, GLuint textu= re) +{ + fb->width =3D width; + fb->height =3D height; + fb->texture =3D texture; + if (!fb->framebuffer) { + glGenFramebuffers(1, &fb->framebuffer); + } + + glBindFramebuffer(GL_FRAMEBUFFER_EXT, fb->framebuffer); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, + GL_TEXTURE_2D, fb->texture, 0); +} + +void egl_fb_create_new_tex(egl_fb *fb, int width, int height) +{ + GLuint texture; + + glGenTextures(1, &texture); + glBindTexture(GL_TEXTURE_2D, texture); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, + 0, GL_BGRA, GL_UNSIGNED_BYTE, 0); + + egl_fb_create_for_tex(fb, width, height, texture); + fb->delete_texture =3D true; +} + +void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip) +{ + GLuint y1, y2; + + glBindFramebuffer(GL_READ_FRAMEBUFFER, src->framebuffer); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dst->framebuffer); + glViewport(0, 0, dst->width, dst->height); + y1 =3D flip ? src->height : 0; + y2 =3D flip ? 0 : src->height; + glBlitFramebuffer(0, y1, src->width, y2, + 0, 0, dst->width, dst->height, + GL_COLOR_BUFFER_BIT, GL_LINEAR); +} + +void egl_fb_read(void *dst, egl_fb *src) +{ + glBindFramebuffer(GL_READ_FRAMEBUFFER, src->framebuffer); + glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); + glReadPixels(0, 0, src->width, src->height, + GL_BGRA, GL_UNSIGNED_BYTE, dst); +} + /* ---------------------------------------------------------------------- = */ =20 #ifdef CONFIG_OPENGL_DMABUF --=20 2.9.3 From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498051930305545.2642056908197; Wed, 21 Jun 2017 06:32:10 -0700 (PDT) Received: from localhost ([::1]:54000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfjs-0004m9-L7 for importer@patchew.org; Wed, 21 Jun 2017 09:32:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbl-0005RU-0l for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbe-0003ZD-Qt for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbe-0003Yc-IU for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FAC45BED8 for ; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD35418C4D; Wed, 21 Jun 2017 13:23:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2DB0431E62; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9FAC45BED8 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9FAC45BED8 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:36 +0200 Message-Id: <20170621132340.27686-3-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 21 Jun 2017 13:23:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/6] egl-headless: use framebuffer helper functions. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Message-id: 20170614084149.31314-3-kraxel@redhat.com --- ui/egl-headless.c | 67 ++++++++++++++-------------------------------------= ---- 1 file changed, 17 insertions(+), 50 deletions(-) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index d8d800f8a6..809bfde99c 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -8,14 +8,13 @@ typedef struct egl_dpy { DisplayChangeListener dcl; DisplaySurface *ds; - int width, height; - GLuint texture; - GLuint framebuffer; - GLuint blit_texture; - GLuint blit_framebuffer; + egl_fb guest_fb; + egl_fb blit_fb; bool y_0_top; } egl_dpy; =20 +/* ------------------------------------------------------------------ */ + static void egl_refresh(DisplayChangeListener *dcl) { graphic_hw_update(dcl->con); @@ -38,8 +37,8 @@ static void egl_scanout_disable(DisplayChangeListener *dc= l) { egl_dpy *edpy =3D container_of(dcl, egl_dpy, dcl); =20 - edpy->texture =3D 0; - /* XXX: delete framebuffers here ??? */ + egl_fb_destroy(&edpy->guest_fb); + egl_fb_destroy(&edpy->blit_fb); } =20 static void egl_scanout_texture(DisplayChangeListener *dcl, @@ -52,34 +51,17 @@ static void egl_scanout_texture(DisplayChangeListener *= dcl, { egl_dpy *edpy =3D container_of(dcl, egl_dpy, dcl); =20 - edpy->texture =3D backing_id; edpy->y_0_top =3D backing_y_0_top; =20 /* source framebuffer */ - if (!edpy->framebuffer) { - glGenFramebuffers(1, &edpy->framebuffer); - } - glBindFramebuffer(GL_FRAMEBUFFER_EXT, edpy->framebuffer); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, edpy->texture, 0); + egl_fb_create_for_tex(&edpy->guest_fb, + backing_width, backing_height, backing_id); =20 /* dest framebuffer */ - if (!edpy->blit_framebuffer) { - glGenFramebuffers(1, &edpy->blit_framebuffer); - glGenTextures(1, &edpy->blit_texture); - edpy->width =3D 0; - edpy->height =3D 0; - } - if (edpy->width !=3D backing_width || edpy->height !=3D backing_height= ) { - edpy->width =3D backing_width; - edpy->height =3D backing_height; - glBindTexture(GL_TEXTURE_2D, edpy->blit_texture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, - edpy->width, edpy->height, - 0, GL_BGRA, GL_UNSIGNED_BYTE, 0); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, edpy->blit_framebuffer); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0= _EXT, - GL_TEXTURE_2D, edpy->blit_texture, 0); + if (edpy->blit_fb.width !=3D backing_width || + edpy->blit_fb.height !=3D backing_height) { + egl_fb_destroy(&edpy->blit_fb); + egl_fb_create_new_tex(&edpy->blit_fb, backing_width, backing_heigh= t); } } =20 @@ -88,32 +70,17 @@ static void egl_scanout_flush(DisplayChangeListener *dc= l, uint32_t w, uint32_t h) { egl_dpy *edpy =3D container_of(dcl, egl_dpy, dcl); - GLuint y1, y2; =20 - if (!edpy->texture || !edpy->ds) { + if (!edpy->guest_fb.texture || !edpy->ds) { return; } - assert(surface_width(edpy->ds) =3D=3D edpy->width); - assert(surface_height(edpy->ds) =3D=3D edpy->height); + assert(surface_width(edpy->ds) =3D=3D edpy->guest_fb.width); + assert(surface_height(edpy->ds) =3D=3D edpy->guest_fb.height); assert(surface_format(edpy->ds) =3D=3D PIXMAN_x8r8g8b8); =20 - /* blit framebuffer, flip if needed */ - glBindFramebuffer(GL_READ_FRAMEBUFFER, edpy->framebuffer); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, edpy->blit_framebuffer); - glViewport(0, 0, edpy->width, edpy->height); - y1 =3D edpy->y_0_top ? edpy->height : 0; - y2 =3D edpy->y_0_top ? 0 : edpy->height; - glBlitFramebuffer(0, y1, edpy->width, y2, - 0, 0, edpy->width, edpy->height, - GL_COLOR_BUFFER_BIT, GL_NEAREST); + egl_fb_blit(&edpy->blit_fb, &edpy->guest_fb, edpy->y_0_top); + egl_fb_read(surface_data(edpy->ds), &edpy->blit_fb); =20 - /* read pixels to surface */ - glBindFramebuffer(GL_READ_FRAMEBUFFER, edpy->blit_framebuffer); - glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); - glReadPixels(0, 0, edpy->width, edpy->height, - GL_BGRA, GL_UNSIGNED_BYTE, surface_data(edpy->ds)); - - /* notify about updates */ dpy_gfx_update(edpy->dcl.con, x, y, w, h); } =20 --=20 2.9.3 From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498052274631202.15565831888978; Wed, 21 Jun 2017 06:37:54 -0700 (PDT) Received: from localhost ([::1]:54041 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfpR-0001H6-Bh for importer@patchew.org; Wed, 21 Jun 2017 09:37:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbi-0005Ob-6J for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbh-0003b0-6m for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60182) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbg-0003ag-UP for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:41 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 06BC67DCC4 for ; Wed, 21 Jun 2017 13:23:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id C5CF777640; Wed, 21 Jun 2017 13:23:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 359FA3FB9F; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 06BC67DCC4 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 06BC67DCC4 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:37 +0200 Message-Id: <20170621132340.27686-4-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 21 Jun 2017 13:23:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/6] sdl2: use framebuffer helper functions. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Message-id: 20170614084149.31314-4-kraxel@redhat.com --- include/ui/sdl2.h | 8 ++++++-- ui/sdl2-gl.c | 36 +++++++----------------------------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index aaf226c2c0..454367ac84 100644 --- a/include/ui/sdl2.h +++ b/include/ui/sdl2.h @@ -7,6 +7,10 @@ #include #include =20 +#ifdef CONFIG_OPENGL +# include "ui/egl-helpers.h" +#endif + struct sdl2_console { DisplayChangeListener dcl; DisplaySurface *surface; @@ -23,8 +27,8 @@ struct sdl2_console { SDL_GLContext winctx; #ifdef CONFIG_OPENGL ConsoleGLState *gls; - GLuint tex_id; - GLuint fbo_id; + egl_fb guest_fb; + egl_fb win_fb; bool y0_top; bool scanout_mode; #endif diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index 1cd77e2c16..dcad3d0d26 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -42,14 +42,7 @@ static void sdl2_set_scanout_mode(struct sdl2_console *s= con, bool scanout) =20 scon->scanout_mode =3D scanout; if (!scon->scanout_mode) { - if (scon->fbo_id) { - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, 0, 0); - glDeleteFramebuffers(1, &scon->fbo_id); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); - scon->fbo_id =3D 0; - } + egl_fb_destroy(&scon->guest_fb); if (scon->surface) { surface_gl_destroy_texture(scon->gls, scon->surface); surface_gl_create_texture(scon->gls, scon->surface); @@ -191,7 +184,6 @@ void sdl2_gl_scanout_disable(DisplayChangeListener *dcl) assert(scon->opengl); scon->w =3D 0; scon->h =3D 0; - scon->tex_id =3D 0; sdl2_set_scanout_mode(scon, false); } =20 @@ -210,48 +202,34 @@ void sdl2_gl_scanout_texture(DisplayChangeListener *d= cl, scon->y =3D y; scon->w =3D w; scon->h =3D h; - scon->tex_id =3D backing_id; scon->y0_top =3D backing_y_0_top; =20 SDL_GL_MakeCurrent(scon->real_window, scon->winctx); =20 sdl2_set_scanout_mode(scon, true); - if (!scon->fbo_id) { - glGenFramebuffers(1, &scon->fbo_id); - } - - glBindFramebuffer(GL_FRAMEBUFFER_EXT, scon->fbo_id); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, scon->tex_id, 0); + egl_fb_create_for_tex(&scon->guest_fb, backing_width, backing_height, + backing_id); } =20 void sdl2_gl_scanout_flush(DisplayChangeListener *dcl, uint32_t x, uint32_t y, uint32_t w, uint32_t h) { struct sdl2_console *scon =3D container_of(dcl, struct sdl2_console, d= cl); - int ww, wh, y1, y2; + int ww, wh; =20 assert(scon->opengl); if (!scon->scanout_mode) { return; } - if (!scon->fbo_id) { + if (!scon->guest_fb.framebuffer) { return; } =20 SDL_GL_MakeCurrent(scon->real_window, scon->winctx); =20 - glBindFramebuffer(GL_READ_FRAMEBUFFER, scon->fbo_id); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - SDL_GetWindowSize(scon->real_window, &ww, &wh); - glViewport(0, 0, ww, wh); - y1 =3D scon->y0_top ? 0 : scon->h; - y2 =3D scon->y0_top ? scon->h : 0; - glBlitFramebuffer(0, y1, scon->w, y2, - 0, 0, ww, wh, - GL_COLOR_BUFFER_BIT, GL_NEAREST); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, scon->fbo_id); + egl_fb_setup_default(&scon->win_fb, ww, wh); + egl_fb_blit(&scon->win_fb, &scon->guest_fb, !scon->y0_top); =20 SDL_GL_SwapWindow(scon->real_window); } --=20 2.9.3 From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498051788788937.3672059145314; Wed, 21 Jun 2017 06:29:48 -0700 (PDT) Received: from localhost ([::1]:53984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfha-0002td-La for importer@patchew.org; Wed, 21 Jun 2017 09:29:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbg-0005Mh-74 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbe-0003Yy-K8 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51538) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbe-0003YK-Bu for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6CC027F6B9 for ; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFC047764A; Wed, 21 Jun 2017 13:23:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3FC8541AB1; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6CC027F6B9 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6CC027F6B9 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:38 +0200 Message-Id: <20170621132340.27686-5-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Jun 2017 13:23:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/6] gtk: use framebuffer helper functions. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Message-id: 20170614084149.31314-5-kraxel@redhat.com --- include/ui/gtk.h | 4 ++-- ui/gtk-egl.c | 36 +++++++----------------------------- ui/gtk-gl-area.c | 26 +++++++------------------- 3 files changed, 16 insertions(+), 50 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index ca9a2268de..2f7b720358 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -52,8 +52,8 @@ typedef struct VirtualGfxConsole { EGLSurface esurface; int glupdates; int x, y, w, h; - GLuint tex_id; - GLuint fbo_id; + egl_fb guest_fb; + egl_fb win_fb; bool y0_top; bool scanout_mode; #endif diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index cf48cca259..0d5cab2bc8 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -30,14 +30,7 @@ static void gtk_egl_set_scanout_mode(VirtualConsole *vc,= bool scanout) =20 vc->gfx.scanout_mode =3D scanout; if (!vc->gfx.scanout_mode) { - if (vc->gfx.fbo_id) { - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, 0, 0); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); - glDeleteFramebuffers(1, &vc->gfx.fbo_id); - vc->gfx.fbo_id =3D 0; - } + egl_fb_destroy(&vc->gfx.guest_fb); if (vc->gfx.surface) { surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds); surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds); @@ -176,7 +169,6 @@ void gd_egl_scanout_disable(DisplayChangeListener *dcl) =20 vc->gfx.w =3D 0; vc->gfx.h =3D 0; - vc->gfx.tex_id =3D 0; gtk_egl_set_scanout_mode(vc, false); } =20 @@ -192,20 +184,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dc= l, vc->gfx.y =3D y; vc->gfx.w =3D w; vc->gfx.h =3D h; - vc->gfx.tex_id =3D backing_id; vc->gfx.y0_top =3D backing_y_0_top; =20 eglMakeCurrent(qemu_egl_display, vc->gfx.esurface, vc->gfx.esurface, vc->gfx.ectx); =20 gtk_egl_set_scanout_mode(vc, true); - if (!vc->gfx.fbo_id) { - glGenFramebuffers(1, &vc->gfx.fbo_id); - } - - glBindFramebuffer(GL_FRAMEBUFFER_EXT, vc->gfx.fbo_id); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, vc->gfx.tex_id, 0); + egl_fb_create_for_tex(&vc->gfx.guest_fb, backing_width, backing_height, + backing_id); } =20 void gd_egl_scanout_flush(DisplayChangeListener *dcl, @@ -213,30 +199,22 @@ void gd_egl_scanout_flush(DisplayChangeListener *dcl, { VirtualConsole *vc =3D container_of(dcl, VirtualConsole, gfx.dcl); GdkWindow *window; - int ww, wh, y1, y2; + int ww, wh; =20 if (!vc->gfx.scanout_mode) { return; } - if (!vc->gfx.fbo_id) { + if (!vc->gfx.guest_fb.framebuffer) { return; } =20 eglMakeCurrent(qemu_egl_display, vc->gfx.esurface, vc->gfx.esurface, vc->gfx.ectx); =20 - glBindFramebuffer(GL_READ_FRAMEBUFFER, vc->gfx.fbo_id); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - window =3D gtk_widget_get_window(vc->gfx.drawing_area); gdk_drawable_get_size(window, &ww, &wh); - glViewport(0, 0, ww, wh); - y1 =3D vc->gfx.y0_top ? 0 : vc->gfx.h; - y2 =3D vc->gfx.y0_top ? vc->gfx.h : 0; - glBlitFramebuffer(0, y1, vc->gfx.w, y2, - 0, 0, ww, wh, - GL_COLOR_BUFFER_BIT, GL_NEAREST); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, vc->gfx.fbo_id); + egl_fb_setup_default(&vc->gfx.win_fb, ww, wh); + egl_fb_blit(&vc->gfx.win_fb, &vc->gfx.guest_fb, !vc->gfx.y0_top); =20 eglSwapBuffers(qemu_egl_display, vc->gfx.esurface); } diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index b05c665cbb..18b298fc21 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -26,14 +26,7 @@ static void gtk_gl_area_set_scanout_mode(VirtualConsole = *vc, bool scanout) =20 vc->gfx.scanout_mode =3D scanout; if (!vc->gfx.scanout_mode) { - if (vc->gfx.fbo_id) { - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, 0, 0); - glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); - glDeleteFramebuffers(1, &vc->gfx.fbo_id); - vc->gfx.fbo_id =3D 0; - } + egl_fb_destroy(&vc->gfx.guest_fb); if (vc->gfx.surface) { surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds); surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds); @@ -56,11 +49,11 @@ void gd_gl_area_draw(VirtualConsole *vc) wh =3D gtk_widget_get_allocated_height(vc->gfx.drawing_area); =20 if (vc->gfx.scanout_mode) { - if (!vc->gfx.fbo_id) { + if (!vc->gfx.guest_fb.framebuffer) { return; } =20 - glBindFramebuffer(GL_READ_FRAMEBUFFER, vc->gfx.fbo_id); + glBindFramebuffer(GL_READ_FRAMEBUFFER, vc->gfx.guest_fb.framebuffe= r); /* GtkGLArea sets GL_DRAW_FRAMEBUFFER for us */ =20 glViewport(0, 0, ww, wh); @@ -181,24 +174,19 @@ void gd_gl_area_scanout_texture(DisplayChangeListener= *dcl, vc->gfx.y =3D y; vc->gfx.w =3D w; vc->gfx.h =3D h; - vc->gfx.tex_id =3D backing_id; vc->gfx.y0_top =3D backing_y_0_top; =20 gtk_gl_area_make_current(GTK_GL_AREA(vc->gfx.drawing_area)); =20 - if (vc->gfx.tex_id =3D=3D 0 || vc->gfx.w =3D=3D 0 || vc->gfx.h =3D=3D = 0) { + if (vc->gfx.guest_fb.framebuffer =3D=3D 0 || + vc->gfx.w =3D=3D 0 || vc->gfx.h =3D=3D 0) { gtk_gl_area_set_scanout_mode(vc, false); return; } =20 gtk_gl_area_set_scanout_mode(vc, true); - if (!vc->gfx.fbo_id) { - glGenFramebuffers(1, &vc->gfx.fbo_id); - } - - glBindFramebuffer(GL_FRAMEBUFFER_EXT, vc->gfx.fbo_id); - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, - GL_TEXTURE_2D, vc->gfx.tex_id, 0); + egl_fb_create_for_tex(&vc->gfx.guest_fb, backing_width, backing_height, + backing_id); } =20 void gd_gl_area_scanout_flush(DisplayChangeListener *dcl, --=20 2.9.3 From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498051791583707.0929590147265; Wed, 21 Jun 2017 06:29:51 -0700 (PDT) Received: from localhost ([::1]:53985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfhd-0002wG-CF for importer@patchew.org; Wed, 21 Jun 2017 09:29:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbg-0005MU-2N for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbe-0003Z8-Qt for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41978) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbe-0003Yl-KV for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B76A7104D5 for ; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 652326F961; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 45A5341AB2; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B76A7104D5 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B76A7104D5 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:39 +0200 Message-Id: <20170621132340.27686-6-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/6] console: remove do_safe_dpy_refresh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Drop the temporary workaround for the broken display updates. All display adapters are updated, so this should be safe without causing regressions. Signed-off-by: Gerd Hoffmann Acked-by: Alex Benn=C3=A9e Message-id: 20170614084538.32480-1-kraxel@redhat.com --- ui/console.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/ui/console.c b/ui/console.c index d914cced53..af0c56c600 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1579,36 +1579,13 @@ bool dpy_gfx_check_format(QemuConsole *con, return true; } =20 -/* - * Safe DPY refresh for TCG guests. We use the exclusive mechanism to - * ensure the TCG vCPUs are quiescent so we can avoid races between - * dirty page tracking for direct frame-buffer access by the guest. - * - * This is a temporary stopgap until we've fixed the dirty tracking - * races in display adapters. - */ -static void do_safe_dpy_refresh(DisplayChangeListener *dcl) -{ - qemu_mutex_unlock_iothread(); - start_exclusive(); - qemu_mutex_lock_iothread(); - dcl->ops->dpy_refresh(dcl); - qemu_mutex_unlock_iothread(); - end_exclusive(); - qemu_mutex_lock_iothread(); -} - static void dpy_refresh(DisplayState *s) { DisplayChangeListener *dcl; =20 QLIST_FOREACH(dcl, &s->listeners, next) { if (dcl->ops->dpy_refresh) { - if (tcg_enabled()) { - do_safe_dpy_refresh(dcl); - } else { - dcl->ops->dpy_refresh(dcl); - } + dcl->ops->dpy_refresh(dcl); } } } --=20 2.9.3 From nobody Mon Apr 29 20:04:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498051666602347.5456261047027; Wed, 21 Jun 2017 06:27:46 -0700 (PDT) Received: from localhost ([::1]:53976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNffc-0000CM-83 for importer@patchew.org; Wed, 21 Jun 2017 09:27:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNfbf-0005MP-Ux for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNfbe-0003ZG-R8 for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59449) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNfbe-0003Ym-LL for qemu-devel@nongnu.org; Wed, 21 Jun 2017 09:23:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B84D68EB41 for ; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-226.ams2.redhat.com [10.36.117.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 367D66A2C7; Wed, 21 Jun 2017 13:23:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4D8A641AB3; Wed, 21 Jun 2017 15:23:40 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B84D68EB41 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B84D68EB41 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 21 Jun 2017 15:23:40 +0200 Message-Id: <20170621132340.27686-7-kraxel@redhat.com> In-Reply-To: <20170621132340.27686-1-kraxel@redhat.com> References: <20170621132340.27686-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 21 Jun 2017 13:23:37 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/6] ui: Remove inclusion of "hw/qdev.h" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Looks like #include "hw/qdev.h" is not needed here, so remove it. Signed-off-by: Thomas Huth Message-id: 1497894617-12143-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann --- ui/input.c | 1 - ui/vnc.c | 1 - 2 files changed, 2 deletions(-) diff --git a/ui/input.c b/ui/input.c index 290ca9f54d..2abd46de93 100644 --- a/ui/input.c +++ b/ui/input.c @@ -1,5 +1,4 @@ #include "qemu/osdep.h" -#include "hw/qdev.h" #include "sysemu/sysemu.h" #include "qapi-types.h" #include "qemu/error-report.h" diff --git a/ui/vnc.c b/ui/vnc.c index 47b49c7318..26136f5d29 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -28,7 +28,6 @@ #include "vnc.h" #include "vnc-jobs.h" #include "trace.h" -#include "hw/qdev.h" #include "sysemu/sysemu.h" #include "qemu/error-report.h" #include "qemu/sockets.h" --=20 2.9.3