qxl: fix broken n_modes
PATCH 1/1 qxl: fix broken n_modes
Signed-off-by Alon Levy <[email protected]>
---
Hi Gerd,
Unfortunately I didn't test my previous patch "qxl: add vgamem_size_mb and vgamem_size" with the current drivers. This patch is not merged since I didn't know if it will reach before/after anothony pull. If before, then please merge it into the bad patch.
Thanks in advance,
Alon
hw/qxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/qxl.c +1 -1
@@ -322,7 +322,7 @@ static void init_qxl_rom(PCIQXLDevice *d) rom->slots_end =NUM_MEMSLOTS -1 ; rom->n_surfaces =cpu_to_le32 (NUM_SURFACES ); -for (i =0 ; i < modes->n_modes; i++) { +for (i =0 ; i <ARRAY_SIZE (qxl_modes); i++) { fb = qxl_modes[i].y_res * qxl_modes[i].stride;if (fb <= d->vgamem_size) { n_modes++;
Signature · 1 line
1.7.10.1