mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Add CHANNEL_SETUP_BIND IOCTL
For a long time now, the ALLOC_GPFIFO_EX channel IOCTL has done much
more than just gpfifo allocation, and its signature does not match
support that's needed soon. Add a new one called SETUP_BIND to hopefully
cover our future needs and deprecate ALLOC_GPFIFO_EX.
Change nvgpu internals to match this new naming as well.
Bug 200145225
Bug 200541476
Change-Id: I766f9283a064e140656f6004b2b766db70bd6cad
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1835186
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry-picked from e0c8a16c8d
in dev-main)
Reviewed-on: https://git-master.nvidia.com/r/2169882
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ae175e45ed
commit
58ee7561f7
@@ -420,7 +420,7 @@ u32 gk20a_ce_create_context(struct gk20a *g,
|
||||
{
|
||||
struct gk20a_gpu_ctx *ce_ctx;
|
||||
struct gk20a_ce_app *ce_app = &g->ce_app;
|
||||
struct nvgpu_gpfifo_args gpfifo_args;
|
||||
struct nvgpu_setup_bind_args setup_bind_args;
|
||||
u32 ctx_id = ~0;
|
||||
int err = 0;
|
||||
|
||||
@@ -476,13 +476,13 @@ u32 gk20a_ce_create_context(struct gk20a *g,
|
||||
goto end;
|
||||
}
|
||||
|
||||
gpfifo_args.num_entries = 1024;
|
||||
gpfifo_args.num_inflight_jobs = 0;
|
||||
gpfifo_args.flags = 0;
|
||||
setup_bind_args.num_gpfifo_entries = 1024;
|
||||
setup_bind_args.num_inflight_jobs = 0;
|
||||
setup_bind_args.flags = 0;
|
||||
/* allocate gpfifo (1024 should be more than enough) */
|
||||
err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, &gpfifo_args);
|
||||
err = nvgpu_channel_setup_bind(ce_ctx->ch, &setup_bind_args);
|
||||
if (err) {
|
||||
nvgpu_err(g, "ce: unable to allocate gpfifo");
|
||||
nvgpu_err(g, "ce: unable to setup and bind channel");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user