mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-14 22:47:06 -05:00
drm/amd/display: add an ASSERT() to irq service functions
Currently, if we encounter unimplemented functions, it is difficult to tell what caused them just by looking at dmesg and that is compounded by the fact that it is often hard to reproduce said issues, for instance we have had reports of this condition being triggered when removing a secondary display that is setup in mirror mode and is connected using usb-c. So, to have access to more detailed debugging information, add an ASSERT() to dal_irq_service_ack() and dal_irq_service_set() that only triggers when we encounter an unimplemented function. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
e299b00adf
commit
b3372fa74d
@@ -112,8 +112,15 @@ bool dal_irq_service_set(
|
||||
|
||||
dal_irq_service_ack(irq_service, source);
|
||||
|
||||
if (info->funcs && info->funcs->set)
|
||||
if (info->funcs && info->funcs->set) {
|
||||
if (info->funcs->set == dal_irq_service_dummy_set) {
|
||||
DC_LOG_WARNING("%s: src: %d, st: %d\n", __func__,
|
||||
source, enable);
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
return info->funcs->set(irq_service, info, enable);
|
||||
}
|
||||
|
||||
dal_irq_service_set_generic(irq_service, info, enable);
|
||||
|
||||
@@ -146,8 +153,14 @@ bool dal_irq_service_ack(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (info->funcs && info->funcs->ack)
|
||||
if (info->funcs && info->funcs->ack) {
|
||||
if (info->funcs->ack == dal_irq_service_dummy_ack) {
|
||||
DC_LOG_WARNING("%s: src: %d\n", __func__, source);
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
return info->funcs->ack(irq_service, info);
|
||||
}
|
||||
|
||||
dal_irq_service_ack_generic(irq_service, info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user