@@ -3594,7 +3594,7 @@ dxgk_wait_sync_object_cpu(struct dxgprocess *process, void *__user inargs)
35943594 async_host_event = NULL ;
35953595 } else {
35963596 pr_err ("Invalid event type" );
3597- DXGKRNL_ASSERT (FALSE );
3597+ DXGKRNL_ASSERT (0 );
35983598 }
35993599 }
36003600 }
@@ -4395,81 +4395,6 @@ dxgk_flush_heap_transitions(struct dxgprocess *process, void *__user inargs)
43954395 return ret ;
43964396}
43974397
4398- #ifdef DEBUG
4399- static int handle_table_escape (struct dxgprocess * process ,
4400- struct d3dkmt_escape * args ,
4401- struct d3dkmt_ht_desc * cmdin )
4402- {
4403- int ret = 0 ;
4404- struct d3dkmt_ht_desc cmd ;
4405- struct hmgrtable * table ;
4406-
4407- mutex_lock (& process -> process_mutex );
4408- cmd = * cmdin ;
4409- if (cmd .index >= 2 ) {
4410- pr_err ("invalid table index" );
4411- ret = - EINVAL ;
4412- goto cleanup ;
4413- }
4414- table = process -> test_handle_table [cmd .index ];
4415- if (table == NULL ) {
4416- table = vzalloc (sizeof (* table ));
4417- if (table == NULL ) {
4418- ret = - EINVAL ;
4419- goto cleanup ;
4420- }
4421- hmgrtable_init (table , process );
4422- process -> test_handle_table [cmd .index ] = table ;
4423- }
4424- switch (cmd .command ) {
4425- case D3DKMT_HT_COMMAND_ALLOC :
4426- cmd .handle = hmgrtable_alloc_handle_safe (table , cmd .object ,
4427- (enum hmgrentry_type )
4428- cmd .object_type , true);
4429- ret = copy_to_user (args -> priv_drv_data , & cmd , sizeof (cmd ));
4430- if (ret )
4431- ret = - EINVAL ;
4432- break ;
4433- case D3DKMT_HT_COMMAND_FREE :
4434- hmgrtable_free_handle_safe (table ,
4435- (enum hmgrentry_type )cmd .object_type ,
4436- cmd .handle );
4437- break ;
4438- case D3DKMT_HT_COMMAND_ASSIGN :
4439- ret = hmgrtable_assign_handle_safe (table , cmd .object ,
4440- (enum hmgrentry_type )cmd .object_type ,
4441- cmd .handle );
4442- break ;
4443- case D3DKMT_HT_COMMAND_GET :
4444- hmgrtable_lock (table , DXGLOCK_SHARED );
4445- cmd .object = hmgrtable_get_object_by_type (table ,
4446- (enum hmgrentry_type )
4447- cmd .object_type ,
4448- cmd .handle );
4449- hmgrtable_unlock (table , DXGLOCK_SHARED );
4450- ret = copy_to_user (args -> priv_drv_data , & cmd , sizeof (cmd ));
4451- if (ret )
4452- ret = - EINVAL ;
4453- break ;
4454- case D3DKMT_HT_COMMAND_DESTROY :
4455- if (table ) {
4456- hmgrtable_destroy (table );
4457- vfree (table );
4458- }
4459- process -> test_handle_table [cmd .index ] = NULL ;
4460- break ;
4461- default :
4462- ret = - EINVAL ;
4463- pr_err ("unknoen handle table command" );
4464- break ;
4465- }
4466-
4467- cleanup :
4468- mutex_unlock (& process -> process_mutex );
4469- return ret ;
4470- }
4471- #endif /* DEBUG */
4472-
44734398static int
44744399dxgk_escape (struct dxgprocess * process , void * __user inargs )
44754400{
@@ -4497,30 +4422,6 @@ dxgk_escape(struct dxgprocess *process, void *__user inargs)
44974422 }
44984423 adapter_locked = true;
44994424
4500- #ifdef DEBUG
4501- if (args .type == D3DKMT_ESCAPE_DRT_TEST ) {
4502- struct d3dkmt_ht_desc drtcmd ;
4503-
4504- if (args .priv_drv_data_size >= sizeof (drtcmd )) {
4505- ret = copy_from_user (& drtcmd ,
4506- args .priv_drv_data ,
4507- sizeof (drtcmd ));
4508- if (ret ) {
4509- ret = - EINVAL ;
4510- goto cleanup ;
4511- }
4512- if (drtcmd .head .command ==
4513- D3DKMT_DRT_TEST_COMMAND_HANDLETABLE ) {
4514- dxgadapter_release_lock_shared (adapter );
4515- adapter_locked = false;
4516- ret = handle_table_escape (process , & args ,
4517- & drtcmd );
4518- goto cleanup ;
4519- }
4520- }
4521- }
4522- #endif /* DEBUG */
4523-
45244425 args .adapter = adapter -> host_handle ;
45254426 ret = dxgvmb_send_escape (process , adapter , & args );
45264427
0 commit comments