Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

accel: Add .mmap to DRM_ACCEL_FOPS

In reviewing the ivpu driver, DEFINE_DRM_ACCEL_FOPS could have been used
if DRM_ACCEL_FOPS defined .mmap to be drm_gem_mmap. Lets add that since
accel drivers are a variant of drm drivers, modern drm drivers are
expected to use GEM, and mmap() is a common operation that is expected
to be heavily used in accel drivers thus the common accel driver should
be able to just use DEFINE_DRM_ACCEL_FOPS() for convenience.

Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>

authored by

Jeffrey Hugo and committed by
Oded Gabbay
e868cc59 641477fd

+2 -1
+2 -1
include/drm/drm_accel.h
··· 27 27 .compat_ioctl = drm_compat_ioctl,\ 28 28 .poll = drm_poll,\ 29 29 .read = drm_read,\ 30 - .llseek = noop_llseek 30 + .llseek = noop_llseek, \ 31 + .mmap = drm_gem_mmap 31 32 32 33 /** 33 34 * DEFINE_DRM_ACCEL_FOPS() - macro to generate file operations for accelerators drivers