[Intel-gfx] [PATCH] Switch suitable directRenderingType checks to have_gem instead
Keith Packard
keithp at keithp.com
Thu Jun 11 23:16:56 CEST 2009
For operations requiring GEM interfaces in the kernel, and which do not
depend on whether the driver offers DRI2 to X applications.
I think I got all of the right tests, but additional eyeballs would be
appreciated here.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
src/i830_accel.c | 2 +-
src/i830_display.c | 2 +-
src/i830_memory.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/i830_accel.c b/src/i830_accel.c
index b365e3f..e9a4439 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -233,7 +233,7 @@ I830AccelInit(ScreenPtr pScreen)
pI830->accel_max_y = 2048;
}
/* Bump the pitch so that we can tile any pixmap we create. */
- if (pI830->directRenderingType >= DRI_DRI2)
+ if (pI830->have_gem)
pI830->accel_pixmap_pitch_alignment = 512;
switch (pI830->accel) {
diff --git a/src/i830_display.c b/src/i830_display.c
index a7eafb9..6cacbe8 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1045,7 +1045,7 @@ static void i830_modeset_ctl(xf86CrtcPtr crtc, int pre)
I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
struct drm_modeset_ctl modeset;
- if (pI830->directRenderingType <= DRI_NONE)
+ if (!pI830->have_gem)
return;
modeset.crtc = intel_crtc->pipe;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 5e07213..b768cf7 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -410,7 +410,7 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size)
* 5.4 or newer so we can rely on the lock being held after DRIScreenInit,
* rather than after DRIFinishScreenInit.
*/
- if (pI830->directRenderingType == DRI_DRI2) {
+ if (pI830->have_gem) {
int mmsize;
/* Take over all of the graphics aperture minus enough to for
--
1.6.3.1
More information about the Intel-gfx
mailing list