Revert "drm/amd/display: Remove unused temp variable"
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 Revert "drm/amd/display: Remove unused temp variable"
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.
Cc Maíra Canal <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +8 -1
@@ -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)
Signature · 1 line
2.35.1
Quoted 7 lines · Alex Deucher
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 <[email protected]>Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 25 lines
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +8
-1@@ -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)