drm/freedreno/msm
Rob Clark 6f0f6cee5e freedreno: clamp priority based on # of rings
In case of a kernel that is new enough to support multiple submit-
queues, but with an adreno generation which doesn't support multiple
prioritized ringbuffers, we'd attempt to open a submit-queue with
prio=1 (medium), which is rejected by the kernel.

This could happen either w/ an older mesa (which uses fd_pipe_new())
or a newer mesa which defaults to prio=1 if no pipe context priority
flags are set.

The simple answer to fix both cases is to clamp the requested priority
according to the number of rings.  This might not do exactly what you
want, if we hypothetically had 2 rings (it would result in requested
medium priority being high priority instead of low priority).  But the
number of rings (for hw gen's that support this) is purely a software
construct, so the easy answer there is to have the kernel advertise at
least 3 rings if it supports more than one.  There isn't really any
reason to do otherwise.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2018-01-26 15:29:10 -05:00
..
msm_bo.c freedreno: expose kernel driver version 2016-07-20 19:42:21 -04:00
msm_device.c freedreno: valgrind support 2017-03-23 15:22:30 -04:00
msm_drm.h freedreno: sync uapi header (driver version 1.3.0) 2017-11-04 17:23:20 -04:00
msm_pipe.c freedreno: clamp priority based on # of rings 2018-01-26 15:29:10 -05:00
msm_priv.h freedreno: submit-queue context priority 2017-11-04 17:23:20 -04:00
msm_ringbuffer.c freedreno: submit-queue context priority 2017-11-04 17:23:20 -04:00