From: "Christian König" <christian.koenig@amd.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Subject: Re: [PATCH] drm/ttm: Fix build with CONFIG_DEBUG_FS=n
Date: Wed, 4 Jun 2025 10:51:56 +0200 [thread overview]
Message-ID: <0e92b868-58bd-41cd-8ddf-d2aabd137ed2@amd.com> (raw)
In-Reply-To: <20250603184750.3304647-2-lucas.demarchi@intel.com>
On 6/3/25 20:47, Lucas De Marchi wrote:
> Move the define outside the ifdef for CONFIG_DEBUG_FS to fix the build.
> This currently breaks drm kunit tests:
>
> $ ./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/ttm/tests/.kunitconfig
> ERROR:root:../drivers/gpu/drm/ttm/ttm_pool.c: In function ‘ttm_pool_mgr_init’:
> ../drivers/gpu/drm/ttm/ttm_pool.c:1335:30: error: ‘TTM_SHRINKER_BATCH’ undeclared (first use in this function)
> 1335 | mm_shrinker->batch = TTM_SHRINKER_BATCH;
>
> Fixes: 22b929b25293 ("drm/ttm: Increase pool shrinker batch target")
> Cc: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Cc: Christian König <christian.koenig@amd.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
I think moving it to the top of the file would be cleaner, but having it directly above the shrinker code is potentially valid as well.
Either way feel free to add Reviewed-by: Christian König <christian.koenig@amd.com> if it hasn't already been pushed.
Regards,
Christian.
> ---
> drivers/gpu/drm/ttm/ttm_pool.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index e671812789ea7..2dead28a6c1c0 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -1132,6 +1132,9 @@ void ttm_pool_fini(struct ttm_pool *pool)
> }
> EXPORT_SYMBOL(ttm_pool_fini);
>
> +/* Free average pool number of pages. */
> +#define TTM_SHRINKER_BATCH ((1 << (MAX_PAGE_ORDER / 2)) * NR_PAGE_ORDERS)
> +
> static unsigned long ttm_pool_shrinker_scan(struct shrinker *shrink,
> struct shrink_control *sc)
> {
> @@ -1265,9 +1268,6 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m)
> }
> EXPORT_SYMBOL(ttm_pool_debugfs);
>
> -/* Free average pool number of pages. */
> -#define TTM_SHRINKER_BATCH ((1 << (MAX_PAGE_ORDER / 2)) * NR_PAGE_ORDERS)
> -
> /* Test the shrinker functions and dump the result */
> static int ttm_pool_debugfs_shrink_show(struct seq_file *m, void *data)
> {
next prev parent reply other threads:[~2025-06-04 8:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 18:47 [PATCH] drm/ttm: Fix build with CONFIG_DEBUG_FS=n Lucas De Marchi
2025-06-03 18:57 ` ✓ CI.Patch_applied: success for " Patchwork
2025-06-03 18:57 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-03 18:58 ` ✓ CI.KUnit: success " Patchwork
2025-06-03 19:09 ` ✓ CI.Build: " Patchwork
2025-06-03 19:11 ` ✓ CI.Hooks: " Patchwork
2025-06-03 19:13 ` ✓ CI.checksparse: " Patchwork
2025-06-03 19:53 ` ✓ Xe.CI.BAT: " Patchwork
2025-06-04 7:20 ` [PATCH] " Tvrtko Ursulin
2025-06-04 8:51 ` Christian König [this message]
2025-06-04 18:52 ` ✗ Xe.CI.Full: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e92b868-58bd-41cd-8ddf-d2aabd137ed2@amd.com \
--to=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=tvrtko.ursulin@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox