diff --git a/repos/os/src/drivers/gpu/intel/context.h b/repos/os/src/drivers/gpu/intel/context.h index a6fd31e9b6..4ecb7caa1f 100644 --- a/repos/os/src/drivers/gpu/intel/context.h +++ b/repos/os/src/drivers/gpu/intel/context.h @@ -821,6 +821,11 @@ class Igd::Rcs_context _execlist_context.tail_offset(offset); } + addr_t tail_offset() + { + return _execlist_context.tail_offset(); + } + /********************* ** Debug interface ** *********************/ diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index 96e0111c0f..710cf96318 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -329,7 +329,7 @@ struct Igd::Device _ring.flush(from, to); } - void ring_dump(size_t limit = 0) const { _ring.dump(limit); } + void ring_dump(size_t limit, unsigned hw_tail, unsigned hw_head) const { _ring.dump(limit, hw_tail, hw_head); } /********************* ** Debug interface ** @@ -891,8 +891,10 @@ struct Igd::Device _active_vgpu->rcs.context->dump(); _active_vgpu->rcs.context->dump_hw_status_page(); - Execlist const &el = *_active_vgpu->rcs.execlist; - el.ring_dump(52); + Execlist &el = *_active_vgpu->rcs.execlist; + el.ring_update_head(_active_vgpu->rcs.context->head_offset()); + el.ring_dump(4096, _active_vgpu->rcs.context->tail_offset() * 2, + _active_vgpu->rcs.context->head_offset()); _device_reset_and_init(); diff --git a/repos/os/src/drivers/gpu/intel/ring_buffer.h b/repos/os/src/drivers/gpu/intel/ring_buffer.h index 5f9ffefeb5..2b526911bf 100644 --- a/repos/os/src/drivers/gpu/intel/ring_buffer.h +++ b/repos/os/src/drivers/gpu/intel/ring_buffer.h @@ -186,19 +186,23 @@ class Igd::Ring_buffer ** Debug interface ** *********************/ - void dump(size_t dw_limit = 0) const + void dump(size_t dw_limit, unsigned const hw_tail, unsigned const hw_head) const { using namespace Genode; size_t const max = dw_limit ? dw_limit : _max; - log("Ring_buffer: ", Hex(*_dwords), " max: ", _max, " (limit: ", max, ")"); + log("Ring_buffer: ", Hex(*_dwords), " max: ", _max, " (limit: ", max, ")", + " hardware read: tail=", Genode::Hex(hw_tail), + " head=", Genode::Hex(hw_head)); for (size_t i = 0; i < max; i++) { log(Hex(i*4, Hex::PREFIX, Hex::PAD), " ", Hex(_dwords[i], Hex::PREFIX, Hex::PAD), i == _tail ? " T " : " ", - i == _head ? " H " : " " + i == _head ? " H " : " ", + i == hw_tail ? " T_HW " : " ", + i == hw_head ? " H_HW " : " " ); } }