Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715651

Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection

From Dmitry Osipenko <digetx@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection
Date 2017-08-19 14:10 +0200
Message-ID <ugaJI-19w-9@gated-at.bofh.it> (permalink)
References <ufSa6-69c-3@gated-at.bofh.it> <ufSa6-69c-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 18.08.2017 19:15, Mikko Perttunen wrote:
> Since Tegra186 the Host1x hardware allows syncpoints to be assigned to
> specific channels, preventing any other channels from incrementing
> them.
> 
> Enable this feature where available and assign syncpoints to channels
> when submitting a job. Syncpoints are currently never unassigned from
> channels since that would require extra work and is unnecessary with
> the current channel allocation model.
> 
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> ---
[snip]
> diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
> index 048ac9e344ce..fe4d963b3e2a 100644
> --- a/drivers/gpu/host1x/syncpt.c
> +++ b/drivers/gpu/host1x/syncpt.c
> @@ -398,6 +398,8 @@ int host1x_syncpt_init(struct host1x *host)
>  	for (i = 0; i < host->info->nb_pts; i++) {
>  		syncpt[i].id = i;
>  		syncpt[i].host = host;
> +
> +		host1x_hw_syncpt_assign_channel(host, &syncpt[i], NULL);
>  	}

What about to factor out that assignment and add a comment, something like this:

/* clear syncpoint-channel assignments on Tegra186+ */
for (i = 0; i < host->info->nb_pts; i++)
	host1x_hw_syncpt_assign_channel(host, &syncpt[i], NULL);

And maybe even add an inline function for clarity, like:

static inline void host1x_hw_syncpt_deassign_channel(struct host1x *host,
						     struct host1x_syncpt *sp)
{
	return host->syncpt_op->assign_channel(sp, NULL);
}

-- 
Dmitry

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] Miscellaneous improvements to Host1x and TegraDRM Mikko Perttunen <mperttunen@nvidia.com> - 2017-08-18 18:20 +0200
  [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Mikko Perttunen <mperttunen@nvidia.com> - 2017-08-18 18:20 +0200
    Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 00:40 +0200
      Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-19 10:20 +0200
        Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 12:20 +0200
          Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-19 12:40 +0200
            Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 13:20 +0200
              Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-19 13:40 +0200
                Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 14:00 +0200
    Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 14:10 +0200
    Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 18:20 +0200
    Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 19:00 +0200
    Re: [PATCH 1/4] gpu: host1x: Enable Tegra186 syncpoint protection Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 20:20 +0200
  [PATCH 2/4] gpu: host1x: Enable gather filter Mikko Perttunen <mperttunen@nvidia.com> - 2017-08-18 18:20 +0200
    Re: [PATCH 2/4] gpu: host1x: Enable gather filter Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 12:50 +0200
      Re: [PATCH 2/4] gpu: host1x: Enable gather filter Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-19 12:50 +0200
        Re: [PATCH 2/4] gpu: host1x: Enable gather filter Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 14:10 +0200
    Re: [PATCH 2/4] gpu: host1x: Enable gather filter Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 18:30 +0200
      Re: [PATCH 2/4] gpu: host1x: Enable gather filter Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 18:50 +0200
        Re: [PATCH 2/4] gpu: host1x: Enable gather filter Dmitry Osipenko <digetx@gmail.com> - 2017-08-20 19:00 +0200
          Re: [PATCH 2/4] gpu: host1x: Enable gather filter Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-21 19:30 +0200
            Re: [PATCH 2/4] gpu: host1x: Enable gather filter Mikko Perttunen <cyndis@kapsi.fi> - 2017-08-21 19:30 +0200
  [PATCH 3/4] gpu: host1x: Improve debug disassembly formatting Mikko Perttunen <mperttunen@nvidia.com> - 2017-08-18 18:20 +0200
    Re: [PATCH 3/4] gpu: host1x: Improve debug disassembly formatting Dmitry Osipenko <digetx@gmail.com> - 2017-08-19 00:00 +0200

csiph-web