diff options
author | Rob Clark <robdclark@chromium.org> | 2022-08-07 20:28:48 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-08-28 18:32:11 +0300 |
commit | 6d29709de8028cfd5a827d02f93a5076ba632563 (patch) | |
tree | 494bf22109a6d951de0593f0d79162e43a3060e7 /drivers/gpu/drm/msm/msm_debugfs.c | |
parent | d95c196ddb6ccd2445760b003e6e8a43cd5e84ba (diff) | |
download | linux-6d29709de8028cfd5a827d02f93a5076ba632563.tar.xz |
drm/msm: Add fault-injection support
Intended as a way to trigger error paths in mesa.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/496710/
Link: https://lore.kernel.org/r/20220807172848.2432845-1-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_debugfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c index 7d2dab260f86..95f4374ae21c 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.c +++ b/drivers/gpu/drm/msm/msm_debugfs.c @@ -7,6 +7,7 @@ #ifdef CONFIG_DEBUG_FS #include <linux/debugfs.h> +#include <linux/fault-inject.h> #include <drm/drm_debugfs.h> #include <drm/drm_file.h> @@ -326,6 +327,13 @@ void msm_debugfs_init(struct drm_minor *minor) if (priv->kms && priv->kms->funcs->debugfs_init) priv->kms->funcs->debugfs_init(priv->kms, minor); + +#ifdef CONFIG_FAULT_INJECTION + fault_create_debugfs_attr("fail_gem_alloc", minor->debugfs_root, + &fail_gem_alloc); + fault_create_debugfs_attr("fail_gem_iova", minor->debugfs_root, + &fail_gem_iova); +#endif } #endif |