]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/gmbus: fix spurious timeout on 512-byte burst reads
authorSamasth Norway Ananda <samasth.norway.ananda@oracle.com>
Mon, 16 Mar 2026 23:19:19 +0000 (16:19 -0700)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 23 Mar 2026 07:06:36 +0000 (09:06 +0200)
commit08441f10f4dc09fdeb64529953ac308abc79dd38
treec33197e3fd40274595c092223900c6cd1b9e7f44
parentc369299895a591d96745d6492d4888259b004a9e
drm/i915/gmbus: fix spurious timeout on 512-byte burst reads

When reading exactly 512 bytes with burst read enabled, the
extra_byte_added path breaks out of the inner do-while without
decrementing len. The outer while(len) then re-enters and gmbus_wait()
times out since all data has been delivered. Decrement len before the
break so the outer loop terminates correctly.

Fixes: d5dc0f43f268 ("drm/i915/gmbus: Enable burst read")
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260316231920.135438-2-samasth.norway.ananda@oracle.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 4ab0f09ee73fc853d00466682635f67c531f909c)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/display/intel_gmbus.c