[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66cc8646-43d3-3fc8-c31d-d0d2efac505f@nvidia.com>
Date: Mon, 6 Apr 2020 09:12:10 -0700
From: Sowjanya Komatineni <skomatineni@...dia.com>
To: Dmitry Osipenko <digetx@...il.com>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <frankc@...dia.com>, <hverkuil@...all.nl>,
<sakari.ailus@....fi>, <helen.koike@...labora.com>
CC: <sboyd@...nel.org>, <linux-media@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v6 6/9] media: tegra: Add Tegra210 Video input driver
On 4/6/20 9:05 AM, Dmitry Osipenko wrote:
> External email: Use caution opening links or attachments
>
>
> 06.04.2020 18:35, Sowjanya Komatineni пишет:
> ...
>>>> + /* wait for syncpt counter to reach frame start event threshold */
>>>> + err = host1x_syncpt_wait(chan->frame_start_sp, thresh,
>>>> + TEGRA_VI_SYNCPT_WAIT_TIMEOUT, &value);
>>>> + if (err) {
>>>> + dev_err(&chan->video.dev,
>>>> + "frame start syncpt timeout: %d\n", err);
>>>> + /* increment syncpoint counter for timedout events */
>>>> + host1x_syncpt_incr(chan->frame_start_sp);
>>> Why incrementing is done while hardware is still active?
>>>
>>> The sync point's state needs to be completely reset after resetting
>>> hardware. But I don't think that the current upstream host1x driver
>>> supports doing that, it's one of the known-long-standing problems of the
>>> host1x driver.
>>>
>>> At least the sp->max_val incrementing should be done based on the actual
>>> syncpoint value and this should be done after resetting hardware.
>> upstream host1x driver don't have API to reset or to equalize max value
>> with min/load value.
>>
>> So to synchronize missed event, incrementing HW syncpt counter.
>>
>> This should not impact as we increment this in case of missed events only.
> It's wrong to touch sync point while hardware is active and it's active
> until being reset.
>
> You should re-check the timeout after hw resetting and manually put the
> syncpoint counter back into sync only if needed.
There is possibility of timeout to happen any time even during the
capture also and is not related to hw reset.
Manual synchronization is needed when timeout of any frame events happen
otherwise all subsequence frames will timeout due to mismatch in event
counters.
Powered by blists - more mailing lists