On 24 August 2012 16:24, BALATON Zoltan <bala...@eik.bme.hu> wrote: > The above > bits_per_pixel=16 for 15 bpp case was there already I just added a comment > marking it as suspicious but I'm not sure how to resolve that.
It is certainly a bug somewhere, since ds_get_bits_per_pixel() just returns the pixelformat bits_per_pixel field, and code like hw/pl110.c assumes that that can be 15 and that that implies that the pixel format is as per rgb_to_pixel15() in pixel_ops.h. So one end of that or the other is wrong. I think all this code needs careful auditing to (a) clearly define what "bpp" means and what "depth" means (assuming we need to distinguish; IME they are usually supposed to be synonyms!) and (b) make sure that everything that accesses one or the other is actually using the right one... -- PMM