Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Samasth Norway Ananda and committed by
Jani Nikula
4ab0f09e 0fb03890

+3 -1
+3 -1
drivers/gpu/drm/i915/display/intel_gmbus.c
··· 495 495 496 496 val = intel_de_read_fw(display, GMBUS3(display)); 497 497 do { 498 - if (extra_byte_added && len == 1) 498 + if (extra_byte_added && len == 1) { 499 + len--; 499 500 break; 501 + } 500 502 501 503 *buf++ = val & 0xff; 502 504 val >>= 8;