[PATCH 2/2] drm/nouveau: Don't signal when killing the fence context
Christian König
christian.koenig at amd.com
Thu May 22 15:01:28 UTC 2025
On 5/22/25 15:50, Danilo Krummrich wrote:
> On Thu, May 22, 2025 at 03:05:02PM +0200, Christian König wrote:
>> E.g. when you don't know the implementation side use the defined API and don't mess with the internals. If you do know the implementation side then it's valid that you check the internals.
>
> I assume you meant this as "bothering with the internals of you *own* fence is
> fine, but not with foreign ones".
Yes, exactly that.
> And if the driver messes with the internals of its own fence code that's fine,
> but in this case we talk about the generic dma_fence implementation, i.e. an
> internal flag of the dma_fence implementation.
Well the flag is under the control of the fence implementation.
> In general, a driver should *never* bother with implementation details of a
> generic component, regardless whether the author knows the internal details.
> Things are *always* prone to change and then this may result into subtle bugs.
Yeah, I know what you mean. The implementation kind of sub-classes the dma_fence component to use it to implement it's specific function.
In C++ we would distinct the function between into private: protected: and public: sections, but we don't have that luxury here.
But you already convinced me with the argument that this needs to be better documented, I'm just not sure if adding the function documentation would do it.
Regards,
Christian.
More information about the dri-devel
mailing list