[PATCH 3/4] evdev: short-circuit evdev with drm to update cursors in-kernel.

Jesse Barnes jbarnes at virtuousgeek.org
Fri Jan 16 12:17:46 PST 2009


On Monday, January 5, 2009 1:00 pm Tiago Vignatti wrote:
> Signed-off-by: Tiago Vignatti <vignatti at c3sl.ufpr.br>
> ---
>  drivers/input/evdev.c      |   11 +++++++++++
>  include/linux/drm_cursor.h |    3 +++
>  2 files changed, 14 insertions(+), 0 deletions(-)
>  create mode 100644 include/linux/drm_cursor.h
>
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index 3524bef..2b7742e 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -21,6 +21,11 @@
>  #include <linux/device.h>
>  #include <linux/compat.h>
>
> +#define DRM_CURSOR
> +#ifdef DRM_CURSOR
> +#include <linux/drm_cursor.h>
> +#endif
> +
>  struct evdev {
>  	int exist;
>  	int open;
> @@ -77,6 +82,12 @@ static void evdev_event(struct input_handle *handle,
>  	event.code = code;
>  	event.value = value;
>
> +#ifdef DRM_CURSOR
> +    /* TODO: we can do this shortcut better using a callback scheme thus
> +     * drm won't be a dependency for the evdev module */
> +    drm_collect_input_event(evdev->name, &event);
> +#endif


Yeah there should be some sort of input notifier we can use instead (though 
afaik most existing stuff goes the other way, e.g. ACPI events calling into 
the input layer so that fake input events are created).

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the xorg mailing list