Skip to content

Commit 3ecf036

Browse files
author
Thomas Hellström
committed
drm/xe: Annotate mcr_[un]lock()
These functions acquire and release the gt::mcr_lock. Annotate accordingly. Fix the corresponding sparse warning. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Fixes: fb1d55e ("drm/xe: Cleanup OPEN_BRACE style issues") Cc: Francois Dugast <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Matthew Brost <[email protected]> Signed-off-by: Thomas Hellström <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 97fd7a7) Signed-off-by: Thomas Hellström <[email protected]>
1 parent efeff7b commit 3ecf036

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/xe/xe_gt_mcr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static bool xe_gt_mcr_get_nonterminated_steering(struct xe_gt *gt,
480480
* to synchronize with external clients (e.g., firmware), so a semaphore
481481
* register will also need to be taken.
482482
*/
483-
static void mcr_lock(struct xe_gt *gt)
483+
static void mcr_lock(struct xe_gt *gt) __acquires(&gt->mcr_lock)
484484
{
485485
struct xe_device *xe = gt_to_xe(gt);
486486
int ret = 0;
@@ -500,7 +500,7 @@ static void mcr_lock(struct xe_gt *gt)
500500
drm_WARN_ON_ONCE(&xe->drm, ret == -ETIMEDOUT);
501501
}
502502

503-
static void mcr_unlock(struct xe_gt *gt)
503+
static void mcr_unlock(struct xe_gt *gt) __releases(&gt->mcr_lock)
504504
{
505505
/* Release hardware semaphore - this is done by writing 1 to the register */
506506
if (GRAPHICS_VERx100(gt_to_xe(gt)) >= 1270)

0 commit comments

Comments
 (0)