[Spice-devel] [PATCH] Establish a preferred default of 1024x768 correctly.
Jeremy White
jwhite at codeweavers.com
Thu Jan 24 05:41:04 PST 2013
>
> Is it possible to break out the #if 0 removals since I don't see any
> relation between them and this patch?
I'm a huge fan of smaller, more surgical patches.
And yeah, I'll shift the first #if 0 removal to another patch.
But I think the larger and more material #if 0 removals are
related to this patch. The #if 0'd code has to do with
maximum resolution and default size, which is the code path
I'm directly affecting. But I do think my injected comment could
be a bit more clear, and I'll try to improve that on the
next round as well.
Cheers,
Jeremy
>> +
>> + /* Note that we replace the 'normal' xf86ValidateModes call,
>> + so this function is obligated to set the same values as
>> + that call normally does. */
>> qxl_initialize_x_modes (qxl, pScrn,&max_x,&max_y);
>>
>> -#if 0
>> - if (pScrn->display->virtualX == 0&& pScrn->display->virtualY == 0)
>> - {
>> - /* It is possible for the largest x + largest y size combined leading
>> - to a virtual size which will not fit into the framebuffer when this
>> - happens we prefer max width and make height as large as possible */
>> - if (max_x * max_y * (pScrn->bitsPerPixel / 8)>
>> - qxl->rom->surface0_area_size)
>> - pScrn->display->virtualY = qxl->rom->surface0_area_size /
>> - (max_x * (pScrn->bitsPerPixel / 8));
>> - else
>> - pScrn->display->virtualY = max_y;
>> -
>> - pScrn->display->virtualX = max_x;
>> - }
>> -
>> - if (0>= xf86ValidateModes (pScrn, pScrn->monitor->Modes,
>> - pScrn->display->modes, clockRanges, linePitches,
>> - 128, max_x, 128 * 4, 128, max_y,
>> - pScrn->display->virtualX,
>> - pScrn->display->virtualY,
>> - 128 * 1024 * 1024, LOOKUP_BEST_REFRESH))
>> - goto out;
>> -#endif
>> -
>> CHECK_POINT ();
>>
>> xf86PruneDriverModes (pScrn);
>>
>> qxl_init_randr (pScrn, qxl);
>> -#if 0
>> - /* If no modes are specified in xorg.conf, default to 1024x768 */
>> - if (pScrn->display->modes == NULL || pScrn->display->modes[0] == NULL)
>> - for (mode = pScrn->modes; mode; mode = mode->next)
>> - if (mode->HDisplay == 1024&& mode->VDisplay == 768)
>> - {
>> - pScrn->currentMode = mode;
>> - break;
>> - }
>> -#endif
>> -
>> - //xf86PrintModes (pScrn);
>> +
>> + qxl->virtual_x = pScrn->display->virtualX;
>> + qxl->virtual_y = pScrn->display->virtualY;
>> +
>> xf86SetDpi (pScrn, 0, 0);
>>
>> if (!xf86LoadSubModule (pScrn, "fb")
>> --
>> 1.7.10.4
>>
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list