[PATCH nv] make MAXSCREENS run-time configurable

Tiago Vignatti tiago.vignatti at nokia.com
Thu Apr 8 08:06:39 PDT 2010


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 src/nv_dga.c   |    4 +++-
 src/riva_dga.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/nv_dga.c b/src/nv_dga.c
index ccbbf4d..e892d8a 100644
--- a/src/nv_dga.c
+++ b/src/nv_dga.c
@@ -181,11 +181,13 @@ NV_SetMode(
    ScrnInfoPtr pScrn,
    DGAModePtr pMode
 ){
-   static NVFBLayout SavedLayouts[MAXSCREENS];
+   static NVFBLayout *SavedLayouts;
    int index = pScrn->pScreen->myNum;
 
    NVPtr pNv = NVPTR(pScrn);
 
+   MAXSCREENSALLOC_FATAL(SavedLayouts);
+
    if(!pMode) { /* restore the original mode */
       if(pNv->DGAactive)
         memcpy(&pNv->CurrentLayout, &SavedLayouts[index], sizeof(NVFBLayout));
diff --git a/src/riva_dga.c b/src/riva_dga.c
index c6f2d92..32dd354 100644
--- a/src/riva_dga.c
+++ b/src/riva_dga.c
@@ -174,11 +174,13 @@ Riva_SetMode(
    ScrnInfoPtr pScrn,
    DGAModePtr pMode
 ){
-   static RivaFBLayout SavedLayouts[MAXSCREENS];
+   static RivaFBLayout *SavedLayouts;
    int index = pScrn->pScreen->myNum;
 
    RivaPtr pRiva = RivaPTR(pScrn);
 
+   MAXSCREENSALLOC_FATAL(SavedLayouts);
+
    if(!pMode) { /* restore the original mode */
       if(pRiva->DGAactive)
         memcpy(&pRiva->CurrentLayout, &SavedLayouts[index], sizeof(RivaFBLayout));
-- 
1.6.0.4



More information about the xorg-devel mailing list