diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-20 15:07:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-20 15:13:33 +0000 |
commit | 3e28a0c0b43823d3104fe8fc50b5994b41fc0cc1 (patch) | |
tree | 28917b9615e07bfe876bc7809832ad63ed23ceb1 | |
parent | 4c4ad555564a80311df1a4b762eb1e119c6d95fb (diff) |
Create the UXA generational resources during screen create
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel.h | 2 | ||||
-rw-r--r-- | src/intel_driver.c | 6 | ||||
-rw-r--r-- | src/intel_uxa.c | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/intel.h b/src/intel.h index e7c47dbf..4c755fc9 100644 --- a/src/intel.h +++ b/src/intel.h @@ -661,7 +661,7 @@ static inline Bool pixmap_is_scanout(PixmapPtr pixmap) const OptionInfoRec *intel_uxa_available_options(int chipid, int busid); Bool intel_uxa_init(ScreenPtr pScreen); -void intel_uxa_create_screen_resources(ScreenPtr pScreen); +Bool intel_uxa_create_screen_resources(ScreenPtr pScreen); void intel_uxa_block_handler(intel_screen_private *intel); Bool intel_get_aperture_space(ScrnInfoPtr scrn, drm_intel_bo ** bo_table, int num_bos); diff --git a/src/intel_driver.c b/src/intel_driver.c index 2cd5f1fa..ebed2582 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -234,9 +234,7 @@ static Bool i830CreateScreenResources(ScreenPtr screen) if (!(*screen->CreateScreenResources) (screen)) return FALSE; - intel_uxa_create_screen_resources(screen); - - return TRUE; + return intel_uxa_create_screen_resources(screen); } static void PreInitCleanup(ScrnInfoPtr scrn) @@ -1046,7 +1044,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv) I830UeventInit(scrn); #endif - return uxa_resources_init(screen); + return TRUE; } static void i830AdjustFrame(int scrnIndex, int x, int y, int flags) diff --git a/src/intel_uxa.c b/src/intel_uxa.c index 8f58c29d..9341b914 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -1089,12 +1089,15 @@ static Bool intel_uxa_destroy_pixmap(PixmapPtr pixmap) return TRUE; } -void intel_uxa_create_screen_resources(ScreenPtr screen) +Bool intel_uxa_create_screen_resources(ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; intel_screen_private *intel = intel_get_screen_private(scrn); dri_bo *bo = intel->front_buffer; + if (!uxa_resources_init(screen)) + return FALSE; + drm_intel_gem_bo_map_gtt(bo); if (intel->use_shadow) { @@ -1111,6 +1114,8 @@ void intel_uxa_create_screen_resources(ScreenPtr screen) NULL); scrn->displayWidth = intel->front_pitch / intel->cpp; } + + return TRUE; } static void |