Commit 71e801b9 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

drm: Clear fd/handle callbacks in struct drm_driver



Clear all assignments of struct drm_driver's fd/handle callbacks to
drm_gem_prime_fd_to_handle() and drm_gem_prime_handle_to_fd(). These
functions are called by default. Add a TODO item to convert vmwgfx
to the defaults as well.

v2:
	* remove TODO item (Zack)
	* also update amdgpu's amdgpu_partition_driver

Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarSimon Ser <contact@emersion.fr>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: Jeffrey Hugo <quic_jhugo@quicinc.com> # qaic
Link: https://patchwork.freedesktop.org/patch/msgid/20230620080252.16368-3-tzimmermann@suse.de
parent 6b85aa68
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -373,8 +373,6 @@ static const struct drm_driver driver = {

	.open = ivpu_open,
	.postclose = ivpu_postclose,
	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
	.gem_prime_import = ivpu_gem_prime_import,

	.ioctls = ivpu_drm_ioctls,
+0 −1
Original line number Diff line number Diff line
@@ -165,7 +165,6 @@ static const struct drm_driver qaic_accel_driver = {

	.ioctls			= qaic_drm_ioctls,
	.num_ioctls		= ARRAY_SIZE(qaic_drm_ioctls),
	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
	.gem_prime_import	= qaic_gem_prime_import,
};

+0 −4
Original line number Diff line number Diff line
@@ -2850,8 +2850,6 @@ static const struct drm_driver amdgpu_kms_driver = {
	.show_fdinfo = amdgpu_show_fdinfo,
#endif

	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
	.gem_prime_import = amdgpu_gem_prime_import,

	.name = DRIVER_NAME,
@@ -2876,8 +2874,6 @@ const struct drm_driver amdgpu_partition_driver = {
	.fops = &amdgpu_driver_kms_fops,
	.release = &amdgpu_driver_release_kms,

	.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
	.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
	.gem_prime_import = amdgpu_gem_prime_import,

	.name = DRIVER_NAME,
+0 −2
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@ static const struct drm_ioctl_desc armada_ioctls[] = {
DEFINE_DRM_GEM_FOPS(armada_drm_fops);

static const struct drm_driver armada_drm_driver = {
	.prime_handle_to_fd	= drm_gem_prime_handle_to_fd,
	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
	.gem_prime_import	= armada_gem_prime_import,
	.dumb_create		= armada_gem_dumb_create,
	.major			= 1,
+4 −9
Original line number Diff line number Diff line
@@ -51,15 +51,10 @@ MODULE_IMPORT_NS(DMA_BUF);
 * between applications, they can't be guessed like the globally unique GEM
 * names.
 *
 * Drivers that support the PRIME API implement the
 * &drm_driver.prime_handle_to_fd and &drm_driver.prime_fd_to_handle operations.
 * GEM based drivers must use drm_gem_prime_handle_to_fd() and
 * drm_gem_prime_fd_to_handle() to implement these. For GEM based drivers the
 * actual driver interfaces is provided through the &drm_gem_object_funcs.export
 * and &drm_driver.gem_prime_import hooks.
 *
 * &dma_buf_ops implementations for GEM drivers are all individually exported
 * for drivers which need to overwrite or reimplement some of them.
 * Drivers that support the PRIME API implement the drm_gem_object_funcs.export
 * and &drm_driver.gem_prime_import hooks. &dma_buf_ops implementations for
 * drivers are all individually exported for drivers which need to overwrite
 * or reimplement some of them.
 *
 * Reference Counting for GEM Drivers
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading