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:
@@ -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
|
||||
Reference in New Issue
Block a user