]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/xe: Build PM into GuC CT layer
authorMatthew Brost <matthew.brost@intel.com>
Fri, 19 Jul 2024 17:29:05 +0000 (10:29 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Sat, 20 Jul 2024 02:45:34 +0000 (19:45 -0700)
commitd930c19fdff3109e97b610fa10943b7602efcabd
tree0016fd5a8b873f42a2027107dbad96ac62f94e7f
parent0a382f9bc5dc4744a33970a5ed4df8f9c702ee9e
drm/xe: Build PM into GuC CT layer

Take PM ref when any G2H are outstanding, drop when none are
outstanding.

To safely ensure we have PM ref when in the GuC CT layer, a PM ref needs
to be held when scheduler messages are pending too.

v2:
 - Add outer PM protections to xe_file_close (CI)
v3:
 - Only take PM ref 0->1 and drop on 1->0 (Matthew Auld)
v4:
 - Add assert to G2H increment function
v5:
 - Rebase
v6:
 - Declare xe as local variable in xe_file_close (CI)

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240719172905.1527927-5-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_guc_ct.c
drivers/gpu/drm/xe/xe_guc_submit.c