@ -10258,17 +10258,12 @@ int vrend_renderer_get_poll_fd(void)
return vrend_state . eventfd ;
}
static int vrend_renderer_export_query ( void * execute_args , uint32_t execute_size )
int vrend_renderer_export_query ( uint32_t res_id ,
struct virgl_renderer_export_query * export_query )
{
struct vrend_resource * res ;
struct virgl_renderer_export_query * export_query = execute_args ;
if ( execute_size ! = sizeof ( struct virgl_renderer_export_query ) )
return - EINVAL ;
if ( export_query - > hdr . size ! = sizeof ( struct virgl_renderer_export_query ) )
return - EINVAL ;
res = vrend_renderer_res_lookup ( export_query - > in_ resource _id) ;
res = vrend_renderer_res_lookup ( res_id ) ;
if ( ! res )
return - EINVAL ;
@ -10288,39 +10283,3 @@ static int vrend_renderer_export_query(void *execute_args, uint32_t execute_size
return 0 ;
}
static int vrend_renderer_supported_structures ( void * execute_args , uint32_t execute_size )
{
struct virgl_renderer_supported_structures * supported_structures = execute_args ;
if ( execute_size ! = sizeof ( struct virgl_renderer_supported_structures ) )
return - EINVAL ;
if ( supported_structures - > hdr . size ! = sizeof ( struct virgl_renderer_supported_structures ) )
return - EINVAL ;
if ( supported_structures - > in_stype_version = = 0 ) {
supported_structures - > out_supported_structures_mask =
VIRGL_RENDERER_STRUCTURE_TYPE_EXPORT_QUERY |
VIRGL_RENDERER_STRUCTURE_TYPE_SUPPORTED_STRUCTURES ;
} else {
supported_structures - > out_supported_structures_mask = 0 ;
}
return 0 ;
}
int vrend_renderer_execute ( void * execute_args , uint32_t execute_size )
{
struct virgl_renderer_hdr * hdr = execute_args ;
if ( hdr - > stype_version ! = 0 )
return - EINVAL ;
switch ( hdr - > stype ) {
case VIRGL_RENDERER_STRUCTURE_TYPE_SUPPORTED_STRUCTURES :
return vrend_renderer_supported_structures ( execute_args , execute_size ) ;
case VIRGL_RENDERER_STRUCTURE_TYPE_EXPORT_QUERY :
return vrend_renderer_export_query ( execute_args , execute_size ) ;
default :
return - EINVAL ;
}
}