From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
Mikko Perttunen <mperttunen@nvidia.com>
Subject: Re: [PATCH 1/5] drm/tegra: Store parent pointer in Tegra DRM clients
Date: Wed, 23 Jan 2019 17:06:17 +0300 [thread overview]
Message-ID: <f2f3f7fc-d7bf-932f-3401-3aa21ff9f7c8@gmail.com> (raw)
In-Reply-To: <20190123093951.24908-2-thierry.reding@gmail.com>
23.01.2019 12:39, Thierry Reding пишет:
> From: Thierry Reding <treding@nvidia.com>
>
> Tegra DRM clients need access to their parent, so store a pointer to it
> upon registration.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> drivers/gpu/drm/tegra/drm.c | 2 ++
> drivers/gpu/drm/tegra/drm.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
> index 4b70ce664c41..61dcbd218ffc 100644
> --- a/drivers/gpu/drm/tegra/drm.c
> +++ b/drivers/gpu/drm/tegra/drm.c
> @@ -1041,6 +1041,7 @@ int tegra_drm_register_client(struct tegra_drm *tegra,
> {
> mutex_lock(&tegra->clients_lock);
> list_add_tail(&client->list, &tegra->clients);
> + client->drm = tegra;
> mutex_unlock(&tegra->clients_lock);
>
> return 0;
> @@ -1051,6 +1052,7 @@ int tegra_drm_unregister_client(struct tegra_drm *tegra,
> {
> mutex_lock(&tegra->clients_lock);
> list_del_init(&client->list);
> + client->drm = NULL;
> mutex_unlock(&tegra->clients_lock);
>
> return 0;
> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
> index f1763b4d5b5f..2c809755bca7 100644
> --- a/drivers/gpu/drm/tegra/drm.h
> +++ b/drivers/gpu/drm/tegra/drm.h
> @@ -88,6 +88,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
> struct tegra_drm_client {
> struct host1x_client base;
> struct list_head list;
> + struct tegra_drm *drm;
>
> unsigned int version;
> const struct tegra_drm_client_ops *ops;
>
There is no problem with retrieving of the parent from the clients base structure, hence either this patch could be dropped or please mention in the commit message that the "drm" pointer duplication is solely for helping with keeping code cleaner.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-01-23 14:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 9:39 [PATCH 0/5] drm/tegra: Fix IOVA space on Tegra186 and later Thierry Reding
2019-01-23 9:39 ` [PATCH 1/5] drm/tegra: Store parent pointer in Tegra DRM clients Thierry Reding
2019-01-23 14:06 ` Dmitry Osipenko [this message]
2019-01-23 9:39 ` [PATCH 2/5] drm/tegra: vic: Load firmware on demand Thierry Reding
2019-01-23 12:47 ` Dmitry Osipenko
2019-01-23 14:06 ` Thierry Reding
2019-01-23 14:19 ` Dmitry Osipenko
2019-01-23 9:39 ` [PATCH 3/5] drm/tegra: Setup shared IOMMU domain after initialization Thierry Reding
2019-01-23 14:55 ` Dmitry Osipenko
2019-01-23 16:28 ` Dmitry Osipenko
2019-01-23 9:39 ` [PATCH 4/5] drm/tegra: Restrict IOVA space to DMA mask Thierry Reding
2019-01-23 13:41 ` Dmitry Osipenko
2019-01-23 14:04 ` Thierry Reding
2019-01-23 14:33 ` Dmitry Osipenko
2019-01-23 15:55 ` Dmitry Osipenko
2019-01-23 19:42 ` Dmitry Osipenko
2019-01-24 10:24 ` Mikko Perttunen
2019-01-24 13:15 ` Dmitry Osipenko
2019-01-24 13:27 ` Mikko Perttunen
2019-01-24 13:51 ` Dmitry Osipenko
2019-01-24 18:08 ` Thierry Reding
2019-01-23 9:39 ` [PATCH 5/5] gpu: host1x: Supports 40-bit addressing on Tegra186 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=f2f3f7fc-d7bf-932f-3401-3aa21ff9f7c8@gmail.com \
--to=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=thierry.reding@gmail.com \
/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