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 6/7] gpu: host1x: Use not explicitly sized types
Date: Fri, 18 May 2018 16:40:28 +0300 [thread overview]
Message-ID: <7ed863ea-c23b-c1cf-1d87-4d25dd3a8331@gmail.com> (raw)
In-Reply-To: <20180517153430.9602-7-thierry.reding@gmail.com>
On 17.05.2018 18:34, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> The number of words and the offset in a gather don't need to be
> explicitly sized, so make them unsigned int instead.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> drivers/gpu/host1x/job.c | 13 ++++++++-----
> drivers/gpu/host1x/job.h | 4 ++--
> include/linux/host1x.h | 4 ++--
> 3 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
> index 9d6d3e151291..1a8344dbdb2b 100644
> --- a/drivers/gpu/host1x/job.c
> +++ b/drivers/gpu/host1x/job.c
> @@ -96,13 +96,16 @@ void host1x_job_put(struct host1x_job *job)
> EXPORT_SYMBOL(host1x_job_put);
>
> void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
> - u32 words, u32 offset)
> + unsigned int words, unsigned int offset)
> {
> - struct host1x_job_gather *cur_gather = &job->gathers[job->num_gathers];
> + struct host1x_job_gather *gather = &job->gathers[job->num_gathers];
> +
> + WARN_ON(job->num_gathers >= job->num_cmdbufs);
> +
> + gather->words = words;
> + gather->bo = bo;
> + gather->offset = offset;
>
> - cur_gather->words = words;
> - cur_gather->bo = bo;
> - cur_gather->offset = offset;
> job->num_gathers++;
> }
> EXPORT_SYMBOL(host1x_job_add_gather);
> diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h
> index 4bda51d503ec..188400e00192 100644
> --- a/drivers/gpu/host1x/job.h
> +++ b/drivers/gpu/host1x/job.h
> @@ -20,10 +20,10 @@
> #define __HOST1X_JOB_H
>
> struct host1x_job_gather {
> - u32 words;
> + unsigned int words;
> dma_addr_t base;
> struct host1x_bo *bo;
> - u32 offset;
> + unsigned int offset;
> bool handled;
> };
>
> diff --git a/include/linux/host1x.h b/include/linux/host1x.h
> index dcb6140d39d7..89110d896d72 100644
> --- a/include/linux/host1x.h
> +++ b/include/linux/host1x.h
> @@ -251,8 +251,8 @@ struct host1x_job {
>
> struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
> u32 num_cmdbufs, u32 num_relocs);
> -void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *mem_id,
> - u32 words, u32 offset);
> +void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
> + unsigned int words, unsigned int offset);
> struct host1x_job *host1x_job_get(struct host1x_job *job);
> void host1x_job_put(struct host1x_job *job);
> int host1x_job_pin(struct host1x_job *job, struct device *dev);
>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-05-18 13:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 15:34 [PATCH 0/7] gpu: host1x: Preparation work for destaging ABI Thierry Reding
2018-05-17 15:34 ` [PATCH 1/7] gpu: host1x: Remove wait check support Thierry Reding
2018-05-18 13:07 ` Dmitry Osipenko
2018-05-17 15:34 ` [PATCH 2/7] gpu: host1x: Store pointer to client in jobs Thierry Reding
2018-05-18 17:35 ` Dmitry Osipenko
2018-05-17 15:34 ` [PATCH 3/7] gpu: host1x: Cleanup loop variable usage Thierry Reding
2018-05-18 13:36 ` Dmitry Osipenko
2018-05-17 15:34 ` [PATCH 4/7] gpu: host1x: Drop unnecessary host1x argument Thierry Reding
2018-05-18 13:39 ` Dmitry Osipenko
2018-05-17 15:34 ` [PATCH 5/7] gpu: host1x: Rename relocarray -> relocs for consistency Thierry Reding
2018-05-18 13:40 ` Dmitry Osipenko
2018-05-17 15:34 ` [PATCH 6/7] gpu: host1x: Use not explicitly sized types Thierry Reding
2018-05-18 13:40 ` Dmitry Osipenko [this message]
2018-05-17 15:34 ` [PATCH 7/7] gpu: host1x: Track client version Thierry Reding
2018-05-18 12:21 ` Mikko Perttunen
2018-05-18 12:39 ` Thierry Reding
2018-05-18 12:51 ` Mikko Perttunen
2018-05-18 15:59 ` Dmitry Osipenko
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=7ed863ea-c23b-c1cf-1d87-4d25dd3a8331@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;
as well as URLs for NNTP newsgroup(s).