drm/xe: Don't grab runtime PM ref in engine create IOCTL
authorMatthew Brost <matthew.brost@intel.com>
Mon, 10 Apr 2023 21:26:58 +0000 (14:26 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:31:40 +0000 (18:31 -0500)
commit67f2f0d7371709cb91d46d4c557aaa28b902674c
treea45184f07789adb07e9468afa13960cb218d333d
parent0a12a612c870231172d30196e6245ea471fabaed
drm/xe: Don't grab runtime PM ref in engine create IOCTL

A VM had a runtime PM ref, a engine can't be created without a VM, and
the engine holds a ref to the VM thus this is unnecessary. Beyond that
taking a ref in the engine create IOCTL and dropping it in the destroy
IOCTL is wrong as a user doesn't have to call the destroy IOCTL (e.g.
they can just kill the process or close the driver FD). If a user does
this PM refs are leaked.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_engine.c