qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Arithmetic error in EDID generation fixed

To calculate screen size in centimeters we should calculate:
pixels/dpi*2.54
but not
pixels*dpi/2540

Using wrong formula we actually get 65 DPI and very small fonts.

Signed-off-by: Anton V. Boyarshinov <boyarsh@altlinux.org>
Message-id: 20200226122054.366b9cda@table.localdomain
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

authored by

Anton V. Boyarshinov and committed by
Gerd Hoffmann
cd8fef8d e0175b71

+2 -2
+2 -2
hw/display/edid-generate.c
··· 360 360 edid[20] = 0xa5; 361 361 362 362 /* screen size: undefined */ 363 - edid[21] = info->prefx * info->dpi / 2540; 364 - edid[22] = info->prefy * info->dpi / 2540; 363 + edid[21] = info->prefx * 254 / 100 / info->dpi; 364 + edid[22] = info->prefy * 254 / 100 / info->dpi; 365 365 366 366 /* display gamma: 2.2 */ 367 367 edid[23] = 220 - 100;