* [PATCH] hw/display/xlnx_dp: fix abort in xlnx_dp_change_graphic_fmt()
@ 2023-01-05 11:09 Qiang Liu
0 siblings, 0 replies; 2+ messages in thread
From: Qiang Liu @ 2023-01-05 11:09 UTC (permalink / raw)
To: qemu-devel
Cc: Qiang Liu, Alistair Francis, Edgar E. Iglesias, Peter Maydell,
open list:Xilinx ZynqMP and...
xlnx_dp_change_graphic_fmt() will directly abort if either graphic
format or the video format is not supported.
This patch directly let xlnx_dp_change_graphic_fmt() return if the
formats are not supported.
xlnx_dp_change_graphic_fmt() has two callsites in xlnx_dp_avbufm_write()
and xlnx_dp_reset(). I think it may be OK to drop the abort in
xlnx_dp_change_graphic_fmt() because the error information will be
printed.
Fixes: 58ac482a66de ("introduce xlnx-dp")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1415
Reported-by: Qiang Liu <cyruscyliu@gmail.com>
Signed-off-by: Qiang Liu <cyruscyliu@gmail.com>
---
hw/display/xlnx_dp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index b0828d65aa..407518c870 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -641,7 +641,7 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
default:
error_report("%s: unsupported graphic format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
- abort();
+ return;
}
switch (s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK) {
@@ -657,7 +657,7 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
default:
error_report("%s: unsupported video format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
- abort();
+ return;
}
xlnx_dp_recreate_surface(s);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] hw/display/xlnx_dp: fix abort in xlnx_dp_change_graphic_fmt()
@ 2023-01-16 2:54 Qiang Liu
0 siblings, 0 replies; 2+ messages in thread
From: Qiang Liu @ 2023-01-16 2:54 UTC (permalink / raw)
To: qemu-devel
Cc: Qiang Liu, Alistair Francis, Edgar E. Iglesias, Peter Maydell,
open list:Xilinx ZynqMP and...
xlnx_dp_change_graphic_fmt() will directly abort if either graphic
format or the video format is not supported.
This patch directly let xlnx_dp_change_graphic_fmt() return if the
formats are not supported.
xlnx_dp_change_graphic_fmt() has two callsites in xlnx_dp_avbufm_write()
and xlnx_dp_reset(). I think it may be OK to drop the abort in
xlnx_dp_change_graphic_fmt() because the error information will be
printed.
Fixes: 58ac482a66de ("introduce xlnx-dp")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1415
Reported-by: Qiang Liu <cyruscyliu@gmail.com>
Signed-off-by: Qiang Liu <cyruscyliu@gmail.com>
---
hw/display/xlnx_dp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index b0828d65aa..407518c870 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -641,7 +641,7 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
default:
error_report("%s: unsupported graphic format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
- abort();
+ return;
}
switch (s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK) {
@@ -657,7 +657,7 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
default:
error_report("%s: unsupported video format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
- abort();
+ return;
}
xlnx_dp_recreate_surface(s);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-16 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 11:09 [PATCH] hw/display/xlnx_dp: fix abort in xlnx_dp_change_graphic_fmt() Qiang Liu
-- strict thread matches above, loose matches on Subject: below --
2023-01-16 2:54 Qiang Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).