summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/drm
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-05-30 09:55:14 +0200
committerKristian Høgsberg <[email protected]>2011-06-07 10:28:20 -0400
commita433755ec5c48088a0d8a340851a1a8be9e58897 (patch)
treeec07d218e029d03b609ff3d391a32cb07fdffbb2 /src/gallium/state_trackers/egl/drm
parent7f881c43dfb4f1aeeab3a84125b5c106c191a43f (diff)
targets/egl: Support driver name lookup using pci lists
Make use of this in drm and wayland st/egl backends. Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/egl/drm')
-rw-r--r--src/gallium/state_trackers/egl/drm/native_drm.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c
index c89a6d4767e..725fe28e4e2 100644
--- a/src/gallium/state_trackers/egl/drm/native_drm.c
+++ b/src/gallium/state_trackers/egl/drm/native_drm.c
@@ -33,10 +33,6 @@
#include "native_drm.h"
-/* see get_drm_screen_name */
-#include <radeon_drm.h>
-#include "radeon/drm/radeon_drm_public.h"
-
#ifdef HAVE_LIBUDEV
#include <libudev.h>
#endif
@@ -140,27 +136,6 @@ drm_display_destroy(struct native_display *ndpy)
FREE(drmdpy);
}
-static const char *
-get_drm_screen_name(int fd, drmVersionPtr version)
-{
- const char *name = version->name;
-
- if (name && !strcmp(name, "radeon")) {
- int chip_id;
- struct drm_radeon_info info;
-
- memset(&info, 0, sizeof(info));
- info.request = RADEON_INFO_DEVICE_ID;
- info.value = pointer_to_intptr(&chip_id);
- if (drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)) != 0)
- return NULL;
-
- name = is_r3xx(chip_id) ? "r300" : "r600";
- }
-
- return name;
-}
-
/**
* Initialize KMS and pipe screen.
*/
@@ -169,7 +144,6 @@ drm_display_init_screen(struct native_display *ndpy)
{
struct drm_display *drmdpy = drm_display(ndpy);
drmVersionPtr version;
- const char *name;
version = drmGetVersion(drmdpy->fd);
if (!version) {
@@ -177,11 +151,8 @@ drm_display_init_screen(struct native_display *ndpy)
return FALSE;
}
- name = get_drm_screen_name(drmdpy->fd, version);
- if (name) {
- drmdpy->base.screen =
- drmdpy->event_handler->new_drm_screen(&drmdpy->base, name, drmdpy->fd);
- }
+ drmdpy->base.screen =
+ drmdpy->event_handler->new_drm_screen(&drmdpy->base, NULL, drmdpy->fd);
drmFreeVersion(version);
if (!drmdpy->base.screen) {