diff options
Diffstat (limited to 'src/intel_dri.c')
-rw-r--r-- | src/intel_dri.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index 8f279216..0df99120 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -1523,13 +1523,24 @@ out_complete: static int dri2_server_generation; #endif +static bool has_i830_dri(void) +{ + return access(DRI_DRIVER_PATH "/i830_dri.so", R_OK) == 0; +} + static const char *dri_driver_name(intel_screen_private *intel) { const char *s = xf86GetOptValString(intel->Options, OPTION_DRI); Bool dummy; - if (s == NULL || xf86getBoolValue(&dummy, s)) - return INTEL_INFO(intel)->gen < 040 ? "i915" : "i965"; + if (s == NULL || xf86getBoolValue(&dummy, s)) { + if (INTEL_INFO(intel)->gen < 030) + return has_i830_dri() ? "i830" : "i915"; + else if (INTEL_INFO(intel)->gen < 040) + return "i915"; + else + return "i965"; + } return s; } |