]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/eustall: Add support to handle dropped EU stall data
authorHarish Chegondi <harish.chegondi@intel.com>
Wed, 26 Feb 2025 01:47:09 +0000 (17:47 -0800)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Wed, 26 Feb 2025 19:31:03 +0000 (11:31 -0800)
commit9e0590eedede7bef999f9a4388243612456ffffd
tree23903d2ea04cc85d2e5eaee5383a30d8ee571d0d
parent760edec9396851935c20914f5ffdff94dd9d8f8c
drm/xe/eustall: Add support to handle dropped EU stall data

If the user space doesn't read the EU stall data fast enough,
it is possible that the EU stall data buffer can get filled,
and if the hardware wants to write more data, it simply drops
data due to unavailable buffer space. In that case, hardware
sets a bit in a register. If the driver detects data drop,
the driver read() returns -EIO error to let the user space
know that HW has dropped data. The -EIO error is returned
even if there is EU stall data in the buffer. A subsequent
read by the user space returns the remaining EU stall data.

v12: Move 'goto exit_drop;' to the next
     'if (read_data_size == 0)' statement.
v11: Clear drop bit even for empty data buffer as the data
     was read from the buffer in the previous read.
v10: Reverted the changes back to v8:
     Clear the drop bits only after reading the data.
v9:  Move all data drop handling code to this patch
     Clear all drop data bits before returning -EIO.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6fbfd7cfa42cb3ef5515b6412573d74c7cd3d27a.1740533885.git.harish.chegondi@intel.com
drivers/gpu/drm/xe/xe_eu_stall.c