6.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Rui rui.zhang@intel.com
[ Upstream commit f8b136ef2605c1bf62020462d10e35228760aa19 ]
Do fflush() to discard the buffered data, before each read of the graphics sysfs knobs.
Fixes: ba99a4fc8c24 ("tools/power turbostat: Remove unnecessary fflush() call") Signed-off-by: Zhang Rui rui.zhang@intel.com Signed-off-by: Len Brown len.brown@intel.com Signed-off-by: Sasha Levin sashal@kernel.org --- tools/power/x86/turbostat/turbostat.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 08b1069d9ab54..634fb287716ab 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -5836,6 +5836,7 @@ int snapshot_graphics(int idx) int retval;
rewind(gfx_info[idx].fp); + fflush(gfx_info[idx].fp);
switch (idx) { case GFX_rc6: