XA_EXPORT int
xa_surface_handle(struct xa_surface *srf,
+ enum xa_handle_type type,
uint32_t * handle, unsigned int *stride)
{
struct winsys_handle whandle;
boolean res;
memset(&whandle, 0, sizeof(whandle));
- whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+ switch (type) {
+ case xa_handle_type_kms:
+ whandle.type = DRM_API_HANDLE_TYPE_KMS;
+ break;
+ case xa_handle_type_shared:
+ default:
+ whandle.type = DRM_API_HANDLE_TYPE_SHARED;
+ break;
+ }
res = screen->resource_get_handle(screen, srf->tex, &whandle);
if (!res)
return -XA_ERR_INVAL;
uint16_t x1, y1, x2, y2;
};
+enum xa_handle_type {
+ xa_handle_type_shared,
+ xa_handle_type_kms,
+};
+
extern void xa_tracker_version(int *major, int *minor, int *patch);
extern struct xa_tracker *xa_tracker_create(int drm_fd);
int copy_contents);
extern int xa_surface_handle(struct xa_surface *srf,
- uint32_t * handle, unsigned int *byte_stride);
+ enum xa_handle_type type,
+ uint32_t * handle,
+ unsigned int *byte_stride);
#endif