2009/5/8 Kristian Høgsberg <[email protected]>:
> From: Jesse Barnes <[email protected]>
>
> Sits on top of KMS page flipping ioctl.
Cool stuff.
[SNIP]
> extern int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size,
> uint16_t *red, uint16_t *green, uint16_t *blue);
> extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
> uint16_t *red, uint16_t *green, uint16_t *blue);
> +extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id, void
> *user_data);
I'm thinking that there are use cases where we actually want to send a
real uint64_t to the kernel and not just a wrapped pointer. So maybe
we should let the user convert the pointer instead of us doing it for
him.
> diff --git a/shared-core/drm.h b/shared-core/drm.h
> index b97ba09..b01fc43 100644
> --- a/shared-core/drm.h
> +++ b/shared-core/drm.h
> @@ -1107,7 +1107,7 @@ struct drm_gem_open {
> #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
> #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
> #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, uint32_t)
> -#define DRM_IOCTL_MODE_REPLACEFB DRM_IOWR(0xB0, struct drm_mode_fb_cmd)
> +#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOW( 0xB0, struct
> drm_mode_page_flip)
>
> /*...@}*/
>
> @@ -1122,6 +1122,30 @@ struct drm_gem_open {
> #define DRM_COMMAND_BASE 0x40
> #define DRM_COMMAND_END 0xA0
>
> +/**
> + * Header for events written back to userspace on the drm fd. The
> + * type defines the type of event, the length specifies the total
> + * length of the event (including the header), and user_data is
> + * typically a 64 bit value passed with the ioctl that triggered the
> + * event. A read on the drm fd will always only return complete
> + * events, that is, if for example the read buffer is 100 bytes, and
> + * there are two 64 byte events pending, only one will be returned.
> + */
> +struct drm_event {
> + uint32_t type;
> + uint32_t length;
> + uint64_t user_data;
> +};
Jesse and me where talking about routing hotplug events via this new
drm_event. And from that I'm not so certain if we want to have the
user_data as a generic item, I'm thinking its better to put it on the
events that actually want to use it.
[SNIP]
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel