From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796232434; b=y/0p68NqYvQm9IL2fSbCIwn6wmwlVht+uydiX3NUNC0JtTCdjkJdmGnWdMYFtJECRb+Q tmcpq/ltcN/2oORSyFjZydOt8DtjQcF0CllxWj1OGuqLlznFv7QapBQDTdzwUZaiUSZog qgVR1dUJM3/x7AR23vpmkk6BWhmNCNXcv3pceKN9XhitIRcYw8sgRy9/ZTkAa4036ho60 hedX6YUiF3f/nIeWX36kj+j5lRCF7EN7qn0wDhuzn9T1SkFTWm9LQV3uA5gYu+8jAHHAO nbQxXUfwUe6nd0JXoyCC1AVV0jU2Y4BC4ncpLCBfzANUsfej+rRHRaVfNJqNR0nvxHQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796232434; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:From:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=hdTJRYx5Fjjzwt6/zZR2ezhVSuot39J2Esvr0nBZlGA=; b=qLqLIT/3Y4cXg4xIZMZeWqBaQk9I1GzfdS6HvR9mTaLx6nfDwO8bL3cTeBN+N8eBsYZl akjAInT7XvNZ94Ya0IOE8Wm+hvuM1bU/fr4Ckmuy6TdTdvsH6J6wEXy8NzrwoD3RLVQ05 UOs+5dLuWKE6xz0PBnzAjb4UP0mnDYSj8nCVIv3kqmA1phE8PAHKIQ1ouV8lXs7hxtCte TYusS6bg6UiF2oFEK40bctusAlRTL3bfNhVNIFnz8PYNNvsNcfxVYydkySwP0oe+rZeHI rraQR2vwzCvFWQiriHMIkRXd2ziKTbD3xSpLEIdfJCoPo1gj/j4IcVHIWstWnA7dYoQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ursulin.net; spf=pass smtp.mailfrom=ursulin.net; dkim=pass header.d=ursulin.net header.i=@ursulin.net header.a=rsa-sha256 header.s=google header.b=PWQaI7aO; arc=none smtp.remote-ip=209.85.128.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B9A8606A31A for ; Wed, 2 Dec 2026 17:27:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B9A8606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ursulin.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ursulin.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ursulin.net header.i=@ursulin.net header.a=rsa-sha256 header.s=google header.b=PWQaI7aO Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4a9a8d6cea8so719265e9.1 for ; Wed, 02 Dec 2026 09:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin.net; s=google; t=1796232432; x=1796837232; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hdTJRYx5Fjjzwt6/zZR2ezhVSuot39J2Esvr0nBZlGA=; b=PWQaI7aOBFPls1qu7i8FL1WZuP1RWQ8vcT4Og6tnSgRayfa2bhfhQuYJC9/8tCX8rE GJSItViHrg9J8i+byuMErRurL6JctZqtCkJN/W9U7y82IfxpENz9emAaMnsSyhLKysjA 6RJOhwKpDXkAUy03gg2mVyk8Xhn9o2FD/IwOEdYrJT5MLYtDXct8iAyFb59EGocORok3 3P6XjR1Fk7jpALdsr5wkF9idcbEReMVKG3QhIQhRdlZks8o2dKPWB3VGystzPHkz+4K5 jixv93LiVAa6bKIrkflkl35FyxHMOTorUR9GdkdUghL6XUUlknkDvBA7bS2Q69I/F6rB HNFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796232432; x=1796837232; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hdTJRYx5Fjjzwt6/zZR2ezhVSuot39J2Esvr0nBZlGA=; b=AI+hkUi9EEBCF5iED+ZS+hUhL/jrRRZEsxB3xTYJkZQ0/vJZ8u5RPKDfqIBeFRr6RO phPccktFQ/KaQAPjpdOwEqycRKNOzDIeCwLniWZOiAh3S5eDaJEV1+dAhWApe+zdiOy8 ZmRyBDWxEM4q4YnltQV42Mtq8Udj8tRfNJt21uCa7DsVF4tZG7pm7bdaqOn8LfAFKB/f jS//ZcYAHyomiBsyuJJqSOOueFuYdImaaWxdK5uaaBHNZP/27UUHgw2HzUXLFFhCPQt+ sxsuWuWmGw+HUyQOq/8fk664e1/VLaRzCj/Z5NKHoDYVJKJiBkQqfOtnynQq24si4/wy BjeA== X-Forwarded-Encrypted: i=1; AL+hErEfld+B0G8B4fl8QpY6xCuMzu76a+n5DIwCGi0uF8wnNvlcKFLf3ZK5tk7XUw8LZ3di0TSJVfKbzjZu/94=@vger.kernel.org X-Gm-Message-State: APuU4Z/bJTNRFSNTQ1uPDkOscz0t4JCm84nAtdsYDJOV2IFJd0oaweib jtvV99Fd69KtI0O18TR93q9hdDgH+2vR4lsXutEvwIOxvPjQtdc/2MQeaBBikkY9zCQ= X-Gm-Gg: AZFdTZe6Mz0IDqq8by3c/awvSCie6iNznRq0A4tSfrU1TeTh1vtAwh0MvDusNZ03xWM a8XqBNLBuO0rvST1EoqJVajWxJhIweikStyX9ddjbtMAdDhK7MhCZIQW+S218ST726IZQkChXfx ki1n/z/gt1MTQuqmRhn2RI8yIpFZFKmjZswWKyZ0UGisE3a4Z8UNOufj4ezX2SJK8uUMzh0xIzU 1fzi+lmZICfZQ3tGGjnzVBuqR182QvKOKSXBJvQj5o16o8lmjiYwtHCb0Rsxo2XqiTY/vuL9KDS 6daf5Q4FbIoyIaCZ2PI47qQ+qv/kMNZP8QbvxCs3mKUtNYdBv4AbfnCUgsiMvGv2tVP4Wq5WRhm IaTDQlcuotHhmjllq7R+KHS0UXyXzj0mJ7LI0xLNDdSA2dX4qOb/mKdoC7Ql16ZTWFvgELGAZvX qu39G1/d1iTpaah2YoxzphAgDm7zkDfDXJ6IVLh4UUaTWfJG1upup7rxSOW4tFzVuK7shdXfH9F sXkkIjL3HdKYFJRuWaDU8sgKLRAbifDMN8vpRY9mydCyjLGVmVcouVeNShp0AMj7GT9WLcc/Du4 M0T6nBIKh5EAu78pCJ4F4RjFODhweeCsi8yO06We86bxfK4I87paq9nYep3nKIJHvg== X-Received: by 2002:a05:600c:6749:b0:4bb:5d38:259f with SMTP id 5b1f17b1804b1-4bb8881099cmr771615025e9.12.1796232432305; Wed, 02 Dec 2026 09:27:12 -0800 (PST) Received: from [192.168.0.116] ([81.79.79.1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe0055483sm2453265e9.6.2026.12.02.09.27.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 09:27:11 -0800 (PST) Message-ID: Date: Wed, 2 Dec 2026 17:27:11 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] accel/rocket: Parallelize independent jobs across cores From: Tvrtko Ursulin To: Gyeyoung Baek , Tomeu Vizoso , Oded Gabbay Cc: Heiko Stuebner , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Philipp Stanner , Danilo Krummrich References: <20261202100555.3122236-1-gye976@gmail.com> <29badb49-7a4c-44af-be4d-f464e949452b@ursulin.net> Content-Language: en-GB In-Reply-To: <29badb49-7a4c-44af-be4d-f464e949452b@ursulin.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 02/12/2026 14:53, Tvrtko Ursulin wrote: > > On 02/12/2026 10:05, Gyeyoung Baek wrote: >> The jobs of models with independent branches, such as inception, could >> run concurrently, but they currently run one after the other on a >> single core. >> >> For example, if jobs B1, B2 and B3 each read the output of job P, and >> none of them reads the output of another: >> >>          .--> B1 >>    P ----+--> B2 >>          '--> B3 >> >>    now:                          with this patch: >>    core0  [P ][B1][B2][B3]       core0  [P ][B1] >>    core1                         core1      [B2] >>    core2                         core2      [B3] >>           ----------------> t           --------> t >> >> This is because all the jobs of a submission go to a single entity, and >> an entity runs on one core at a time. >> >> To fix this: >> - Give each file one entity per core, and pick the core when queueing a >>    job. Jobs are then only ordered by their BO dependencies. Document >>    this in the uAPI. > > Strictly speaking you could give all schedulers to all entities, right? > Existing sched->score tracking *should* make sure different entities > submitting in turn get assign different schedulers via > drm_sched_pick_best(). > > With that I am not sure you would need to complicate things with own > sched selection logic - sounds like it is partly implementing different > drm_sched_pick_best(). > > In general, the problem with why a single entity does not work really is > that drm_sched_entity_select_rq() has this artificial coupling > preventing run queue / scheduler changes while there are queued or > active jobs in the entity. In the ideal world it should work. Scratch this, I got confused due context switching. One entity shouldn't execute in parallel to itself is fundamental. Tvrtko > I touched so many broken DRM scheduler areas recently that I cannot from > the top of my head remember how ingrained is this limitation. I *think* > I tried to fix it by a larger rework couple years back but hit some > issue. So I am now interested to remind myself what the issue was. If I > manage to rememeber I will update the thread. :) > > Anyway, I am just thinking out loud here. Feel free to proceed as you > wish in rocket. > > Regards, > > Tvrtko > > P.S. Adding DRM scheduler maintainers for visibility. > >> - Pick, in this order: a core whose last job the job depends on, the >>    least recently used idle core, the least recently used core. >> - Picking the entity now needs the fences in the dma_resv of the BOs, >>    which is shared between submissions and can only be read with its >>    lock held. So move drm_sched_job_init(), which takes the entity, >>    after the BOs are locked and the core is picked. >> >> On RK3588 with Mesa main, comparing the inference time before and after >> this patch (mean of 8 runs of the median of 300 inferences), models with >> independent branches got faster. Models without branches also got >> slightly faster, as consecutive inferences now take turns on the idle >> cores. >> >>    with branches      inception_v1          -11.3% >>                       ssd_mobilenet_v2       -6.1% >>                       ssdlite_mobiledet      -5.9% >>    without branches   mobilenet_v2           -3.5% >>                       mobilenet_v1           -1.6% >> >> Signed-off-by: Gyeyoung Baek >> --- >> Depends on "accel/rocket: publish read fences for input buffers" >> (4d8cb7be620e in drm-misc-fixes). >> >>   drivers/accel/rocket/rocket_core.h   |   5 + >>   drivers/accel/rocket/rocket_device.h |   3 + >>   drivers/accel/rocket/rocket_drv.h    |   5 +- >>   drivers/accel/rocket/rocket_job.c    | 174 ++++++++++++++++++++------- >>   include/uapi/drm/rocket_accel.h      |   3 + >>   5 files changed, 146 insertions(+), 44 deletions(-) >> >> diff --git a/drivers/accel/rocket/rocket_core.h b/drivers/accel/ >> rocket/rocket_core.h >> index f6d7382854ca9..aaaa844539054 100644 >> --- a/drivers/accel/rocket/rocket_core.h >> +++ b/drivers/accel/rocket/rocket_core.h >> @@ -55,6 +55,11 @@ struct rocket_core { >>       struct drm_gpu_scheduler sched; >>       u64 fence_context; >>       u64 emit_seqno; >> + >> +    /* Finished fence of the last job queued on this core, protected >> by sched_lock. */ >> +    struct dma_fence *last_fence; >> +    /* Value of rocket_device.queued_jobs when @last_fence was >> queued. */ >> +    u64 last_queued; >>   }; >>   int rocket_core_init(struct rocket_core *core); >> diff --git a/drivers/accel/rocket/rocket_device.h b/drivers/accel/ >> rocket/rocket_device.h >> index c62d567010696..319ce62f601b1 100644 >> --- a/drivers/accel/rocket/rocket_device.h >> +++ b/drivers/accel/rocket/rocket_device.h >> @@ -17,6 +17,9 @@ struct rocket_device { >>       struct mutex sched_lock; >> +    /* Number of jobs queued so far, protected by sched_lock. */ >> +    u64 queued_jobs; >> + >>       struct rocket_core *cores; >>       unsigned int num_cores; >>       unsigned int max_cores; >> diff --git a/drivers/accel/rocket/rocket_drv.h b/drivers/accel/rocket/ >> rocket_drv.h >> index 9421e48ec5d84..3bd14542353ad 100644 >> --- a/drivers/accel/rocket/rocket_drv.h >> +++ b/drivers/accel/rocket/rocket_drv.h >> @@ -23,8 +23,9 @@ struct rocket_file_priv { >>       struct drm_mm mm; >>       struct mutex mm_lock; >> -    struct drm_gpu_scheduler **scheds; >> -    struct drm_sched_entity sched_entity; >> +    /* One entity per core, see rocket_pick_core(). */ >> +    struct drm_sched_entity *sched_entities; >> +    unsigned int num_sched_entities; >>   }; >>   struct rocket_iommu_domain *rocket_iommu_domain_get(struct >> rocket_file_priv *rocket_priv); >> diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/ >> rocket_job.c >> index d28167208dc4a..7542c148ac2d0 100644 >> --- a/drivers/accel/rocket/rocket_job.c >> +++ b/drivers/accel/rocket/rocket_job.c >> @@ -210,11 +210,91 @@ static void rocket_attach_object_fences(struct >> drm_gem_object **bos, >>           dma_resv_add_fence(bos[i]->resv, fence, usage); >>   } >> -static int rocket_job_push(struct rocket_job *job) >> +/* Returns true if @job has to wait for @fence because of its BOs. */ >> +static bool rocket_job_depends_on(struct rocket_job *job, struct >> dma_fence *fence) >>   { >> +    struct dma_resv_iter cursor; >> +    struct dma_fence *dep; >> +    u32 i; >> + >> +    for (i = 0; i < job->in_bo_count; i++) { >> +        dma_resv_for_each_fence(&cursor, job->in_bos[i]->resv, >> +                    dma_resv_usage_rw(false), dep) { >> +            if (dep == fence) >> +                return true; >> +        } >> +    } >> + >> +    for (i = 0; i < job->out_bo_count; i++) { >> +        dma_resv_for_each_fence(&cursor, job->out_bos[i]->resv, >> +                    dma_resv_usage_rw(true), dep) { >> +            if (dep == fence) >> +                return true; >> +        } >> +    } >> + >> +    return false; >> +} >> + >> +/* >> + * Returns the core to queue @job on, the first of: >> + * 1. a core whose last queued job @job depends on, >> + * 2. the least recently used idle core, >> + * 3. the least recently used core. >> + * >> + * Called with the reservations of the BOs of @job and rdev- >> >sched_lock held. >> + */ >> +static unsigned int rocket_pick_core(struct rocket_file_priv *file_priv, >> +                     struct rocket_job *job) >> +{ >> +    struct rocket_device *rdev = file_priv->rdev; >> +    unsigned int i, best = 0; >> +    bool found = false; >> + >> +    /* 1. */ >> +    for (i = 0; i < file_priv->num_sched_entities; i++) { >> +        struct rocket_core *core = &rdev->cores[i]; >> + >> +        if (!core->last_fence || dma_fence_is_signaled(core- >> >last_fence)) >> +            continue; >> + >> +        if (rocket_job_depends_on(job, core->last_fence)) >> +            return i; >> +    } >> + >> +    /* 2. */ >> +    for (i = 0; i < file_priv->num_sched_entities; i++) { >> +        struct rocket_core *core = &rdev->cores[i]; >> + >> +        if (core->last_fence && !dma_fence_is_signaled(core- >> >last_fence)) >> +            continue; >> + >> +        if (!found || core->last_queued < rdev- >> >cores[best].last_queued) { >> +            best = i; >> +            found = true; >> +        } >> +    } >> + >> +    if (found) >> +        return best; >> + >> +    /* 3. */ >> +    for (i = 1; i < file_priv->num_sched_entities; i++) { >> +        if (rdev->cores[i].last_queued < rdev->cores[best].last_queued) >> +            best = i; >> +    } >> + >> +    return best; >> +} >> + >> +static int rocket_job_push(struct rocket_job *job, struct drm_file >> *file) >> +{ >> +    struct rocket_file_priv *file_priv = file->driver_priv; >>       struct rocket_device *rdev = job->rdev; >> +    struct drm_sched_entity *entity; >>       struct drm_gem_object **bos; >>       struct ww_acquire_ctx acquire_ctx; >> +    struct rocket_core *core; >>       int bo_count; >>       int ret = 0; >> @@ -231,24 +311,35 @@ static int rocket_job_push(struct rocket_job *job) >>       if (ret) >>           goto err; >> -    ret = rocket_acquire_object_fences(job->in_bos, job->in_bo_count, >> -                       &job->base, false); >> -    if (ret) >> -        goto err_unlock; >> - >> -    ret = rocket_acquire_object_fences(job->out_bos, job->out_bo_count, >> -                       &job->base, true); >> -    if (ret) >> -        goto err_unlock; >> - >>       scoped_guard(mutex, &rdev->sched_lock) { >> +        entity = &file_priv- >> >sched_entities[rocket_pick_core(file_priv, job)]; >> +        ret = drm_sched_job_init(&job->base, entity, 1, NULL, file- >> >client_id); >> +        if (ret) >> +            goto err_unlock; >> + >> +        ret = rocket_acquire_object_fences(job->in_bos, job- >> >in_bo_count, >> +                           &job->base, false); >> +        if (!ret) >> +            ret = rocket_acquire_object_fences(job->out_bos, job- >> >out_bo_count, >> +                               &job->base, true); >> +        if (ret) { >> +            drm_sched_job_cleanup(&job->base); >> +            goto err_unlock; >> +        } >> + >>           drm_sched_job_arm(&job->base); >>           job->inference_done_fence = dma_fence_get(&job- >> >base.s_fence->finished); >> +        core = container_of(job->base.sched, struct rocket_core, sched); >>           kref_get(&job->refcount); /* put by scheduler job completion */ >>           drm_sched_entity_push_job(&job->base); >> + >> +        /* Record the job as the last one of its core, for >> rocket_pick_core(). */ >> +        dma_fence_put(core->last_fence); >> +        core->last_fence = dma_fence_get(job->inference_done_fence); >> +        core->last_queued = ++rdev->queued_jobs; >>       } >>       rocket_attach_object_fences(job->in_bos, job->in_bo_count, >> @@ -530,6 +621,9 @@ void rocket_job_fini(struct rocket_core *core) >>   { >>       drm_sched_fini(&core->sched); >> +    dma_fence_put(core->last_fence); >> +    core->last_fence = NULL; >> + >>       cancel_work_sync(&core->reset.work); >>       destroy_workqueue(core->reset.wq); >>   } >> @@ -537,35 +631,42 @@ void rocket_job_fini(struct rocket_core *core) >>   int rocket_job_open(struct rocket_file_priv *rocket_priv) >>   { >>       struct rocket_device *rdev = rocket_priv->rdev; >> -    struct drm_gpu_scheduler **scheds = kmalloc_objs(*scheds, >> -                             rdev->num_cores); >>       unsigned int core; >>       int ret; >> -    if (!scheds) >> +    rocket_priv->sched_entities = kzalloc_objs(*rocket_priv- >> >sched_entities, >> +                           rdev->num_cores); >> +    if (!rocket_priv->sched_entities) >>           return -ENOMEM; >> -    for (core = 0; core < rdev->num_cores; core++) >> -        scheds[core] = &rdev->cores[core].sched; >> +    for (core = 0; core < rdev->num_cores; core++) { >> +        struct drm_gpu_scheduler *sched = &rdev->cores[core].sched; >> -    ret = drm_sched_entity_init(&rocket_priv->sched_entity, >> -                    DRM_SCHED_PRIORITY_NORMAL, >> -                    scheds, >> -                    rdev->num_cores, NULL); >> -    if (ret) >> -        kfree(scheds); >> -    else >> -        rocket_priv->scheds = scheds; >> +        ret = drm_sched_entity_init(&rocket_priv->sched_entities[core], >> +                        DRM_SCHED_PRIORITY_NORMAL, >> +                        &sched, 1, NULL); >> +        if (ret) >> +            goto err_destroy_entities; >> +    } >> + >> +    rocket_priv->num_sched_entities = rdev->num_cores; >> + >> +    return 0; >> +err_destroy_entities: >> +    while (core--) >> +        drm_sched_entity_destroy(&rocket_priv->sched_entities[core]); >> +    kfree(rocket_priv->sched_entities); >>       return ret; >>   } >>   void rocket_job_close(struct rocket_file_priv *rocket_priv) >>   { >> -    struct drm_sched_entity *entity = &rocket_priv->sched_entity; >> +    unsigned int core; >> -    drm_sched_entity_destroy(entity); >> -    kfree(rocket_priv->scheds); >> +    for (core = 0; core < rocket_priv->num_sched_entities; core++) >> +        drm_sched_entity_destroy(&rocket_priv->sched_entities[core]); >> +    kfree(rocket_priv->sched_entities); >>   } >>   int rocket_job_is_idle(struct rocket_core *core) >> @@ -602,37 +703,26 @@ static int rocket_ioctl_submit_job(struct >> drm_device *dev, struct drm_file *file >>       rjob->rdev = rdev; >>       rjob->domain = rocket_iommu_domain_get(file_priv); >> -    ret = drm_sched_job_init(&rjob->base, >> -                 &file_priv->sched_entity, >> -                 1, NULL, file->client_id); >> -    if (ret) >> -        goto out_put_job; >> - >>       ret = rocket_copy_tasks(dev, file, job, rjob); >>       if (ret) >> -        goto out_cleanup_job; >> +        goto out_put_job; >>       ret = drm_gem_objects_lookup(file, u64_to_user_ptr(job- >> >in_bo_handles), >>                        job->in_bo_handle_count, &rjob->in_bos); >>       if (ret) >> -        goto out_cleanup_job; >> +        goto out_put_job; >>       rjob->in_bo_count = job->in_bo_handle_count; >>       ret = drm_gem_objects_lookup(file, u64_to_user_ptr(job- >> >out_bo_handles), >>                        job->out_bo_handle_count, &rjob->out_bos); >>       if (ret) >> -        goto out_cleanup_job; >> +        goto out_put_job; >>       rjob->out_bo_count = job->out_bo_handle_count; >> -    ret = rocket_job_push(rjob); >> -    if (ret) >> -        goto out_cleanup_job; >> +    ret = rocket_job_push(rjob, file); >> -out_cleanup_job: >> -    if (ret) >> -        drm_sched_job_cleanup(&rjob->base); >>   out_put_job: >>       rocket_job_put(rjob); >> diff --git a/include/uapi/drm/rocket_accel.h b/include/uapi/drm/ >> rocket_accel.h >> index d0685e372b792..6c852e3d00aa3 100644 >> --- a/include/uapi/drm/rocket_accel.h >> +++ b/include/uapi/drm/rocket_accel.h >> @@ -161,6 +161,9 @@ struct drm_rocket_job { >>    * struct drm_rocket_submit - ioctl argument for submitting commands >> to the NPU. >>    * >>    * The kernel will schedule the execution of these jobs in >> dependency order. >> + * Dependencies, including those on jobs of earlier submissions, are >> only >> + * given by the BOs listed in each struct drm_rocket_job. Jobs that >> don't >> + * depend on each other may run concurrently on different cores. >>    */ >>   struct drm_rocket_submit { >>       /** >> >> base-commit: 28f286b0dfa9610d4ee2447415e964e8bc603056 >> prerequisite-patch-id: 5f2509e3f6505d397b609881d54814a3d7a47bd8 >