Searched hist:"46 edb0a3eb16cebc2db6f9b6f7c19813d52bfcc9" (Results 1 – 2 of 2) sorted by relevance
/linux/drivers/gpu/drm/xe/ |
H A D | xe_pm.h | diff 46edb0a3eb16cebc2db6f9b6f7c19813d52bfcc9 Wed May 22 19:00:59 CEST 2024 Rodrigo Vivi <rodrigo.vivi@intel.com> drm/xe: Fix xe_pm_runtime_get_if_active return
Current callers of this function are already taking the result to a boolean and using in an if. It might be a problem because current function might return negative error codes on failure, without increasing the reference counter.
In this scenario we could end up with extra 'put' call ending in unbalanced scenarios.
Let's fix it, while aligning with the current xe_pm_get_if_in_use style.
Tested-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
H A D | xe_pm.c | diff 46edb0a3eb16cebc2db6f9b6f7c19813d52bfcc9 Wed May 22 19:00:59 CEST 2024 Rodrigo Vivi <rodrigo.vivi@intel.com> drm/xe: Fix xe_pm_runtime_get_if_active return
Current callers of this function are already taking the result to a boolean and using in an if. It might be a problem because current function might return negative error codes on failure, without increasing the reference counter.
In this scenario we could end up with extra 'put' call ending in unbalanced scenarios.
Let's fix it, while aligning with the current xe_pm_get_if_in_use style.
Tested-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|