From: Thierry Reding <thierry.reding@gmail.com>
To: Cai Huoqing <cai.huoqing@linux.dev>
Cc: "Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@linux.ie>,
linux-kernel@vger.kernel.org,
"Christian König" <christian.koenig@amd.com>,
linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
"Sumit Semwal" <sumit.semwal@linaro.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH v2 2/4] drm/nvdla: Add driver support for NVDLA
Date: Thu, 28 Apr 2022 17:19:49 +0200 [thread overview]
Message-ID: <YmqwlbLcFgTDUpkX@orome> (raw)
In-Reply-To: <YmqwNVoTZZFaIM9S@orome>
[-- Attachment #1: Type: text/plain, Size: 8215 bytes --]
On Thu, Apr 28, 2022 at 05:18:13PM +0200, Thierry Reding wrote:
> On Tue, Apr 26, 2022 at 02:07:59PM +0800, Cai Huoqing wrote:
> [...]
> > diff --git a/drivers/gpu/drm/nvdla/nvdla_drv.c b/drivers/gpu/drm/nvdla/nvdla_drv.c
>
> I'll look at this from an architectural level and leave it to other
> experts to review the more technical things.
>
> [...]
> > +static struct nvdla_config nvdla_config_os_initial = {
> > + .atom_size = 32,
> > + .bdma_enable = true,
> > + .rubik_enable = true,
> > + .weight_compress_support = true,
> > +};
> > +
> > +static struct nvdla_config nvdla_config_small = {
> > + //.atom_size = 8,
> > + .atom_size = 32, // nv_large config
> > + .bdma_enable = false,
> > + .rubik_enable = false,
> > + .weight_compress_support = false,
> > +};
> > +
> [...]
> > +static union nvdla_operation_container operation_desc[NVDLA_OP_NUM][NVDLA_NUM_GROUPS];
> > +static union nvdla_surface_container surface_desc[NVDLA_OP_NUM][NVDLA_NUM_GROUPS];
> > +
> > +static struct nvdla_task_desc global_task;
> > +
> > +static struct nvdla_engine engine = {
> > + .processors[NVDLA_OP_BDMA] = {
> > + .name = "BDMA",
> > + .op_type = NVDLA_OP_BDMA,
> > + .program = nvdla_bdma_program,
> > + .enable = nvdla_bdma_enable,
> > + .set_producer = nvdla_bdma_set_producer,
> > + .is_ready = nvdla_bdma_is_ready,
> > + .dump_config = nvdla_bdma_dump_config,
> > + .rdma_check = nvdla_bdma_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_BDMA][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_BDMA][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_BDMA][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_BDMA][1],
> > + },
> > + },
> > + .processors[NVDLA_OP_CONV] = {
> > + .name = "Convolution",
> > + .op_type = NVDLA_OP_CONV,
> > + .program = nvdla_conv_program,
> > + .enable = nvdla_conv_enable,
> > + .set_producer = nvdla_conv_set_producer,
> > + .is_ready = nvdla_conv_is_ready,
> > + .dump_config = nvdla_conv_dump_config,
> > + .rdma_check = nvdla_conv_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_CONV][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_CONV][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_CONV][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_CONV][1],
> > + },
> > + },
> > + .processors[NVDLA_OP_SDP] = {
> > + .name = "SDP",
> > + .op_type = NVDLA_OP_SDP,
> > + .program = nvdla_sdp_program,
> > + .enable = nvdla_sdp_enable,
> > + .set_producer = nvdla_sdp_set_producer,
> > + .is_ready = nvdla_sdp_is_ready,
> > + .dump_config = nvdla_sdp_dump_config,
> > + .rdma_check = nvdla_sdp_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_SDP][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_SDP][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_SDP][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_SDP][1],
> > + },
> > + },
> > + .processors[NVDLA_OP_PDP] = {
> > + .name = "PDP",
> > + .op_type = NVDLA_OP_PDP,
> > + .program = nvdla_pdp_program,
> > + .enable = nvdla_pdp_enable,
> > + .set_producer = nvdla_pdp_set_producer,
> > + .is_ready = nvdla_pdp_is_ready,
> > + .dump_config = nvdla_pdp_dump_config,
> > + .rdma_check = nvdla_pdp_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_PDP][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_PDP][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_PDP][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_PDP][1],
> > + },
> > + },
> > + .processors[NVDLA_OP_CDP] = {
> > + .name = "CDP",
> > + .op_type = NVDLA_OP_CDP,
> > + .program = nvdla_cdp_program,
> > + .enable = nvdla_cdp_enable,
> > + .set_producer = nvdla_cdp_set_producer,
> > + .is_ready = nvdla_cdp_is_ready,
> > + .dump_config = nvdla_cdp_dump_config,
> > + .rdma_check = nvdla_cdp_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_CDP][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_CDP][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_CDP][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_CDP][1],
> > + },
> > + },
> > +
> > + .processors[NVDLA_OP_RUBIK] = {
> > + .name = "RUBIK",
> > + .op_type = NVDLA_OP_RUBIK,
> > + .program = nvdla_rubik_program,
> > + .enable = nvdla_rubik_enable,
> > + .set_producer = nvdla_rubik_set_producer,
> > + .is_ready = nvdla_rubik_is_ready,
> > + .dump_config = nvdla_rubik_dump_config,
> > + .rdma_check = nvdla_rubik_rdma_check,
> > + .consumer_ptr = 0,
> > + .roi_index = 0,
> > + .group_status = 0,
> > + .rdma_status = 0,
> > + .last_group = 1,
> > + .groups[0] = {
> > + .id = 0,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_RUBIK][0],
> > + .surface_desc = &surface_desc[NVDLA_OP_RUBIK][0],
> > + },
> > + .groups[1] = {
> > + .id = 1,
> > + .rdma_id = 0,
> > + .active = 0,
> > + .events = 0,
> > + .roi_index = 0,
> > + .is_rdma_needed = 0,
> > + .lut_index = -1,
> > + .operation_desc = &operation_desc[NVDLA_OP_RUBIK][1],
> > + .surface_desc = &surface_desc[NVDLA_OP_RUBIK][1],
> > + },
> > + },
> > +
> > +};
>
> These global variables aren't going to work because Tegra234 (Tegra194's
> successor) has two instances of NVDLA.
Small correction: I just recalled that even Tegra194 has two DLA
instances, so if we want both supported we'll need to get rid of those
global variables for that chip already.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-04-28 15:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 6:07 [PATCH v2 0/4] drm/nvdla: Add driver support for NVDLA Cai Huoqing
2022-04-26 6:07 ` [PATCH v2 1/4] MAINTAINERS: Add the driver info of the NVDLA Cai Huoqing
2022-04-26 6:07 ` [PATCH v2 2/4] drm/nvdla: Add driver support for NVDLA Cai Huoqing
2022-04-28 15:18 ` Thierry Reding
2022-04-28 15:19 ` Thierry Reding [this message]
2022-04-26 6:08 ` [PATCH v2 4/4] drm/nvdla/uapi: Add UAPI of NVDLA driver Cai Huoqing
2022-04-26 6:31 ` Christian König
2022-04-26 8:23 ` Cai Huoqing
2022-04-26 8:29 ` Christian König
2022-04-28 14:45 ` Thierry Reding
2022-04-29 3:58 ` Cai Huoqing
2022-04-26 10:50 ` [Linaro-mm-sig] " Arnd Bergmann
2022-04-26 12:24 ` Cai Huoqing
2022-04-26 12:38 ` Arnd Bergmann
2022-04-26 10:12 ` kernel test robot
2022-04-26 11:23 ` kernel test robot
2022-04-28 14:40 ` Thierry Reding
2022-04-28 14:10 ` [PATCH v2 0/4] drm/nvdla: Add driver support for NVDLA Thierry Reding
2022-04-28 15:56 ` Mikko Perttunen
2022-04-28 16:35 ` Jon Hunter
2022-04-29 3:37 ` Cai Huoqing
2022-04-29 3:28 ` Cai Huoqing
2022-05-02 17:04 ` Thierry Reding
2022-05-07 9:05 ` Cai Huoqing
[not found] ` <20220426060808.78225-4-cai.huoqing@linux.dev>
2022-04-28 14:31 ` [PATCH v2 3/4] drm/nvdla: Add register head file of NVDLA Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YmqwlbLcFgTDUpkX@orome \
--to=thierry.reding@gmail.com \
--cc=airlied@linux.ie \
--cc=cai.huoqing@linux.dev \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox