On 2022-02-22 21:28, Alex Deucher wrote: > This reverts commit b1f0ab445ec609f9b58e0969c5d052b52d9a54e7. > > This patch is not valid. The driver needs to actually read the > entries in the ring buffer. Add a comment to make this clear. > > Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1916>> Cc: Maíra Canal <maira.canal@xxxxxx> > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx> Harry > --- > drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h > index d3088836d4e4..cb92ab4c8b98 100644 > --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h > +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h > @@ -2918,8 +2918,15 @@ static inline void dmub_rb_flush_pending(const struct dmub_rb *rb) > while (rptr != wptr) { > uint64_t volatile *data = (uint64_t volatile *)((uint8_t *)(rb->base_address) + rptr); > //uint64_t volatile *p = (uint64_t volatile *)data; > + uint64_t temp; > + uint8_t i; > > - *data += DMUB_RB_CMD_SIZE / sizeof(uint64_t); > + /* Don't remove this. > + * The contents need to actually be read from the ring buffer > + * for this function to be effective. > + */ > + for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) > + temp = *data++; > > rptr += DMUB_RB_CMD_SIZE; > if (rptr >= rb->capacity)