Chromakey is a simple way of video overlay overlap implementation. This
patch adds 2 new IOCTL's: first - sets color key and is common across of
all Tegra SoC's, second - sets plane blending controls and allows to
utilize the color key, this one is exclusive to Tegra20/30.
Signed-off-by: Dmitry
On 02.09.2016 18:51, Thierry Reding wrote:
> On Fri, Sep 02, 2016 at 05:32:19PM +0200, Thierry Reding wrote:
>> On Fri, Sep 02, 2016 at 12:33:42PM +0300, Dmitry Osipenko wrote:
>>> Chromakey is a simple way of video overlay overlap implementation. This
>>> patch adds
address.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/tegra/dc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 39940f5..a98dd3e 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
Overlay plane should be clipped, otherwise overlay output gets distorted
once plane crosses display boundary. As a "side effect" this patch also
adds a sanity check for the primary plane, insuring that it covers whole
display area.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/
Add guard to check whether RGB output is already enabled in the way it's
done for HDMI output. Fixes possible hang on trying to disable output twice
(first time during driver probe and second on fb registering).
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/tegra/rgb.c | 11 +++
1
11.02.2014 23:13, Erik Faye-Lund ?:
> On Tue, Feb 11, 2014 at 6:12 PM, Dmitry Osipenko wrote:
>> Add guard to check whether RGB output is already enabled in the way it's
>> done for HDMI output. Fixes possible hang on trying to disable output twice
>> (first tim
28.06.2015 22:27, Dmitry Osipenko пиÑеÑ:
> MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
> owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
> value, while unshifted should be used. Fix it by changing '_F' to '_V'.
>
> Signed
MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
value, while unshifted should be used. Fix it by changing '_F' to '_V'.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/host1x/hw/debug_hw.c
25.03.2015 11:59, Tomeu Vizoso пиÑеÑ:
> As there isn't a way for the firmware on the Nyan chromebooks to hand
> over the display to the kernel, and the kernel isn't redoing the whole
> configuration at present.
>
> With this patch, the SOR is brought to a known state and we get correct
>
Panel DPMS got broken after adding support for atomic modesetting.
Fix it by making RGB output use of generic atomic DPMS helpers.
Signed-off-by: Dmitry Osipenko
---
drivers/gpu/drm/tegra/rgb.c | 49 -
1 file changed, 17 insertions(+), 32 deletions
On 11.08.2017 20:59, Thierry Reding wrote:
> From: Dmitry Osipenko <dig...@gmail.com>
>
> Since DRM IOCTL's are lockless, there is a chance that BOs could be
> released while a job submission is in progress. To avoid that, keep the
> GEM reference until the job has been
On 11.08.2017 21:16, Dmitry Osipenko wrote:
> On 11.08.2017 20:59, Thierry Reding wrote:
>> From: Dmitry Osipenko <dig...@gmail.com>
>>
>> Since DRM IOCTL's are lockless, there is a chance that BOs could be
>> released while a job submission is in progress. To avoi
On 11.08.2017 20:59, Thierry Reding wrote:
> From: Dmitry Osipenko <dig...@gmail.com>
>
> Since DRM IOCTL's are lockless, there is a chance that BOs could be
> released while a job submission is in progress. To avoid that, keep the
> GEM reference until the job has been
/hw/syncpt_hw.c
> b/drivers/gpu/host1x/hw/syncpt_hw.c
> index c93f74fcce72..7b0270d60742 100644
> --- a/drivers/gpu/host1x/hw/syncpt_hw.c
> +++ b/drivers/gpu/host1x/hw/syncpt_hw.c
> @@ -89,7 +89,7 @@ static int syncpt_cpu_incr(struct host1x_syncpt *sp)
> host1x_syncpt_idle(sp))
>
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
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
regressions
spotted on Tegra20.
Reviewed-by: Dmitry Osipenko <dig...@gmail.com>
Tested-by: Dmitry Osipenko <dig...@gmail.com>
--
Dmitry
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Do gathers coping before patching them, so the original gathers are left
untouched. That's not as bad as leaking a kernel addresses, but still
doesn't feel right.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 46 ++-
On 14.05.2017 15:27, Mikko Perttunen wrote:
> On 05/12/2017 10:29 PM, Dmitry Osipenko wrote:
>> If command buffer claims a number of words that is higher than its BO can
>> fit and a relocation lays past the BO, a kernel OOPS will be fired on that
>> relocation address patchin
The client ID 0 is reserved by the host1x/cdma to mark the timeout timer
work as already been scheduled and context ID is used as the clients one.
This fixes spurious CDMA timeouts.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osi
On 12.05.2017 22:29, Dmitry Osipenko wrote:
> If command buffer claims a number of words that is higher than its BO can
> fit and a relocation lays past the BO, a kernel OOPS will be fired on that
> relocation address patching. This was triggered by an opentegra Xorg driver
> that
On 14.05.2017 14:53, Mikko Perttunen wrote:
> On 05/12/2017 10:00 PM, Dmitry Osipenko wrote:
>> The start = 0 is invalid and causes weird CDMA channel timeouts, presumably
>> some memory misuse/corruption is going on.
>
> What makes you think start = 0 is invalid? I can't
.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 5f5f8ee6143d..d9933828fe87 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/
On 14.05.2017 16:02, Dmitry Osipenko wrote:
> On 14.05.2017 14:53, Mikko Perttunen wrote:
>> On 05/12/2017 10:00 PM, Dmitry Osipenko wrote:
>>> The start = 0 is invalid and causes weird CDMA channel timeouts, presumably
>>> some memory misuse/corruption is going on.
On 14.05.2017 15:56, Mikko Perttunen wrote:
>
>
> On 05/14/2017 03:45 PM, Dmitry Osipenko wrote:
>> On 14.05.2017 15:27, Mikko Perttunen wrote:
>>> On 05/12/2017 10:29 PM, Dmitry Osipenko wrote:
>>>> If command buffer claims a number of words tha
)
[] (tegra_submit) from [] (drm_ioctl+0x1e4/0x3ec)
[] (drm_ioctl) from [] (do_vfs_ioctl+0x9c/0x8e4)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
This fixes an OOPS in case of out-of-bounds accessing of a kmap'ed commands
buffer CMA while patching relocations in do_relocs().
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/gem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/tegra/g
On 16.05.2017 11:10, Mikko Perttunen wrote:
>
>
> On 16.05.2017 10:32, Erik Faye-Lund wrote:
>> On Tue, May 16, 2017 at 8:56 AM, Mikko Perttunen <cyn...@kapsi.fi> wrote:
>>> On 14.05.2017 23:47, Dmitry Osipenko wrote:
>>>>
>>>> If commands b
On 14.05.2017 23:47, Dmitry Osipenko wrote:
> /* copy and resolve relocations from submit */
> while (num_relocs--) {
> + struct host1x_reloc *reloc;
> + struct tegra_bo *obj;
> +
> err = host1x_reloc_copy_from_user(>
On 14.05.2017 23:47, Dmitry Osipenko wrote:
> This fixes an OOPS in case of out-of-bounds accessing of a kmap'ed commands
> buffer CMA while patching relocations in do_relocs().
>
> Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
> ---
> drivers/gpu/drm/tegra/gem.c | 3
The RESTART opcode terminates the gather and restarts the CDMA fetch from
a specified word << 2 relative to the CDMA start address. That shouldn't
be allowed to be done by userspace.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 1 -
1 file changed
On 16.05.2017 09:56, Mikko Perttunen wrote:
> On 14.05.2017 23:47, Dmitry Osipenko wrote:
>> +if (reloc->cmdbuf.offset & 3 ||
>> +reloc->cmdbuf.offset > obj->gem.size) {
>
> This could still fail if the bo's size is not divisible by 4
The start = 0 is invalid and causes weird CDMA channel timeouts, presumably
some memory misuse/corruption is going on.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.
Commit bdd2f9cd ("Don't leak kernel pointer to userspace") added a mutex
around staging IOCTL's, some of those mutexes are taken twice.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
driver
)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/drm.c b/drive
)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
v2: Take into account the cmdbuf.offset
drivers/gpu/drm/tegra/drm.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff
On 12.05.2017 22:06, Erik Faye-Lund wrote:
> On Fri, May 12, 2017 at 9:02 PM, Dmitry Osipenko <dig...@gmail.com> wrote:
>> + if (cmdbuf.words * 4 > gem->size) {
>
> Shouldn't this be "cmdbuf.offset + cmdbuf.words * 4 > gem->size"?
>
S
On 20.03.2017 21:44, Mikko Perttunen wrote:
> This is largely a rewrite of the Host1x channel allocation
> code in channel.c, bringing several changes:
>
> - The previous code could deadlock due to an interaction
> between the 'reflock' mutex and CDMA timeout handling.
> This gets rid of the
On 18.05.2017 14:55, Mikko Perttunen wrote:
> On 18.05.2017 14:42, Dmitry Osipenko wrote:
>> On 20.03.2017 21:44, Mikko Perttunen wrote:
>>> ...
>>> struct host1x_channel *host1x_channel_request(struct device *dev)
>>> {
>>> stru
upport for more than 32 channels, required for Tegra186
- General refactoring, including better encapsulation
of channel ownership handling into channel.c
Signed-off-by: Mikko Perttunen <mperttu...@nvidia.com>
Reviewed-by: Dmitry Osipenko <dig...@gmail.com>
Tested-by: Dmitry Osipenko
work.
Let's forbid it in the firewall till a proper validation is implemented.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 190353944d23..1a1568
Commit bdd2f9cd ("Don't leak kernel pointer to userspace") added a mutex
around staging IOCTL's, some of those mutexes are taken twice.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by
Hello,
I have already sent some of the patches contained in this series and some
of them got reviews. Later I added couple more patches and the dependencies
started to form, so please ignore all the patches I sent before this series.
The patches without r-b signatures require a review.
Dmitry
This fixes an OOPS in case of out-of-bounds accessing of a kmap'ed cmdbuf
(non-IOMMU allocation) while patching the relocations in do_relocs().
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/gem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/g
In case of invalid syncpoint ID, the host1x_syncpt_get() returns NULL and
none of its users perform a check of the returned pointer later. Let's bail
out until it's too late.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.c | 9 +
1 file chan
The struct host1x_cmdbuf is unused, let's remove it.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h
index 0debd93a1849..4bda51d503ec 100644
--- a/d
t is done for the registers / class checks, i.e.
compare the per address register shift value. I suppose those registers are
documented somewhere(TRM), could you please point me to them (TRM page, reg
name)?
> On 23.05.2017 03:14, Dmitry Osipenko wrote:
>> Incorrectly shifted relocation address
On 23.05.2017 03:39, Erik Faye-Lund wrote:
> On Tue, May 23, 2017 at 2:14 AM, Dmitry Osipenko <dig...@gmail.com> wrote:
>> Several channels could be made to write the same unit concurrently via the
>> SETCLASS opcode, trusting userspace is a bad idea. It should be possib
On 23.05.2017 14:19, Mikko Perttunen wrote:
> On 23.05.2017 13:58, Dmitry Osipenko wrote:
>> On 23.05.2017 13:14, Mikko Perttunen wrote:
>>> Reloc shifts are implemented (see assignment of u32 reloc_addr in
>>> do_relocs),
>>> and they
There is no host1x_cdma_stop() in the code, let's remove its definition
from the header file.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/cdma.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/host1x/cdma.h b/drivers/gpu/host1x/cdma.h
/0x510)
[] (tegra_drm_submit) from [] (tegra_submit+0x50/0x6c)
[] (tegra_submit) from [] (drm_ioctl+0x1e4/0x3ec)
[] (drm_ioctl) from [] (do_vfs_ioctl+0x9c/0x8e4)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Signed-off-by: Dmitry Osipenko <
On Tegra20 if plane has width or height equal to 0, it will be infinitely
wide or tall. Let's disable the plane if it is invisible on atomic state
committing to fix the issue. The Rockchip DRM driver does the same.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegr
The waitchecks along with multiple syncpoints per submit are not ready for
use yet, let's forbid them for now.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.c | 60 ++---
drivers/gpu/host1x/job.h| 7 --
i
, but
it will be much more work. Let's forbid the unit-unrelated class changes for
now.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.c | 1 +
drivers/gpu/drm/tegra/drm.h | 1 +
drivers/gpu/drm/tegra/gr2d.c | 12
drivers/gpu/host1x/job.c
, like mmap'ing of a fallback memory allocation and using its GART
aperture for an accelerated graphics operation.
This reverts commit c7e3ca515e784a82223f447b79eb2090bdb91378.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/iommu/tegra-gart.c | 2 +-
1 file changed, 1 insertion
Do gathers coping before patching them, so the original gathers are left
untouched. That's not as bad as leaking a kernel addresses, but still
doesn't feel right.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 44 ++---
The framebuffers console fbcon_startup() increments the tegra_drm module
'use' refcount via try_module_get(), causing an interlock of the DRM subsys
and the tegra_drm modules. In result, the tegra_drm module can't be unloaded
using rmmod.
Signed-off-by: Dmitry Osipenko <dig...@gmail.
The RESTART opcode terminates the gather and restarts the CDMA fetching from
a specified word << 2 relative to the CDMA start address. That shouldn't be
allowed to be done by userspace.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusm
nteraction
with the resets for now as a workaround.
Fixes: 33a8eb8d40ee ("drm/tegra: dc: Implement runtime PM")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/dc.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dc
.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/host1x/job.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 5f5f8ee6143d..d993382
The client ID 0 is reserved by the host1x/cdma to mark the timeout timer
work as already been scheduled and context ID is used as the clients one.
This fixes spurious CDMA timeouts.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osi
There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU
provider.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/drm.c | 5 -
drivers/gpu/host1x/dev.c| 5 -
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/g
On Tegra20 an overlay plane should be clipped, otherwise its output is
distorted once plane crosses display boundary.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/drm/tegra/dc.c | 29 +
1 file changed, 21 insertions(+), 8 deletions(-)
diff
Check waits in the firewall in a way it is done for relocations.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 36 ++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/
In case of relocations / waitchecks patching failure the jobs pins stay
referenced till DRM file get closed, wasting memory. Add the missed
unpinning.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
---
drivers/gpu/host1x/job.c | 16 +++-
1 file changed, 7 insertions
On 01.06.2017 20:39, Mikko Perttunen wrote:
> Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
>
> On 05/23/2017 03:14 AM, Dmitry Osipenko wrote:
>> Incorrectly shifted relocation address will cause a lower memory corruption
>> and likely a hang on a write or
On 01.06.2017 21:51, Mikko Perttunen wrote:
> On 06/01/2017 09:44 PM, Dmitry Osipenko wrote:
>> On 01.06.2017 21:37, Dmitry Osipenko wrote:
>>> On 01.06.2017 20:39, Mikko Perttunen wrote:
>>>> Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
>>>&
On 01.06.2017 21:01, Mikko Perttunen wrote:
> On 05/23/2017 03:14 AM, Dmitry Osipenko wrote:
>> This fixes an OOPS in case of out-of-bounds accessing of a kmap'ed cmdbuf
>> (non-IOMMU allocation) while patching the relocations in do_relocs().
>>
>> Signed-off-by: Dmitry
On 01.06.2017 21:37, Dmitry Osipenko wrote:
> On 01.06.2017 20:39, Mikko Perttunen wrote:
>> Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
>>
>> On 05/23/2017 03:14 AM, Dmitry Osipenko wrote:
>>> Incorrectly shifted relocation address will cause a lo
On 23.05.2017 03:16, Dmitry Osipenko wrote:
> There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU
> provider.
>
> Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
> ---
> drivers/gpu/drm/tegra/drm.c | 5 -
> drivers/gpu/host1x/dev.c| 5
On 01.06.2017 20:46, Mikko Perttunen wrote:
> With the simplification below and the is_addr_reg change mentioned,
>
> Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
>
> On 05/23/2017 03:14 AM, Dmitry Osipenko wrote:
>> Several channels could be made to write the
On 30.05.2017 12:21, Joerg Roedel wrote:
> On Tue, May 23, 2017 at 03:16:32AM +0300, Dmitry Osipenko wrote:
>> There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU
>> provider.
>>
>> Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
>>
On 14.06.2017 09:50, Mikko Perttunen wrote:
> On 14.06.2017 02:15, Dmitry Osipenko wrote:
>> Incorrectly shifted relocation address will cause a lower memory corruption
>> and likely a hang on a write or a read of an arbitrary data in case of IOMMU
>> absent. As o
.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
---
drivers/gpu/host1x/job.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/host1x/job.c b/
In case of invalid syncpoint ID, the host1x_syncpt_get() returns NULL and
none of its users perform a check of the returned pointer later. Let's bail
out until it's too late.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
The waitchecks along with multiple syncpoints per submit are not ready for
use yet, let's forbid them for now.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/drm/tegr
, but
it will be much more work. Let's forbid the unit-unrelated class changes for
now.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/drm/tegra/drm.c | 1 +
dri
The client ID 0 is reserved by the host1x/cdma to mark the timeout timer
work as already been scheduled and context ID is used as the clients one.
This fixes spurious CDMA timeouts.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osi
On 14.06.2017 14:47, Mikko Perttunen wrote:
>
>
> On 14.06.2017 12:06, Dmitry Osipenko wrote:
>> On 14.06.2017 09:50, Mikko Perttunen wrote:
>>> On 14.06.2017 02:15, Dmitry Osipenko wrote:
>>>> Incorrectly shifted relocation address will cause a lower memo
On Tegra20 if plane has width or height equal to 0, it will be infinitely
wide or tall. Let's disable the plane if it is invisible on atomic state
committing to fix the issue. The Rockchip DRM driver does the same.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Fay
"drm/tegra: dc: Implement runtime PM")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
---
drivers/gpu/drm/tegra/dc.c | 30 +-
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/
)
performance indistinguishable with/without the firewall.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
---
drivers/gpu/host1x/job.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/ho
Commit bdd2f9cd ("Don't leak kernel pointer to userspace") added a mutex
around staging IOCTL's, some of those mutexes are taken twice.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by
On 14.06.2017 10:56, Erik Faye-Lund wrote:
> On Wed, Jun 14, 2017 at 1:16 AM, Dmitry Osipenko <dig...@gmail.com> wrote:
>> The blocking gather copy allocation is a major performance downside of the
>> Host1x firewall, it may take hundreds milliseconds which is unacceptable
The RESTART opcode terminates the gather and restarts the CDMA fetching from
a specified word << 2 relative to the CDMA start address. That shouldn't be
allowed to be done by userspace.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmai
On 14.06.2017 13:22, Dmitry Osipenko wrote:
> On 14.06.2017 10:39, Erik Faye-Lund wrote:
>> On Wed, Jun 14, 2017 at 1:15 AM, Dmitry Osipenko <dig...@gmail.com> wrote:
>>> There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU
>>> provider.
>&
nt.
All the patches got a r-b, series should be good to go.
Dmitry Osipenko (19):
drm/tegra: Fix lockup on a use of staging API
drm/tegra: Correct idr_alloc() minimum id
drm/tegra: Check for malformed offsets and sizes in the 'submit' IOCTL
drm/tegra: Correct copying of waitche
forbid shifts
in the firewall till a proper validation is implemented.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/host1x/job.c | 4
1 file changed, 4 i
On Tegra20 an overlay plane should be clipped, otherwise its output is
distorted once plane crosses display boundary.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
---
drivers/gpu/drm/tegra/dc.c | 29 +
Arguments of the .is_addr_reg() are swapped in the definition of the
function, that is quite confusing.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
include/linux/
/0x510)
[] (tegra_drm_submit) from [] (tegra_submit+0x50/0x6c)
[] (tegra_submit) from [] (drm_ioctl+0x1e4/0x3ec)
[] (drm_ioctl) from [] (do_vfs_ioctl+0x9c/0x8e4)
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c)
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c)
Signed-off-by: Dmitry Osipenko <
On 14.06.2017 10:39, Erik Faye-Lund wrote:
> On Wed, Jun 14, 2017 at 1:15 AM, Dmitry Osipenko <dig...@gmail.com> wrote:
>> There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU
>> provider.
>>
>> Signed-off-by: Dmitry Osipenko <dig...@gmail.
upport for more than 32 channels, required for Tegra186
- General refactoring, including better encapsulation
of channel ownership handling into channel.c
Signed-off-by: Mikko Perttunen <mperttu...@nvidia.com>
Reviewed-by: Dmitry Osipenko <dig...@gmail.com>
Tested-by: Dmitry Osipenko
Check waits in the firewall in a way it is done for relocations.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
---
drivers/gpu/host1x/job.c | 36 ++
Perform gathers coping before patching them, so that original gathers are
left untouched. That's not as bad as leaking kernel addresses, but still
doesn't feel right.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
driver
In case of relocations / waitchecks patching failure the jobs pins stay
referenced till DRM file get closed, wasting memory. Add the missed
unpinning.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttu
The struct host1x_cmdbuf is unused, let's remove it.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/host1x/job.h | 7 ---
1 file changed, 7 deleti
There is no host1x_cdma_stop() in the code, let's remove its definition
from the header file.
Signed-off-by: Dmitry Osipenko <dig...@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmab...@gmail.com>
Reviewed-by: Mikko Perttunen <mperttu...@nvidia.com>
---
drivers/gpu/host1x/cd
the firewall" patch has been
reworked to not break newer Tegra's.
Thanks to Erik, Mikko, Nicolas and Thierry for the reviews and suggestions.
Dmitry Osipenko (21):
drm/tegra: Fix lockup on a use of staging API
drm/tegra: Correct idr_alloc() minimum id
drm/tegra: Check for malformed
The client ID 0 is reserved by the host1x/cdma to mark the timeout timer
work as already been scheduled and context ID is used as the clients one.
This fixes spurious CDMA timeouts.
Fixes: bdd2f9cd10eb ("drm/tegra: Don't leak kernel pointer to userspace")
Signed-off-by: Dmitry Osi
1 - 100 of 2899 matches
Mail list logo