History log of /linux-master/drivers/gpu/drm/nouveau/nvif/client.c
Revision Date Author Comments
# 3ce6608b 14-Sep-2023 Justin Stitt <justinstitt@google.com>

drm/nouveau/nvif: refactor deprecated strncpy

`strncpy` is deprecated and as such we should prefer more robust and
less ambiguous string interfaces.

A suitable replacement is `strscpy_pad` due to the fact that it
guarantees NUL-termination on the destination buffer whilst also
maintaining the NUL-padding behavior that `strncpy` provides. I am not
sure whether NUL-padding is strictly needed but I see in
`nvif_object_ctor()` args is memcpy'd elsewhere so I figured we'd keep
the same functionality.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230914-strncpy-drivers-gpu-drm-nouveau-nvif-client-c-v1-1-dc3b3719fcb4@google.com


# 59f216cf 04-Mar-2021 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: rip out nvkm_client.super

No longer required now that userspace can't touch anything that might
need it, and should fix DRM MM operations racing with each other, and
the random hangs/crashes that come with that.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>


# 9ac596a4 29-Mar-2020 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: give every object a human-readable identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>


# 6db25fb1 29-Mar-2020 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: rename client ctor/dtor

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>


# 04b88677 22-May-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/core/client: allow creation of subclients

We want a supervisor client of NVKM (such as the DRM) to be able to
allow sharing of resources (such as memory objects) between clients.

To allow this, the supervisor creates all its clients as children of
itself, and will use an upcoming ioctl to permit sharing.

Currently it's not possible for indirect clients to use subclients.
Supporting this will require an additional field in the main ioctl.
This isn't important currently, but will need to be fixed for virt.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 05da248b 25-May-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/core/client: destroy client objects over nvif

Preparation for supporting subclients, and also good for consistency.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# f3a8b664 03-Nov-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: silence sparse warnings about symbols not being marked static

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 99d4d36a 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: extend nop ioctl to return nvif version identifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# bf81df9b 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: replace path-based object identification

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# a01ca78c 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: simplify and tidy library interfaces

A variety of tweaks to the NVIF library interfaces, mostly ripping out
things that turned out to be not so useful.

- Removed refcounting from nvif_object, callers are expected to not be
stupid instead.
- nvif_client is directly reachable from anything derived from nvif_object,
removing the need for heuristics to locate it
- _new() versions of interfaces, that allocate memory for the object
they construct, have been removed. The vast majority of callers used
the embedded _init() interfaces.
- No longer storing constructor arguments (and the data returned from
nvkm) inside nvif_object, it's more or less unused and just wastes
memory.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# c39f472e 13-Jan-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)

The symlinks were annoying some people, and they're not used anywhere
else in the kernel tree. The include directory structure has been
changed so that symlinks aren't needed anymore.

NVKM has been moved from core/ to nvkm/ to make it more obvious as to
what the directory is for, and as some minor prep for when NVKM gets
split out into its own module (virt) at a later date.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 34acf100 17-Nov-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/lib: add null backend

For the moment, just used to speed up vbios-only testing. Have some
ideas for extending in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 27111a23 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: expose the full object/event interfaces to userspace

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 0ad72863 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: port to nvif client/device/objects

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# a04d0423 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: import library functions for the ioctl/event interfaces

This is a wrapper around the interfaces defined in an earlier commit,
and is also used by various userspace (either by a libdrm backend, or
libpciaccess) tools/tests.

In the future this will be extended to handle channels, replacing some
long-unloved code we currently use, and allow fifo/display/mpeg (hi
Ilia ;)) engines to all be exposed in the same way.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>