diff options
author | Rob Clark <[email protected]> | 2018-11-28 08:50:19 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-12-13 15:51:01 -0500 |
commit | 7ef722861b691ce99be3827ed05f8c0ddf2cd66e (patch) | |
tree | 6c5d3a541dbb7c596af6c61ca26c5096e8f654ba /src/freedreno/drm/msm_pipe.c | |
parent | 4407e688cdf65b1a25f09bcfdb577d5c175aeb9a (diff) |
freedreno/drm: sync uapi and enable softpin
Pull in updated UAPI and use kernel API version to enable softpin.
Since MSM_SUBMIT_BO_DUMP flag was added at same time, use that to
signal to kernel that cmdstream buffers are useful to dump for
debugging/cmdstream-traces.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/drm/msm_pipe.c')
-rw-r--r-- | src/freedreno/drm/msm_pipe.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/freedreno/drm/msm_pipe.c b/src/freedreno/drm/msm_pipe.c index 13defc6d917..7d5b9fcd76f 100644 --- a/src/freedreno/drm/msm_pipe.c +++ b/src/freedreno/drm/msm_pipe.c @@ -168,16 +168,6 @@ static uint64_t get_param(struct fd_pipe *pipe, uint32_t param) return value; } -static bool use_softpin(void) -{ - static int sp = -1; - if (sp < 0) { - const char *str = getenv("FD_MESA_DEBUG"); - sp = str && strstr(str, "softpin"); - } - return sp; -} - struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio) { @@ -196,9 +186,7 @@ struct fd_pipe * msm_pipe_new(struct fd_device *dev, pipe = &msm_pipe->base; - // TODO once kernel changes are in place, this switch will be - // based on kernel version: - if (use_softpin()) { + if (fd_device_version(dev) >= FD_VERSION_SOFTPIN) { pipe->funcs = &sp_funcs; } else { pipe->funcs = &legacy_funcs; |