[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/49] hw/display/tc6393xb: Remove dead code for handling non-32bp
From: |
Peter Maydell |
Subject: |
[PULL 17/49] hw/display/tc6393xb: Remove dead code for handling non-32bpp surfaces |
Date: |
Fri, 5 Mar 2021 17:14:43 +0000 |
For a long time now the UI layer has guaranteed that the console
surface is always 32 bits per pixel RGB. Remove the legacy dead
code from the tc6393xb display device which was handling the
possibility that the console surface was some other format.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210215103215.4944-3-peter.maydell@linaro.org
---
include/ui/console.h | 10 ----------
hw/display/tc6393xb.c | 33 +--------------------------------
2 files changed, 1 insertion(+), 42 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index c960b7066cc..810ce7988c0 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -267,16 +267,6 @@ PixelFormat qemu_default_pixelformat(int bpp);
DisplaySurface *qemu_create_displaysurface(int width, int height);
void qemu_free_displaysurface(DisplaySurface *surface);
-static inline int is_surface_bgr(DisplaySurface *surface)
-{
- if (PIXMAN_FORMAT_BPP(surface->format) == 32 &&
- PIXMAN_FORMAT_TYPE(surface->format) == PIXMAN_TYPE_ABGR) {
- return 1;
- } else {
- return 0;
- }
-}
-
static inline int is_buffer_shared(DisplaySurface *surface)
{
return !(surface->flags & QEMU_ALLOCATED_FLAG);
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c
index 49a676d1b0e..4cddb1a99ad 100644
--- a/hw/display/tc6393xb.c
+++ b/hw/display/tc6393xb.c
@@ -410,43 +410,12 @@ static void tc6393xb_nand_writeb(TC6393xbState *s, hwaddr
addr, uint32_t value)
(uint32_t) addr, value & 0xff);
}
-#define BITS 8
-#include "tc6393xb_template.h"
-#define BITS 15
-#include "tc6393xb_template.h"
-#define BITS 16
-#include "tc6393xb_template.h"
-#define BITS 24
-#include "tc6393xb_template.h"
#define BITS 32
#include "tc6393xb_template.h"
static void tc6393xb_draw_graphic(TC6393xbState *s, int full_update)
{
- DisplaySurface *surface = qemu_console_surface(s->con);
-
- switch (surface_bits_per_pixel(surface)) {
- case 8:
- tc6393xb_draw_graphic8(s);
- break;
- case 15:
- tc6393xb_draw_graphic15(s);
- break;
- case 16:
- tc6393xb_draw_graphic16(s);
- break;
- case 24:
- tc6393xb_draw_graphic24(s);
- break;
- case 32:
- tc6393xb_draw_graphic32(s);
- break;
- default:
- printf("tc6393xb: unknown depth %d\n",
- surface_bits_per_pixel(surface));
- return;
- }
-
+ tc6393xb_draw_graphic32(s);
dpy_gfx_update_full(s->con);
}
--
2.20.1
- [PULL 02/49] sbsa-ref: add 'max' to list of allowed cpus, (continued)
- [PULL 02/49] sbsa-ref: add 'max' to list of allowed cpus, Peter Maydell, 2021/03/05
- [PULL 03/49] target/arm: Add support for FEAT_SSBS, Speculative Store Bypass Safe, Peter Maydell, 2021/03/05
- [PULL 08/49] tests/qtests: Add npcm7xx emc model test, Peter Maydell, 2021/03/05
- [PULL 12/49] virtio-mmio: improve virtio-mmio get_dev_path alog, Peter Maydell, 2021/03/05
- [PULL 05/49] target/arm: Set ID_PFR2.SSBS to 1 for "max" 32-bit CPU, Peter Maydell, 2021/03/05
- [PULL 07/49] hw/arm: Add npcm7xx emc model, Peter Maydell, 2021/03/05
- [PULL 11/49] hw/i2c/npcm7xx_smbus: Simplify npcm7xx_smbus_init(), Peter Maydell, 2021/03/05
- [PULL 06/49] hw/net: Add npcm7xx emc model, Peter Maydell, 2021/03/05
- [PULL 10/49] target/arm: Speed up aarch64 TBL/TBX, Peter Maydell, 2021/03/05
- [PULL 09/49] hw/arm/xlnx-zynqmp: Remove obsolete 'has_rpu' property, Peter Maydell, 2021/03/05
- [PULL 17/49] hw/display/tc6393xb: Remove dead code for handling non-32bpp surfaces,
Peter Maydell <=
- [PULL 18/49] hw/display/tc6393xb: Expand out macros in template header, Peter Maydell, 2021/03/05
- [PULL 13/49] target/arm: Use TCF0 and TFSRE0 for unprivileged tag checks, Peter Maydell, 2021/03/05
- [PULL 15/49] target/arm/cpu: Update coding style to make checkpatch.pl happy, Peter Maydell, 2021/03/05
- [PULL 14/49] target/arm: Restrict v8M IDAU to TCG, Peter Maydell, 2021/03/05
- [PULL 16/49] hw/arm/musicpal: Remove dead code for non-32-bit-RGB surfaces, Peter Maydell, 2021/03/05
- [PULL 20/49] hw/display/omap_lcdc: Expand out macros in template header, Peter Maydell, 2021/03/05
- [PULL 19/49] hw/display/tc6393xb: Inline tc6393xb_draw_graphic32() at its callsite, Peter Maydell, 2021/03/05
- [PULL 22/49] hw/display/omap_lcdc: Fix coding style issues in template header, Peter Maydell, 2021/03/05
- [PULL 29/49] hw/arm/mps2-tz: Make the OSCCLK settings be configurable per-board, Peter Maydell, 2021/03/05
- [PULL 23/49] hw/display/omap_lcdc: Inline template header into C file, Peter Maydell, 2021/03/05