drm/xe: Initialize ret in mcr_lock()
Subsystems (2)
PATCH 1/1 drm/xe: Initialize ret in mcr_lock()
ret is not initialized in mcr_lock() when running in platforms with graphics IP version < 1270, this could cause drm_WARN_ON_ONCE() to hit eventually(what just happened to me).
Fixes 62a813fa315e ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by José Roberto de Souza <[email protected]>
--- drivers/gpu/drm/xe/xe_gt_mcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_gt_mcr.c +1 -1
@@ -383,7 +383,7 @@ static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,static void mcr_lock (struct xe_gt *gt) {struct xe_device *xe =gt_to_xe (gt); -int ret; +int ret =0 ;spin_lock (>->mcr_lock);
Signature · 1 line
2.39.1
Quoted 6 lines · José Roberto de Souza
ret is not initialized in
mcr_lock()when running in platforms with graphics IP version < 1270, this could causedrm_WARN_ON_ONCE()to hit eventually(what just happened to me).Fixes 62a813fa315e ("drm/xe: Introduce a new DRM driver for Intel GPUs")Signed-off-by José Roberto de Souza <[email protected]>
Reviewed-by Matt Roper <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/xe/xe_gt_mcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/xe/xe_gt_mcr.c +1
-1@@ -383,7 +383,7 @@ static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,static void mcr_lock (struct xe_gt *gt) {struct xe_device *xe =gt_to_xe (gt); -int ret; +int ret =0 ;spin_lock (>->mcr_lock);Signature · 1 line
2.39.1
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation