linux_dsm_epyc7002/drivers/gpu/drm/i915/gvt
Chris Wilson 16e4dd0342 drm/i915: Markup paired operations on wakerefs
The majority of runtime-pm operations are bounded and scoped within a
function; these are easy to verify that the wakeref are handled
correctly. We can employ the compiler to help us, and reduce the number
of wakerefs tracked when debugging, by passing around cookies provided
by the various rpm_get functions to their rpm_put counterpart. This
makes the pairing explicit, and given the required wakeref cookie the
compiler can verify that we pass an initialised value to the rpm_put
(quite handy for double checking error paths).

For regular builds, the compiler should be able to eliminate the unused
local variables and the program growth should be minimal. Fwiw, it came
out as a net improvement as gcc was able to refactor rpm_get and
rpm_get_if_in_use together,

v2: Just s/rpm_put/rpm_put_unchecked/ everywhere, leaving the manual
mark up for smaller more targeted patches.
v3: Mention the cookie in Returns

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114142129.24398-2-chris@chris-wilson.co.uk
2019-01-14 16:17:53 +00:00
..
aperture_gm.c drm/i915: Markup paired operations on wakerefs 2019-01-14 16:17:53 +00:00
cfg_space.c drm/i915/gvt: Fix function comment doc errors 2018-08-07 10:39:53 +08:00
cmd_parser.c drm/i915/gvt: fix typo in two MI cmd annotation 2018-12-07 12:00:30 +08:00
cmd_parser.h
debug.h
debugfs.c
display.c Merge tag 'drm-intel-next-2018-09-06-2' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2018-09-11 11:53:12 +10:00
display.h
dmabuf.c drm/i915/gvt: Fix drm_format_mod value for vGPU plane 2018-08-30 12:56:33 +08:00
dmabuf.h
edid.c drm/i915/gvt: Fix function comment doc errors 2018-08-07 10:39:53 +08:00
edid.h
execlist.c
execlist.h drm/i915/gvt: use array to avoid potential buffer overflow 2018-06-11 15:04:45 +08:00
fb_decoder.c drm/i915/gvt: Fix tiled memory decoding bug on BDW 2018-12-03 17:03:21 +08:00
fb_decoder.h drm/i915/gvt: Fix drm_format_mod value for vGPU plane 2018-08-30 12:56:33 +08:00
firmware.c drm/i915/gvt: Use offsetofend() rather than offsetof + sizeof 2018-05-17 22:05:10 +08:00
gtt.c Merge tag 'gvt-fixes-2018-11-26' of https://github.com/intel/gvt-linux into drm-intel-fixes 2018-11-26 11:19:48 +02:00
gtt.h Merge tag 'gvt-fixes-2018-11-07' of https://github.com/intel/gvt-linux into drm-intel-fixes 2018-11-07 15:34:10 +02:00
gvt.c drm/i915/gvt: fix a typo: "registeration" -> "registration". 2018-12-07 12:00:58 +08:00
gvt.h drm/i915: Markup paired operations on wakerefs 2019-01-14 16:17:53 +00:00
handlers.c drm/i915/gvt: update force-to-nonpriv register whitelist 2018-12-07 12:00:14 +08:00
hypercall.h drm/i915/kvmgt: Support setting dma map for huge pages 2018-07-09 10:34:28 +08:00
interrupt.c drm/i915/gvt: fix spelling mistake "Interupts" -> "Interrupts" 2018-12-07 12:01:09 +08:00
interrupt.h
kvmgt.c This is the 4.19-rc5 stable release 2018-09-27 11:06:46 +10:00
Makefile
mmio_context.c Merge tag 'gvt-fixes-2018-11-26' of https://github.com/intel/gvt-linux into drm-intel-fixes 2018-11-26 11:19:48 +02:00
mmio_context.h drm/i915/gvt: only copy the first page for restore inhibit context 2018-08-02 13:27:54 +08:00
mmio.c This is the 4.19-rc5 stable release 2018-09-27 11:06:46 +10:00
mmio.h BackMerge v4.18-rc7 into drm-next 2018-07-30 10:39:22 +10:00
mpt.h drm/i915/kvmgt: Support setting dma map for huge pages 2018-07-09 10:34:28 +08:00
opregion.c This is the 4.19-rc5 stable release 2018-09-27 11:06:46 +10:00
page_track.c drm/i915/gvt: Fix function comment doc errors 2018-08-07 10:39:53 +08:00
page_track.h
reg.h Merge tag 'gvt-next-2018-09-04' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2018-09-06 16:51:50 +03:00
sched_policy.c drm/i915: Markup paired operations on wakerefs 2019-01-14 16:17:53 +00:00
sched_policy.h
scheduler.c drm/i915: Markup paired operations on wakerefs 2019-01-14 16:17:53 +00:00
scheduler.h drm/i915/gvt: free workload in vgpu release 2018-08-13 12:32:57 +08:00
trace_points.c
trace.h
vgpu.c drm/i915: replace IS_GEN<N> with IS_GEN(..., N) 2018-12-12 16:52:10 -08:00