hw/display/xlnx_dp: fix abort in xlnx_dp_change_graphic_fmt()
PATCH 1/1 hw/display/xlnx_dp: fix abort in xlnx_dp_change_graphic_fmt()
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 <[email protected]>
Signed-off-by Qiang Liu <[email protected]>
--- hw/display/xlnx_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/xlnx_dp.c +2 -2
@@ -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);
Signature · 1 line
2.25.1