• Oded Gabbay's avatar
    drivers/accel: define kconfig and register a new major · 8bf48897
    Oded Gabbay authored
    Add a new Kconfig for the accel subsystem. The Kconfig currently
    contains only the basic CONFIG_DRM_ACCEL option that will be used to
    decide whether to compile the accel registration code. Therefore, the
    kconfig option is defined as bool.
    
    The accel code will be compiled as part of drm.ko and will be called
    directly from the DRM core code. The reason we compile it as part of
    drm.ko and not as a separate module is because of cyclic dependency
    between drm.ko and the separate module (if it would have existed).
    This is due to the fact that DRM core code calls accel functions and
    vice-versa.
    
    The accelerator devices will be exposed to the user space with a new,
    dedicated major number - 261.
    
    The accel init function registers the new major number as a char device
    and create corresponding sysfs and debugfs root entries, similar to
    what is done in DRM init function.
    
    I added a new header called drm_accel.h to include/drm/, that will hold
    the prototypes of the drm_accel.c functions. In case CONFIG_DRM_ACCEL
    is set to 'N', that header will contain empty inline implementations of
    those functions, to allow DRM core code to compile successfully
    without dependency on CONFIG_DRM_ACCEL.
    
    I Updated the MAINTAINERS file accordingly with the newly added folder
    and I have taken the liberty to appropriate the dri-devel mailing list
    and the dri-devel IRC channel for the accel subsystem.
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Acked-by: default avatarJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
    Tested-by: default avatarJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
    Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
    8bf48897
Kconfig 3.91 KB