drm/xe/vf: Fix register value lookup
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 18 Jul 2024 20:31:55 +0000 (22:31 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 15 Aug 2024 13:44:22 +0000 (09:44 -0400)
commit64da63cd3f7d771bf8f240e72203da1f72aa3728
tree32396069aaa6e48bb492e01ee35bf3f07e9bd8e6
parent817c70e2ba278e9d5360833b1137ef8855ac1728
drm/xe/vf: Fix register value lookup

We should use the number of actual entries stored in the runtime
register buffer, not the maximum number of entries that this buffer
can hold, otherwise bsearch() may fail and we may miss the data and
wrongly report unexpected access to some registers.

Fixes: 4edadc41a3a4 ("drm/xe/vf: Use register values obtained from the PF")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240718203155.486-1-michal.wajdeczko@intel.com
(cherry picked from commit ad16682db18f4414e53bba1ce0db75b08bdc4dff)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt_sriov_vf.c