drm/v3d: add generic ioctl extension
authorMelissa Wen <mwen@igalia.com>
Thu, 30 Sep 2021 16:18:50 +0000 (17:18 +0100)
committerMelissa Wen <melissa.srw@gmail.com>
Mon, 4 Oct 2021 09:08:46 +0000 (10:08 +0100)
commitbb3425efdcd99f2b4e608e850226f7107b2f993e
tree071b6ab183e8cb134ea8b46b54d9a2291c1ce53d
parent07c2a41658c454c8f148c7fd6b0cbcecb78e9829
drm/v3d: add generic ioctl extension

Add support to attach generic extensions on job submission. This patch
is third prep work to enable multiple syncobjs on job submission. With
this work, when the job submission interface needs to be extended to
accommodate a new feature, we will use a generic extension struct where
an id determines the data type to be pointed. The first application is
to enable multiples in/out syncobj (next patch), but the base is
already done for future features. Therefore, to attach a new feature,
a specific extension struct should subclass drm_v3d_extension and
update the list of extensions in a job submission.

v2:
- remove redundant elements to subclass struct (Daniel)

v3:
- add comment for v3d_get_extensions

Signed-off-by: Melissa Wen <mwen@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ed53b1cd7e3125b76f18fe3fb995a04393639bc6.1633016479.git.mwen@igalia.com
drivers/gpu/drm/v3d/v3d_drv.c
drivers/gpu/drm/v3d/v3d_gem.c
include/uapi/drm/v3d_drm.h