diff mbox series

hw/display/xlnx_dp: update comments

Message ID 20230907203440.257845-1-mjt@tls.msk.ru
State Superseded
Headers show
Series hw/display/xlnx_dp: update comments | expand

Commit Message

Michael Tokarev Sept. 7, 2023, 8:34 p.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>

Clarify somewhat misleading code comments.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/display/xlnx_dp.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Peter, this is the result of your suggestions in this area.
Since it's entirely your wording, can I specify your
authorship too?

Comments

Michael Tokarev Sept. 7, 2023, 8:56 p.m. UTC | #1
07.09.2023 23:34, Michael Tokarev wrote:

> --- a/hw/display/xlnx_dp.c
> +++ b/hw/display/xlnx_dp.c
> @@ -1,4 +1,4 @@
> -/*
> +?*
>    * Xilinx Display Port

Without this glitch ofc, - already fixed.

/mjt
Philippe Mathieu-Daudé Sept. 8, 2023, 7:35 a.m. UTC | #2
On 7/9/23 22:34, Michael Tokarev wrote:
> From: Peter Maydell <peter.maydell@linaro.org>
> 
> Clarify somewhat misleading code comments.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>   hw/display/xlnx_dp.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell Sept. 8, 2023, 9:44 a.m. UTC | #3
On Thu, 7 Sept 2023 at 21:35, Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> From: Peter Maydell <peter.maydell@linaro.org>
>
> Clarify somewhat misleading code comments.
>
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>  hw/display/xlnx_dp.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> Peter, this is the result of your suggestions in this area.
> Since it's entirely your wording, can I specify your
> authorship too?

Sure.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
diff mbox series

Patch

diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index 822355ecc6..300daf9d9b 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -1,4 +1,4 @@ 
-/*
+?*
  * Xilinx Display Port
  *
  *  Copyright (C) 2015 : GreenSocs Ltd
@@ -380,13 +380,16 @@  static inline void xlnx_dp_audio_mix_buffer(XlnxDPState *s)
 static void xlnx_dp_audio_callback(void *opaque, int avail)
 {
     /*
-     * Get some data from the DPDMA and compute these data.
-     * Then wait for QEMU's audio subsystem to call this callback.
+     * Get the individual left and right audio streams from the DPDMA,
+     * and fill the output buffer with the combined stereo audio data
+     * adjusted by the volume controls.
+     * QEMU's audio subsystem will call this callback repeatedly;
+     * we return the data from the output buffer until it is emptied,
+     * and then we will read data from the DPDMA again.
      */
     XlnxDPState *s = XLNX_DP(opaque);
     size_t written = 0;
 
-    /* If there are already some data don't get more data. */
     if (s->byte_left == 0) {
         s->audio_data_available[0] = xlnx_dpdma_start_operation(s->dpdma, 4,
                                                                   true);