* [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32 @ 2017-03-16 9:20 iwona260909 2017-03-16 9:20 ` iwona260909 0 siblings, 1 reply; 4+ messages in thread From: iwona260909 @ 2017-03-16 9:20 UTC (permalink / raw) Cc: qemu-devel Removing support for DEPTH != 32 - task from BiteSizedTasks/Dead code removal ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32. 2017-03-16 9:20 [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32 iwona260909 @ 2017-03-16 9:20 ` iwona260909 2017-03-16 10:39 ` Peter Maydell 2017-03-16 14:30 ` Paolo Bonzini 0 siblings, 2 replies; 4+ messages in thread From: iwona260909 @ 2017-03-16 9:20 UTC (permalink / raw) Cc: qemu-devel, Iwona Kotlarska From: Iwona Kotlarska <iwona260909@gmail.com> Signed-off-by: Iwona Kotlarska <iwona260909@gmail.com> --- hw/display/sm501.c | 37 ------------------------------------- hw/display/sm501_template.h | 8 +------- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 040a0b93f2..8935ea758a 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1173,23 +1173,6 @@ typedef void draw_line_func(uint8_t *d, const uint8_t *s, typedef void draw_hwc_line_func(SM501State * s, int crt, uint8_t * palette, int c_y, uint8_t *d, int width); -#define DEPTH 8 -#include "sm501_template.h" - -#define DEPTH 15 -#include "sm501_template.h" - -#define BGR_FORMAT -#define DEPTH 15 -#include "sm501_template.h" - -#define DEPTH 16 -#include "sm501_template.h" - -#define BGR_FORMAT -#define DEPTH 16 -#include "sm501_template.h" - #define DEPTH 32 #include "sm501_template.h" @@ -1198,43 +1181,23 @@ typedef void draw_hwc_line_func(SM501State * s, int crt, uint8_t * palette, #include "sm501_template.h" static draw_line_func * draw_line8_funcs[] = { - draw_line8_8, - draw_line8_15, - draw_line8_16, draw_line8_32, draw_line8_32bgr, - draw_line8_15bgr, - draw_line8_16bgr, }; static draw_line_func * draw_line16_funcs[] = { - draw_line16_8, - draw_line16_15, - draw_line16_16, draw_line16_32, draw_line16_32bgr, - draw_line16_15bgr, - draw_line16_16bgr, }; static draw_line_func * draw_line32_funcs[] = { - draw_line32_8, - draw_line32_15, - draw_line32_16, draw_line32_32, draw_line32_32bgr, - draw_line32_15bgr, - draw_line32_16bgr, }; static draw_hwc_line_func * draw_hwc_line_funcs[] = { - draw_hwc_line_8, - draw_hwc_line_15, - draw_hwc_line_16, draw_hwc_line_32, draw_hwc_line_32bgr, - draw_hwc_line_15bgr, - draw_hwc_line_16bgr, }; static inline int get_depth_index(DisplaySurface *surface) diff --git a/hw/display/sm501_template.h b/hw/display/sm501_template.h index f33e499be4..4e5801ec3e 100644 --- a/hw/display/sm501_template.h +++ b/hw/display/sm501_template.h @@ -22,13 +22,7 @@ * THE SOFTWARE. */ -#if DEPTH == 8 -#define BPP 1 -#define PIXEL_TYPE uint8_t -#elif DEPTH == 15 || DEPTH == 16 -#define BPP 2 -#define PIXEL_TYPE uint16_t -#elif DEPTH == 32 +#if DEPTH == 32 #define BPP 4 #define PIXEL_TYPE uint32_t #else -- 2.12.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32. 2017-03-16 9:20 ` iwona260909 @ 2017-03-16 10:39 ` Peter Maydell 2017-03-16 14:30 ` Paolo Bonzini 1 sibling, 0 replies; 4+ messages in thread From: Peter Maydell @ 2017-03-16 10:39 UTC (permalink / raw) To: iwona260909; +Cc: QEMU Developers On 16 March 2017 at 09:20, <iwona260909@gmail.com> wrote: > From: Iwona Kotlarska <iwona260909@gmail.com> > > Signed-off-by: Iwona Kotlarska <iwona260909@gmail.com> > --- > hw/display/sm501.c | 37 ------------------------------------- > hw/display/sm501_template.h | 8 +------- > 2 files changed, 1 insertion(+), 44 deletions(-) Hi; thanks for this patch. Unfortunately Gerd already sent a patchset a couple of weeks ago to do this for this device: http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg01172.html thanks -- PMM ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32. 2017-03-16 9:20 ` iwona260909 2017-03-16 10:39 ` Peter Maydell @ 2017-03-16 14:30 ` Paolo Bonzini 1 sibling, 0 replies; 4+ messages in thread From: Paolo Bonzini @ 2017-03-16 14:30 UTC (permalink / raw) To: iwona260909; +Cc: qemu-devel On 16/03/2017 10:20, iwona260909@gmail.com wrote: > static draw_line_func * draw_line8_funcs[] = { > - draw_line8_8, > - draw_line8_15, > - draw_line8_16, > draw_line8_32, > draw_line8_32bgr, > - draw_line8_15bgr, > - draw_line8_16bgr, > }; > > static draw_line_func * draw_line16_funcs[] = { > - draw_line16_8, > - draw_line16_15, > - draw_line16_16, > draw_line16_32, > draw_line16_32bgr, > - draw_line16_15bgr, > - draw_line16_16bgr, > }; > > static draw_line_func * draw_line32_funcs[] = { > - draw_line32_8, > - draw_line32_15, > - draw_line32_16, > draw_line32_32, > draw_line32_32bgr, > - draw_line32_15bgr, > - draw_line32_16bgr, > }; > > static draw_hwc_line_func * draw_hwc_line_funcs[] = { > - draw_hwc_line_8, > - draw_hwc_line_15, > - draw_hwc_line_16, > draw_hwc_line_32, > draw_hwc_line_32bgr, > - draw_hwc_line_15bgr, > - draw_hwc_line_16bgr, > }; > > static inline int get_depth_index(DisplaySurface *surface) In fact, as in your cirrus-vga patch, here you adjusted the arrays but not its users. This would never work, because get_depth_index will return 3. The value is out of bounds for these 2-element arrays. Paolo ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-16 14:30 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-16 9:20 [Qemu-devel] [PATCH] Dead Code Removal: removing support for DEPTH != 32 iwona260909 2017-03-16 9:20 ` iwona260909 2017-03-16 10:39 ` Peter Maydell 2017-03-16 14:30 ` Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).