mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/msm/gem: Split out submit_unpin_objects() helper
Untangle unpinning from unlock/unref loop. The unpin only happens in error paths so it is easier to decouple from the normal unlock path. Since we never have an intermediate state where a subset of buffers are pinned (ie. we never bail out of the pin or unpin loops) we can replace the bo state flag bit with a global flag in the submit. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/568335/
This commit is contained in:
@@ -274,8 +274,9 @@ struct msm_gem_submit {
|
||||
int fence_id; /* key into queue->fence_idr */
|
||||
struct msm_gpu_submitqueue *queue;
|
||||
struct pid *pid; /* submitting process */
|
||||
bool fault_dumped; /* Limit devcoredump dumping to one per submit */
|
||||
bool in_rb; /* "sudo" mode, copy cmds into RB */
|
||||
bool bos_pinned : 1;
|
||||
bool fault_dumped:1;/* Limit devcoredump dumping to one per submit */
|
||||
bool in_rb : 1; /* "sudo" mode, copy cmds into RB */
|
||||
struct msm_ringbuffer *ring;
|
||||
unsigned int nr_cmds;
|
||||
unsigned int nr_bos;
|
||||
@@ -292,7 +293,6 @@ struct msm_gem_submit {
|
||||
struct {
|
||||
/* make sure these don't conflict w/ MSM_SUBMIT_BO_x */
|
||||
#define BO_LOCKED 0x4000 /* obj lock is held */
|
||||
#define BO_PINNED 0x2000 /* obj (pages) is pinned and on active list */
|
||||
uint32_t flags;
|
||||
union {
|
||||
struct drm_gem_object *obj;
|
||||
|
||||
Reference in New Issue
Block a user