summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain G. Ainsworth <oga@openbsd.org>2011-03-16 20:12:08 +0000
committerOwain G. Ainsworth <oga@openbsd.org>2011-03-16 20:12:08 +0000
commit7bde993726d13bdcba6a9ee473bafb3460a45de4 (patch)
tree0a5860a2afd78226a610369b3ab09da35b0a62be
parent3468b65fc438fed6041b998227ff2586ff34acd4 (diff)
Create the UXA generational resources during screen create
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 3e28a0c0b43823d3104fe8fc50b5994b41fc0cc1) Conflicts: src/intel_driver.c
-rw-r--r--src/intel.h2
-rw-r--r--src/intel_driver.c6
-rw-r--r--src/intel_uxa.c7
3 files changed, 9 insertions, 6 deletions
diff --git a/src/intel.h b/src/intel.h
index 4dbb9101..0304ef49 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -1114,7 +1114,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 f90607f2..d68a5808 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -544,9 +544,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 int i830_output_clones (ScrnInfoPtr scrn, int type_mask)
@@ -2421,7 +2419,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
intel->starting = FALSE;
intel->suspended = FALSE;
- 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 2befd011..68037c99 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -1071,12 +1071,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) {
@@ -1093,6 +1096,8 @@ void intel_uxa_create_screen_resources(ScreenPtr screen)
NULL);
scrn->displayWidth = intel->front_pitch / intel->cpp;
}
+
+ return TRUE;
}
static void