freedreno: Support the disable_throttling=true driconf option

At this point, mostly just to make it easier to disable throttling for
performance debugging.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
This commit is contained in:
Rob Clark
2023-03-29 14:33:57 -07:00
committed by Marge Bot
parent 77a5778836
commit d698bf0523
4 changed files with 17 additions and 0 deletions
@@ -3,3 +3,7 @@
DRI_CONF_SECTION_MISCELLANEOUS
DRI_CONF_DISABLE_CONSERVATIVE_LRZ(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
DRI_CONF_DISABLE_THROTTLING(false)
DRI_CONF_SECTION_END
@@ -573,6 +573,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return is_a6xx(screen);
case PIPE_CAP_TWO_SIDED_COLOR:
return 0;
case PIPE_CAP_THROTTLE:
return screen->driconf.enable_throttling;
default:
return u_pipe_screen_get_param_defaults(pscreen, param);
}
@@ -1110,6 +1112,8 @@ fd_screen_create(int fd,
screen->driconf.conservative_lrz =
!driQueryOptionb(config->options, "disable_conservative_lrz");
screen->driconf.enable_throttling =
!driQueryOptionb(config->options, "disable_throttling");
struct sysinfo si;
sysinfo(&si);
@@ -92,6 +92,10 @@ struct fd_screen {
* suffer a performance loss with conservative LRZ.
*/
bool conservative_lrz;
/* Enable EGL throttling (default true).
*/
bool enable_throttling;
} driconf;
const struct fd_dev_info *info;
@@ -20,3 +20,8 @@ DRI_CONF_SECTION_MISCELLANEOUS
*/
DRI_CONF_DISABLE_CONSERVATIVE_LRZ(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
/* Also needed for native-context drivers (freedreno) */
DRI_CONF_DISABLE_THROTTLING(false)
DRI_CONF_SECTION_END