linux_dsm_epyc7002/drivers/gpu/drm/vc4
Paul Kocialkowski 35c8b4b2c0 drm/vc4: Allocate binner bo when starting to use the V3D
The binner BO is not required until the V3D is in use, so avoid
allocating it at probe and do it on the first non-dumb BO allocation.

Keep track of which clients are using the V3D and liberate the buffer
when there is none left, using a kref. Protect the logic with a
mutex to avoid race conditions.

The binner BO is created at the time of the first render ioctl and is
destroyed when there is no client and no exec job using it left.

The Out-Of-Memory (OOM) interrupt also gets some tweaking, to avoid
enabling it before having allocated a binner bo.

We also want to keep the BO alive during runtime suspend/resume to avoid
failing to allocate it at resume. This happens when the CMA pool is
full at that point and results in a hard crash.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-5-paul.kocialkowski@bootlin.com
2019-05-23 17:32:21 +02:00
..
Kconfig drm/vc4: add HDMI CEC support 2017-07-26 12:15:12 -07:00
Makefile drm/vc4: Add support for the transposer block 2018-07-07 07:54:46 +02:00
vc4_bo.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_crtc.c drm pull request for 5.2 2019-05-08 21:35:19 -07:00
vc4_debugfs.c drm/vc4: vc4_debugfs_regset32() can be static 2019-04-04 12:56:45 -07:00
vc4_dpi.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_drv.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_drv.h drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_dsi.c One more patch to remove io.h from clk-provider.h. We used to need this 2019-05-16 19:05:35 -07:00
vc4_fence.c drm/vc4: Remove unecessary dma_fence_ops 2018-07-03 13:14:10 +02:00
vc4_gem.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_hdmi.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_hvs.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00
vc4_irq.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_kms.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_packet.h drm/vc4: Add support for drawing 3D frames. 2015-12-07 20:05:10 -08:00
vc4_perfmon.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_plane.c drm: Remove users of drm_format_(horz|vert)_chroma_subsampling 2019-05-20 13:33:11 +02:00
vc4_qpu_defines.h drm/vc4: Fix definition of QPU_R_MS_REV_FLAGS 2016-07-15 15:19:52 -07:00
vc4_regs.h drm/vc4: Report HVS underrun errors 2019-03-06 14:47:59 +01:00
vc4_render_cl.c drm/vc4: Make sure to emit a tile coordinates between two MSAA loads. 2019-04-01 09:33:38 -07:00
vc4_trace_points.c drm/vc4: Add support for drawing 3D frames. 2015-12-07 20:05:10 -08:00
vc4_trace.h drm/vc4: Use correct path to trace include 2017-09-05 11:11:20 +02:00
vc4_txp.c drm-misc-next for 5.2: 2019-04-05 11:38:02 +10:00
vc4_v3d.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_validate_shaders.c drm/vc4: Fix memory leak during BO teardown 2018-04-09 12:42:08 -07:00
vc4_validate.c drm/vc4_validate: Remove VLA usage 2018-03-16 15:51:52 -07:00
vc4_vec.c drm/vc4: Use common helpers for debugfs setup by the driver components. 2019-04-03 12:49:13 -07:00