gpu/intel: dump more in error case

- show hardware read tail & head pointer of ring buffer

issue #4254
This commit is contained in:
Alexander Boettcher 2021-08-05 16:09:55 +02:00 committed by Christian Helmuth
parent c5d8a43418
commit ee283c0d12
3 changed files with 17 additions and 6 deletions

View File

@ -821,6 +821,11 @@ class Igd::Rcs_context
_execlist_context.tail_offset(offset);
}
addr_t tail_offset()
{
return _execlist_context.tail_offset();
}
/*********************
** Debug interface **
*********************/

View File

@ -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();

View File

@ -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 " : " "
);
}
}