Skip to contentSkip to conversation

qxl: fix broken n_modes

PATCH New Alon Levy 1 participant 1 message Jun 14, 2012

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

PATCH 1/1 qxl: fix broken n_modes

---
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
index 4c68769..458b9fc 100644
@@ -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