On 27 February 2017 at 08:14, Suramya Shah <[email protected]> wrote: > Signed-off-by: Suramya Shah <[email protected]> > --- > hw/display/sm501_template.h | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/hw/display/sm501_template.h b/hw/display/sm501_template.h > index f33e499..4e5801e 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
Hi there; thanks for this patch. How did you test it? It doesn't compile for me: In file included from /home/petmay01/linaro/qemu-from-laptop/qemu/hw/display/sm501.c:1177:0: /home/petmay01/linaro/qemu-from-laptop/qemu/hw/display/sm501_template.h:29:2: error: #error unsupport depth #error unsupport depth ^ This is because you've removed the code from this #ifdef but you haven't also removed the code in sm501.c which is currently trying to use it. (You also can expand out the uses of PIXEL_NAME and PIXEL_TYPE used later in sm501_template.h since they are now only ever defined to one thing, but not doing that doesn't cause compilation failure.) (Gerd: can you remind me of the reason why we can assume that depth is always 32 here? IIRC it's because the UI layer always uses 32 bit depth now but I couldn't convince myself of that with a quick look through the ui code...) thanks -- PMM
