All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mikko Perttunen <cyndis-/1wQRMveznE@public.gmane.org>,
	Mikko Perttunen
	<mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/2] gpu: host1x: Don't fail on NULL bo physical address
Date: Wed, 2 Aug 2017 14:29:08 +0300	[thread overview]
Message-ID: <6b73ec8a-0875-dfbb-fe3e-cd0ed615d5df@gmail.com> (raw)
In-Reply-To: <bada917f-10ed-cdf1-baeb-167fb38ec617-/1wQRMveznE@public.gmane.org>

On 02.08.2017 14:16, Mikko Perttunen wrote:
> On 08/02/2017 02:06 PM, Dmitry Osipenko wrote:
>> On 02.08.2017 12:55, Mikko Perttunen wrote:
>>> Pinning a Host1x BO currently cannot fail and zero is a valid address
>>> for a BO when IOMMU is enabled. To avoid false errors remove checks
>>> for NULL BO physical addresses.
>>>
>>> Fixes: 404bfb78daf3 ("gpu: host1x: Add IOMMU support")
>>> Signed-off-by: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> ---
>>>   drivers/gpu/host1x/job.c | 8 --------
>>>   1 file changed, 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
>>> index bee504406cfc..db509ab8874e 100644
>>> --- a/drivers/gpu/host1x/job.c
>>> +++ b/drivers/gpu/host1x/job.c
>>> @@ -197,10 +197,6 @@ static unsigned int pin_job(struct host1x *host, struct
>>> host1x_job *job)
>>>           }
>>>             phys_addr = host1x_bo_pin(reloc->target.bo, &sgt);
>>> -        if (!phys_addr) {
>>> -            err = -EINVAL;
>>> -            goto unpin;
>>> -        }
>>>             job->addr_phys[job->num_unpins] = phys_addr;
>>>           job->unpins[job->num_unpins].bo = reloc->target.bo;
>>> @@ -225,10 +221,6 @@ static unsigned int pin_job(struct host1x *host, struct
>>> host1x_job *job)
>>>           }
>>>             phys_addr = host1x_bo_pin(g->bo, &sgt);
>>> -        if (!phys_addr) {
>>> -            err = -EINVAL;
>>> -            goto unpin;
>>> -        }
>>>             if (!IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL) && host->domain) {
>>>               for_each_sg(sgt->sgl, sg, sgt->nents, j)
>>>
>>
>> I think 'Fixes' tag isn't really needed for this patch since it's not a bug fix,
>> but a cleanup.
>>
>> Reviewed-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
> 
> Actually without this, host1x_test fails for me on the first try on TX1 :) So
> it's a bugfix.

Right, my bad.

> 
> Thanks for the reviews and tests.
> 

I haven't tested this patch, only the the second because I've tested it on top
of grate's kernel which has a conflicting patch being applied.

-- 
Dmitry

  parent reply	other threads:[~2017-08-02 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-02  9:55 [PATCH 1/2] gpu: host1x: Don't fail on NULL bo physical address Mikko Perttunen
     [not found] ` <20170802095505.27250-1-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-08-02  9:55   ` [PATCH 2/2] gpu: host1x: Fix bitshift/mask multipliers Mikko Perttunen
     [not found]     ` <20170802095505.27250-2-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2017-08-02 11:06       ` Dmitry Osipenko
2017-08-17 15:31       ` Thierry Reding
2017-08-02 11:06   ` [PATCH 1/2] gpu: host1x: Don't fail on NULL bo physical address Dmitry Osipenko
     [not found]     ` <523b922e-e29c-ab49-2fb6-9f24f33971d4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-02 11:16       ` Mikko Perttunen
     [not found]         ` <bada917f-10ed-cdf1-baeb-167fb38ec617-/1wQRMveznE@public.gmane.org>
2017-08-02 11:29           ` Dmitry Osipenko [this message]
2017-08-17 15:30   ` 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=6b73ec8a-0875-dfbb-fe3e-cd0ed615d5df@gmail.com \
    --to=digetx-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cyndis-/1wQRMveznE@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.