Re: [PATCH 4/4] drm/msm: Improved debugfs gem stats
From: Doug Anderson
Date: Wed Mar 31 2021 - 19:34:44 EST
Hi,
On Wed, Mar 31, 2021 at 3:14 PM Rob Clark <robdclark@xxxxxxxxx> wrote:
>
> From: Rob Clark <robdclark@xxxxxxxxxxxx>
>
> The last patch lost the breakdown of active vs inactive GEM objects in
> $debugfs/gem. But we can add some better stats to summarize not just
> active vs inactive, but also purgable/purged to make up for that.
>
> Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/msm_fb.c | 3 ++-
> drivers/gpu/drm/msm/msm_gem.c | 31 ++++++++++++++++++++++++-------
> drivers/gpu/drm/msm/msm_gem.h | 11 ++++++++++-
> 3 files changed, 36 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_fb.c b/drivers/gpu/drm/msm/msm_fb.c
> index d42f0665359a..887172a10c9a 100644
> --- a/drivers/gpu/drm/msm/msm_fb.c
> +++ b/drivers/gpu/drm/msm/msm_fb.c
> @@ -33,6 +33,7 @@ static const struct drm_framebuffer_funcs msm_framebuffer_funcs = {
> #ifdef CONFIG_DEBUG_FS
> void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m)
> {
> + struct msm_gem_stats stats = {{0}};
nit: instead of "{{0}}", can't you just do:
struct msm_gem_stats stats = {};
...both here and for the other usage.
Other than that this seems good to me.
Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>