Bug 3876 - Make MAXSCREENS run-time configurable
Summary: Make MAXSCREENS run-time configurable
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: All All
: high enhancement
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2005-07-26 13:49 UTC by Kevin E. Martin
Modified: 2018-12-17 17:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

Original MAXSCREENS patch (102.29 KB, patch)
2006-05-22 01:18 UTC, Kevin E. Martin
no flags Details | Splinter Review

Description Kevin E. Martin 2005-07-26 13:49:00 UTC
The goals of the patch are as follows:
    1) Allow MAXSCREENS to be determined at run time instead of compile
       time (a new -maxscreens command line flag was added).
    2) Make minimal source-code changes to the tree:
       a) The name "MAXSCREENS" was not changed -- this allowed all of
          the loops that reference MAXSCREENS to remain unchanged.
       b) MAXSCREENSALLOC is a convenience macro that allocates and
          zeros memory, allowing 1-line changes to allocate code (and
          another line to check that allocation succeeded).  Memory is
          zero'd because many routines assume that the previous static
          allocations are zero'd.  The macro is also safe to call
          multiple times since there are places in the code where the
          first use of a MAXSCREENS-sized array is difficult to
          determine (or non-deterministic).
       c) In some cases, the existing code zeros the memory.  These
          calls are unchanged, but could be removed.
Some of the changes could not be tested because we do not have the
appropriate hardware available -- it would be possible to substitute
MAXSCREENSDEFAULT for MAXSCREENS in these code paths (i.e., and leave
them as compile-time configurable code paths):
    programs/Xserver/hw/xfree86/drivers/* [all the changes are similar]
Comment 1 Kevin E. Martin 2005-07-26 13:51:47 UTC
Created attachment 3147 [details]
My C++ test application to demonstrate the bug

Note that this is the original patch that we created against XFree86.  It
applied to X.Org X11R6.7 at the time, so it will need to be updated when we
decide to include it in the release.
Comment 2 Kevin E. Martin 2005-07-26 13:57:56 UTC
Also note that this patch will break the internal server ABIs.
Comment 3 Daniel Stone 2006-05-21 23:02:42 UTC
patch lost in bugzilla disk death, please reattach
Comment 4 Kevin E. Martin 2006-05-22 01:18:21 UTC
Created attachment 5708 [details] [review]
Original MAXSCREENS patch

This is the original patch.  It will need work to make it apply to the modular
tree and to make sure there are no new references to MAXSCREENS.  Note Rik
Faith is the primary author of this patch.
Comment 5 Daniel Stone 2007-02-27 01:27:27 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 6 chemtech 2013-03-15 14:36:21 UTC
Kevin E. Martin 
Do you still experience this issue with newer soft ?
Please check the status of your issue.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.