aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
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/targets
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/targets')
-rw-r--r--src/gallium/targets/d3dadapter9/drm.c10
-rw-r--r--src/gallium/targets/pipe-loader/pipe_i915.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_msm.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_nouveau.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_r300.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_r600.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_radeonsi.c7
-rw-r--r--src/gallium/targets/pipe-loader/pipe_vmwgfx.c7
8 files changed, 3 insertions, 56 deletions
diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c
index 1d01d4a067c..1c8460f7f03 100644
--- a/src/gallium/targets/d3dadapter9/drm.c
+++ b/src/gallium/targets/d3dadapter9/drm.c
@@ -205,7 +205,6 @@ drm_create_adapter( int fd,
struct d3dadapter9drm_context *ctx = CALLOC_STRUCT(d3dadapter9drm_context);
HRESULT hr;
bool different_device;
- const struct drm_conf_ret *throttle_ret = NULL;
const struct drm_conf_ret *dmabuf_ret = NULL;
driOptionCache defaultInitOptions;
driOptionCache userInitOptions;
@@ -237,7 +236,6 @@ drm_create_adapter( int fd,
}
dmabuf_ret = pipe_loader_configuration(ctx->dev, DRM_CONF_SHARE_FD);
- throttle_ret = pipe_loader_configuration(ctx->dev, DRM_CONF_THROTTLE);
if (!dmabuf_ret || !dmabuf_ret->val.val_bool) {
ERR("The driver is not capable of dma-buf sharing."
"Abandon to load nine state tracker\n");
@@ -245,11 +243,9 @@ drm_create_adapter( int fd,
return D3DERR_DRIVERINTERNALERROR;
}
- if (throttle_ret && throttle_ret->val.val_int != -1) {
- ctx->base.throttling = TRUE;
- ctx->base.throttling_value = throttle_ret->val.val_int;
- } else
- ctx->base.throttling = FALSE;
+ ctx->base.throttling_value =
+ ctx->base.hal->get_param(ctx->base.hal, PIPE_CAP_MAX_FRAMES_IN_FLIGHT);
+ ctx->base.throttling = ctx->base.throttling_value > 0;
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsNine);
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine", NULL);
diff --git a/src/gallium/targets/pipe-loader/pipe_i915.c b/src/gallium/targets/pipe-loader/pipe_i915.c
index 8524a1dc58f..841990e0e23 100644
--- a/src/gallium/targets/pipe-loader/pipe_i915.c
+++ b/src/gallium/targets/pipe-loader/pipe_i915.c
@@ -23,11 +23,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return screen;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -36,8 +31,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default:
diff --git a/src/gallium/targets/pipe-loader/pipe_msm.c b/src/gallium/targets/pipe-loader/pipe_msm.c
index 683332579fe..eb38be586ac 100644
--- a/src/gallium/targets/pipe-loader/pipe_msm.c
+++ b/src/gallium/targets/pipe-loader/pipe_msm.c
@@ -17,11 +17,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return screen;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -30,8 +25,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default:
diff --git a/src/gallium/targets/pipe-loader/pipe_nouveau.c b/src/gallium/targets/pipe-loader/pipe_nouveau.c
index d95aeda529b..ead5a182738 100644
--- a/src/gallium/targets/pipe-loader/pipe_nouveau.c
+++ b/src/gallium/targets/pipe-loader/pipe_nouveau.c
@@ -17,11 +17,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return screen;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -30,8 +25,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default:
diff --git a/src/gallium/targets/pipe-loader/pipe_r300.c b/src/gallium/targets/pipe-loader/pipe_r300.c
index 8aa1ba8735c..2a03580223d 100644
--- a/src/gallium/targets/pipe-loader/pipe_r300.c
+++ b/src/gallium/targets/pipe-loader/pipe_r300.c
@@ -13,11 +13,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return sws ? debug_screen_wrap(sws->screen) : NULL;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -26,8 +21,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default:
diff --git a/src/gallium/targets/pipe-loader/pipe_r600.c b/src/gallium/targets/pipe-loader/pipe_r600.c
index a6051aa2258..a35e0a6179f 100644
--- a/src/gallium/targets/pipe-loader/pipe_r600.c
+++ b/src/gallium/targets/pipe-loader/pipe_r600.c
@@ -13,11 +13,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -26,8 +21,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default:
diff --git a/src/gallium/targets/pipe-loader/pipe_radeonsi.c b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
index 2defc521b24..947c9e1990e 100644
--- a/src/gallium/targets/pipe-loader/pipe_radeonsi.c
+++ b/src/gallium/targets/pipe-loader/pipe_radeonsi.c
@@ -20,11 +20,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return rw ? debug_screen_wrap(rw->screen) : NULL;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -39,8 +34,6 @@ static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
};
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
case DRM_CONF_XML_OPTIONS:
diff --git a/src/gallium/targets/pipe-loader/pipe_vmwgfx.c b/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
index 68bf92ce82e..3b8c748594c 100644
--- a/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
+++ b/src/gallium/targets/pipe-loader/pipe_vmwgfx.c
@@ -23,11 +23,6 @@ create_screen(int fd, const struct pipe_screen_config *config)
return screen;
}
-static const struct drm_conf_ret throttle_ret = {
- .type = DRM_CONF_INT,
- .val.val_int = 2,
-};
-
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_bool = true,
@@ -36,8 +31,6 @@ static const struct drm_conf_ret share_fd_ret = {
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
{
switch (conf) {
- case DRM_CONF_THROTTLE:
- return &throttle_ret;
case DRM_CONF_SHARE_FD:
return &share_fd_ret;
default: