Skip to content
Snippets Groups Projects
  • Arvind Yadav's avatar
    56cb5ac5
    drm/amdgpu: Fix Illegal opcode in command stream Error · 56cb5ac5
    Arvind Yadav authored
    
    When applications closes, it triggers the drm_file_free
    function which subsequently releases all allocated buffer
    objects. Concurrently, the resume_worker thread will attempt
    to map the usermode queue. However, since the wptr buffer
    object has already been deallocated, this will result in
    an Illegal opcode error being raised in the command stream.
    
    Now replacing drm_release() with a new function
    amdgpu_drm_release(). This function will set the flag to
    prevent the scheduling of any new queue resume/map, stop
    all queues and then call drm_release().
    
    V2:
      - Replace drm_release with amdgpu_drm_release(Christian).
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Christian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarShashank Sharma <shashank.sharma@amd.com>
    Signed-off-by: default avatarArvind Yadav <arvind.yadav@amd.com>
    Change-Id: I7fec40c02a2d20c4ff3cd38d7760545d0b0b2f9c
    56cb5ac5
    History
    drm/amdgpu: Fix Illegal opcode in command stream Error
    Arvind Yadav authored
    
    When applications closes, it triggers the drm_file_free
    function which subsequently releases all allocated buffer
    objects. Concurrently, the resume_worker thread will attempt
    to map the usermode queue. However, since the wptr buffer
    object has already been deallocated, this will result in
    an Illegal opcode error being raised in the command stream.
    
    Now replacing drm_release() with a new function
    amdgpu_drm_release(). This function will set the flag to
    prevent the scheduling of any new queue resume/map, stop
    all queues and then call drm_release().
    
    V2:
      - Replace drm_release with amdgpu_drm_release(Christian).
    
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Christian Koenig <christian.koenig@amd.com>
    Reviewed-by: default avatarShashank Sharma <shashank.sharma@amd.com>
    Signed-off-by: default avatarArvind Yadav <arvind.yadav@amd.com>
    Change-Id: I7fec40c02a2d20c4ff3cd38d7760545d0b0b2f9c