Mesa (master): dri-r600: Hook up a drm_descriptor configuration function
Mathias Fröhlich
frohlich at kemper.freedesktop.org
Sun Oct 23 07:09:08 UTC 2011
Module: Mesa
Branch: master
Commit: b27a67af892ef6fcb3bd00ac7be2966f834b9a8b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b27a67af892ef6fcb3bd00ac7be2966f834b9a8b
Author: Mathias Fröhlich <Mathias.Froehlich at gmx.net>
Date: Fri Oct 14 16:25:21 2011 +0200
dri-r600: Hook up a drm_descriptor configuration function
Returns a configuration that makes the dri state-tracker-manager
throttle.
---
src/gallium/targets/dri-r600/target.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/gallium/targets/dri-r600/target.c b/src/gallium/targets/dri-r600/target.c
index 3b7795b..9bff6f2 100644
--- a/src/gallium/targets/dri-r600/target.c
+++ b/src/gallium/targets/dri-r600/target.c
@@ -21,4 +21,20 @@ static struct pipe_screen *create_screen(int fd)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
+static const struct drm_conf_ret throttle_ret = {
+ .type = DRM_CONF_INT,
+ .val.val_int = 2,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+ switch (conf) {
+ case DRM_CONF_THROTTLE:
+ return &throttle_ret;
+ default:
+ break;
+ }
+ return NULL;
+}
+
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, drm_configuration)
More information about the mesa-commit
mailing list