summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-04-22 17:35:27 -0400
committerMarek Olšák <[email protected]>2019-04-23 21:20:24 -0400
commite3841368f34afe844bab25010b89f497cacc1dad (patch)
tree5dcaf1e355321eff38c1c7727ef02a05bbd03cbf /src/gallium/state_trackers
parenta20800f49d1d665c4d93dcca87face1320423476 (diff)
gallium: replace DRM_CONF_THROTTLE with PIPE_CAP_MAX_FRAMES_IN_FLIGHT
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 7edef415505..2a4a6ac6dad 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1908,7 +1908,6 @@ dri2_init_screen(__DRIscreen * sPriv)
const __DRIconfig **configs;
struct dri_screen *screen;
struct pipe_screen *pscreen = NULL;
- const struct drm_conf_ret *throttle_ret;
const struct drm_conf_ret *dmabuf_ret;
screen = CALLOC_STRUCT(dri_screen);
@@ -1930,11 +1929,10 @@ dri2_init_screen(__DRIscreen * sPriv)
if (!pscreen)
goto release_pipe;
- throttle_ret = pipe_loader_configuration(screen->dev, DRM_CONF_THROTTLE);
- dmabuf_ret = pipe_loader_configuration(screen->dev, DRM_CONF_SHARE_FD);
+ screen->default_throttle_frames =
+ pscreen->get_param(pscreen, PIPE_CAP_MAX_FRAMES_IN_FLIGHT);
- if (throttle_ret && throttle_ret->val.val_int > 0)
- screen->default_throttle_frames = throttle_ret->val.val_int;
+ dmabuf_ret = pipe_loader_configuration(screen->dev, DRM_CONF_SHARE_FD);
if (pscreen->resource_create_with_modifiers)
dri2ImageExtension.createImageWithModifiers =