[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <41cd0579-698c-4e1e-82c4-3d46a1cd5e3e@app.fastmail.com>
Date: Thu, 24 Apr 2025 14:10:16 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Boris Brezillon" <boris.brezillon@...labora.com>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: "Steven Price" <steven.price@....com>,
"Liviu Dudau" <liviu.dudau@....com>,
"Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
"Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>, "Dave Airlie" <airlied@...il.com>,
"Simona Vetter" <simona@...ll.ch>,
Adrián Larumbe <adrian.larumbe@...labora.com>,
"Dmitry Osipenko" <dmitry.osipenko@...labora.com>,
"Florent Tomasin" <florent.tomasin@....com>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/panthor: fix building without CONFIG_DEBUG_FS
On Thu, Apr 24, 2025, at 13:41, Boris Brezillon wrote:
> On Thu, 24 Apr 2025 13:25:47 +0200
>> +#ifdef CONFIG_DEBUG_FS
>> bo->debugfs.flags = usage_flags | PANTHOR_DEBUGFS_GEM_USAGE_FLAG_INITIALIZED;
>> -}
>> -
>> -#else
>> -void panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object *bo, u32 usage_flags) {};
>> #endif
>> +}
>>
>
> Oops. I actually don't see a good reason to expose this function, so
> could we go for something like that instead?
I think moving it into pantor_gem.c makes sense, and it certainly
avoids the build warning.
> #else
> static void panthor_gem_debugfs_bo_add(struct panthor_device *ptdev,
> struct panthor_gem_object *bo)
> {}
> static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo) {}
> +static void panthor_gem_debugfs_set_usage_flags(struct
> panthor_gem_object *bo,
> + u32 usage_flags)
> +{
Side note: I think the panthor_gem_debugfs_bo_{add,rm} stubs could
actually be replaced with an IS_ENABLED() check in the normal
functions, but that wouldn't work for
panthor_gem_debugfs_set_usage_flags or
panthor_gem_debugfs_print_bos().
Arnd
Powered by blists - more mailing lists