unsigned stride;
};
+
+
+/**
+ * Configuration queries.
+ */
+enum drm_conf {
+ /* How many frames to allow before throttling. Or -1 to indicate any number */
+ DRM_CONF_THROTTLE, /* DRM_CONF_INT. */
+ DRM_CONF_MAX
+};
+
+/**
+ * Type of configuration answer
+ */
+enum drm_conf_type {
+ DRM_CONF_INT,
+ DRM_CONF_BOOL,
+ DRM_CONF_FLOAT,
+ DRM_CONF_POINTER
+};
+
+/**
+ * Return value from the configuration function.
+ */
+struct drm_conf_ret {
+ enum drm_conf_type type;
+ union {
+ int val_int;
+ bool val_bool;
+ float val_float;
+ void *val_pointer;
+ } val;
+};
+
struct drm_driver_descriptor
{
/**
* For example wrapping trace or rbug debugging drivers around it.
*/
struct pipe_screen* (*create_screen)(int drm_fd);
+
+
+ /**
+ * Return a configuration value.
+ *
+ * If this function is NULL, or if it returns NULL
+ * the state tracker- or state
+ * tracker manager should provide a reasonable default value.
+ */
+ const struct drm_conf_ret *(*configuration) (enum drm_conf conf);
};
extern struct drm_driver_descriptor driver_descriptor;
/**
* Instantiate a drm_driver_descriptor struct.
*/
-#define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func) \
+#define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func, conf) \
struct drm_driver_descriptor driver_descriptor = { \
.name = name_str, \
.driver_name = driver_name_str, \
.create_screen = func, \
+ .configuration = (conf), \
};
#endif
return screen;
}
-DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen)
+DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("i915", "i965", create_screen)
+DRM_DRIVER_DESCRIPTOR("i915", "i965", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen)
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, NULL)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen)
+DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen, NULL)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("i965", "i965", create_screen)
+DRM_DRIVER_DESCRIPTOR("i965", "i965", create_screen, NULL)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen)
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
swrast_create_screen(struct sw_winsys *ws);
PUBLIC
-DRM_DRIVER_DESCRIPTOR("swrast", NULL, NULL)
+DRM_DRIVER_DESCRIPTOR("swrast", NULL, NULL, NULL)
struct pipe_screen *
swrast_create_screen(struct sw_winsys *ws)
}
PUBLIC
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen)
+DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen)
+DRM_DRIVER_DESCRIPTOR("i915", "i915", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("i915", "i965", create_screen)
+DRM_DRIVER_DESCRIPTOR("i915", "i965", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen)
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen)
+DRM_DRIVER_DESCRIPTOR("nouveau", "nouveau", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r300", "radeon", create_screen, NULL)
return screen;
}
-DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen)
+DRM_DRIVER_DESCRIPTOR("r600", "radeon", create_screen, NULL)