diff -u a/src/sys/external/bsd/drm2/linux/linux_dma_buf.c b/src/sys/external/bsd/drm2/linux/linux_dma_buf.c
--- a/src/sys/external/bsd/drm2/linux/linux_dma_buf.c	2022-04-09 16:44:44.000000000 -0700
+++ b/src/sys/external/bsd/drm2/linux/linux_dma_buf.c	2023-02-10 23:11:05.230939600 -0800
@@ -48,6 +48,8 @@
 static int	dmabuf_fop_kqfilter(struct file *, struct knote *);
 static int	dmabuf_fop_mmap(struct file *, off_t *, size_t, int, int *,
 		    int *, struct uvm_object **, int *);
+static int	dmabuf_fop_seek(struct file *fp, off_t delta, int whence,
+		    off_t *newoffp, int flags);
 
 static const struct fileops dmabuf_fileops = {
 	.fo_name = "dmabuf",
@@ -61,6 +63,7 @@
 	.fo_kqfilter = dmabuf_fop_kqfilter,
 	.fo_restart = fnullop_restart,
 	.fo_mmap = dmabuf_fop_mmap,
+	.fo_seek = dmabuf_fop_seek,
 };
 
 struct dma_buf *
@@ -288,3 +291,45 @@
 	return dmabuf->ops->mmap(dmabuf, offp, size, prot, flagsp, advicep,
 	    uobjp, maxprotp);
 }
+
+static int
+dmabuf_fop_seek(struct file *fp, off_t delta, int whence, off_t *newoffp, int flags)
+{
+	struct dma_buf *dmabuf = fp->f_data;
+	off_t base, newoff;
+	int error;
+
+	mutex_enter(&fp->f_lock);
+
+	switch (whence) {
+	case SEEK_CUR:
+		base = fp->f_offset;
+		break;
+	case SEEK_END:
+		base = dmabuf->size;
+		break;
+	case SEEK_SET:
+		base = 0;
+		break;
+	default:
+		error = EINVAL;
+		goto out;
+	}
+
+	/* Compute the new offset and validate it.  */
+	newoff = base + delta;	/* XXX arithmetic overflow */
+	if (newoff < 0) {
+		error = EINVAL;
+		goto out;
+	}
+
+	/* Success!  */
+	if (newoffp)
+		*newoffp = newoff;
+	if (flags & FOF_UPDATE_OFFSET)
+		fp->f_offset = newoff;
+	error = 0;
+
+out:	mutex_exit(&fp->f_lock);
+	return error;
+}
