"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote: > Jan Klötzke <jan.kloetzke@xxxxxxxxxx> wrote: > > + if (fbBase == 0 || fbBase == > > modeInfo.physical_base) { > > + fbBase = modeInfo.physical_base; > > + uint32 size = modeInfo.bytes_per_row * > > modeInfo.height; > > + if (size > fbSize) > > + fbSize = size; > > + } else { > > + // different frame buffer base -> > > cannot map whole > > frame > > + // buffer in one area for all modes > > + fbBase = 0xFFFFFFFF; > > + } > > Does that really prevent us from mapping the memory? Wouldn't it be > adequate to compute the minima/maxima, and always map the whole chunk? > It shouldn't make much difference in practice, but it would be a bit > cleaner/straightforward to me. Well, I think it will work for 99% of the cards where the frame buffer is always on the same address. If the frame buffer base changes between different modes then we would have to work with offsets (to the mapped base address) in the vesa driver. With the current approach this ends up in remapping the frame buffer for each mode switch. I don't think it's worth it to also optimize this seldom case, especially as mode switches are not too often. OTOH, feel free to amend the patches as you like... ;-) /Jan