mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
dri-vmwgfx: Hook up a drm_descriptor configuration function
Returns a configuration that makes the dri state-tracker-manager throttle. Also disable kernel-based throttling. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
This commit is contained in:
parent
bde2fc5a71
commit
83d57635bc
1 changed files with 18 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ create_screen(int fd)
|
|||
if (!screen)
|
||||
return NULL;
|
||||
|
||||
vmw_winsys_screen_set_throttling(screen, 10);
|
||||
vmw_winsys_screen_set_throttling(screen, 0);
|
||||
screen = sw_screen_wrap(screen);
|
||||
|
||||
screen = debug_screen_wrap(screen);
|
||||
|
|
@ -27,4 +27,20 @@ create_screen(int fd)
|
|||
return screen;
|
||||
}
|
||||
|
||||
DRM_DRIVER_DESCRIPTOR("vmwgfx", "vmwgfx", 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("vmwgfx", "vmwgfx", create_screen, drm_configuration)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue