From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Qiang Liu <cyruscyliu@gmail.com>
Cc: qemu-devel@nongnu.org, Alistair Francis <alistair@alistair23.me>,
Peter Maydell <peter.maydell@linaro.org>,
"open list:Xilinx ZynqMP and..." <qemu-arm@nongnu.org>,
Frederic Konrad <konrad.frederic@yahoo.fr>
Subject: Re: [PATCH] hw/display/xlnx_dp: fix overflow in xlnx_dp_aux_push_tx_fifo()
Date: Tue, 10 Jan 2023 13:02:15 +0100 [thread overview]
Message-ID: <Y71Tx4ODBZr1HnML@toto> (raw)
In-Reply-To: <20230109055933.749233-1-cyruscyliu@gmail.com>
On Mon, Jan 09, 2023 at 01:59:33PM +0800, Qiang Liu wrote:
> This patch checks if the s->tx_fifo is full.
+ CC: Fred
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
>
> Fixes: 58ac482a66de ("introduce xlnx-dp")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1424
> Reported-by: Qiang Liu <cyruscyliu@gmail.com>
> Signed-off-by: Qiang Liu <cyruscyliu@gmail.com>
> ---
> hw/display/xlnx_dp.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
> index 972473d94f..617b394af2 100644
> --- a/hw/display/xlnx_dp.c
> +++ b/hw/display/xlnx_dp.c
> @@ -854,7 +854,11 @@ static void xlnx_dp_write(void *opaque, hwaddr offset, uint64_t value,
> break;
> case DP_AUX_WRITE_FIFO: {
> uint8_t c = value;
> - xlnx_dp_aux_push_tx_fifo(s, &c, 1);
> + if (fifo8_is_full(&s->tx_fifo)) {
> + qemu_log_mask(LOG_GUEST_ERROR, "xlnx_dp: TX fifo is full");
> + } else {
> + xlnx_dp_aux_push_tx_fifo(s, &c, 1);
> + }
> break;
> }
> case DP_AUX_CLOCK_DIVIDER:
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2023-01-10 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 5:59 [PATCH] hw/display/xlnx_dp: fix overflow in xlnx_dp_aux_push_tx_fifo() Qiang Liu
2023-01-09 22:58 ` Alistair Francis
2023-01-10 12:02 ` Edgar E. Iglesias [this message]
2023-01-10 13:57 ` Konrad, Frederic
2023-01-11 2:01 ` Qiang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y71Tx4ODBZr1HnML@toto \
--to=edgar.iglesias@gmail.com \
--cc=alistair@alistair23.me \
--cc=cyruscyliu@gmail.com \
--cc=konrad.frederic@yahoo.fr \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.