Re: [PATCH] gpu: host1x: select CONFIG_SYNC_FILE

2021-07-23 Thread Mikko Perttunen
Hi Arnd, I think the best fix for this is to just remove that function -- it is currently not used anywhere. I posted a patch to do that, but Thierry is currently on vacation so it hasn't been picked up yet. thanks, Mikko On 7/23/21 12:14 PM, Arnd Bergmann wrote: From: Arnd Bergmann With

Re: [PATCH] gpu: host1x: select CONFIG_SYNC_FILE

2021-07-23 Thread Mikko Perttunen
On 7/23/21 12:17 PM, Mikko Perttunen wrote: Hi Arnd, I think the best fix for this is to just remove that function -- it is currently not used anywhere. I posted a patch to do that, but Thierry is currently on vacation so it hasn't been picked up yet. .. and sorry for the top post ..

Re: [PATCH v5 03/21] gpu: host1x: Show number of pending waiters in debugfs

2021-04-08 Thread Mikko Perttunen
On 4/8/21 7:25 AM, Michał Mirosław wrote: On Thu, Apr 08, 2021 at 06:13:44AM +0200, Michał Mirosław wrote: On Fri, Apr 02, 2021 at 07:02:32PM +0300, Dmitry Osipenko wrote: 02.04.2021 00:19, Michał Mirosław пишет: On Fri, Mar 26, 2021 at 04:34:13PM +0200, Mikko Perttunen wrote: On 3/23/21 12

[PATCH v2 2/3] arm64: tegra: Add NVDEC to Tegra186/194 device trees

2021-08-06 Thread Mikko Perttunen
Add a device tree node for NVDEC on Tegra186, and device tree nodes for NVDEC and NVDEC1 on Tegra194. Signed-off-by: Mikko Perttunen --- v2: * Add NVDECSRD1 memory client * Add also to T194 (both NVDEC0/1) --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 16 +++ arch/arm64/boot/dts/nvidia

[PATCH v2 0/3] NVIDIA Tegra NVDEC support

2021-08-06 Thread Mikko Perttunen
NVDEC hardware documentation can be found at https://github.com/NVIDIA/open-gpu-doc/tree/master/classes/video and example userspace can be found at https://github.com/cyndis/vaapi-tegra-driver Thanks, Mikko Mikko Perttunen (3): dt-bindings: Add YAML bindings for Host1x and NVDEC arm64: tegra

[PATCH v2 3/3] drm/tegra: Add NVDEC driver

2021-08-06 Thread Mikko Perttunen
Add support for booting and using NVDEC on Tegra210, Tegra186 and Tegra194 to the Host1x and TegraDRM drivers. Booting in secure mode is not currently supported. Signed-off-by: Mikko Perttunen --- v2: * Use devm_platform_get_and_ioremap_resource * Remove reset handling, done by power domain code

[PATCH v2 1/3] dt-bindings: Add YAML bindings for Host1x and NVDEC

2021-08-06 Thread Mikko Perttunen
L 1.2 +--- +$id: "http://devicetree.org/schemas/gpu/host1x/nvidia,tegra20-host1x.yaml#"; +$schema: "http://devicetree.org/meta-schemas/core.yaml#"; + +title: Device tree binding for NVIDIA Host1x + +maintainers: + - Thierry Reding + - Mikko Perttunen + +properties: + $nodename: +

Re: [PATCH v2 1/3] dt-bindings: Add YAML bindings for Host1x and NVDEC

2021-08-10 Thread Mikko Perttunen
On 10.8.2021 18.43, Thierry Reding wrote: On Fri, Aug 06, 2021 at 03:34:48PM +0300, Mikko Perttunen wrote: Convert the original Host1x bindings to YAML and add new bindings for NVDEC, now in a more appropriate location. The old text bindings for Host1x and engines are still kept at display

[PATCH v3 3/3] drm/tegra: Add NVDEC driver

2021-08-11 Thread Mikko Perttunen
Add support for booting and using NVDEC on Tegra210, Tegra186 and Tegra194 to the Host1x and TegraDRM drivers. Booting in secure mode is not currently supported. Signed-off-by: Mikko Perttunen --- v3: * Change num_instances to unsigned int * Remove unnecessary '= 0' initializer

[PATCH v3 1/3] dt-bindings: Add YAML bindings for NVDEC

2021-08-11 Thread Mikko Perttunen
Add YAML device tree bindings for NVDEC, now in a more appropriate place compared to the old textual Host1x bindings. Signed-off-by: Mikko Perttunen --- v3: * Drop host1x bindings * Change read2 to read-1 in interconnect names v2: * Fix issues pointed out in v1 * Add T194 nvidia,instance

[PATCH v3 0/3] NVIDIA Tegra NVDEC support

2021-08-11 Thread Mikko Perttunen
Here's the v3 of the NVDEC support series, containing minor fixes compared to v2. NVDEC hardware documentation can be found at https://github.com/NVIDIA/open-gpu-doc/tree/master/classes/video and example userspace can be found at https://github.com/cyndis/vaapi-tegra-driver Thanks, Mikko

[PATCH v3 2/3] arm64: tegra: Add NVDEC to Tegra186/194 device trees

2021-08-11 Thread Mikko Perttunen
Add a device tree node for NVDEC on Tegra186, and device tree nodes for NVDEC and NVDEC1 on Tegra194. Signed-off-by: Mikko Perttunen --- v3: * Change read2 to read-1 v2: * Add NVDECSRD1 memory client * Add also to T194 (both NVDEC0/1) --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 16

[PATCH] drm/tegra: vic: Use autosuspend

2021-08-11 Thread Mikko Perttunen
When going idle, it's not unlikely that more work will follow. As such, use autosuspend with a 500ms suspend delay. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/vic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/

Re: [PATCH v1 0/3] Tegra DRM and Host1x driver fixes

2021-08-17 Thread Mikko Perttunen
/tegra/dc.c | 3 --- drivers/gpu/drm/tegra/dc.h | 6 -- drivers/gpu/drm/tegra/uapi.c | 2 +- drivers/gpu/host1x/fence.c | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) Series Reviewed-by: Mikko Perttunen I went through the changes between v6 and v7 and from what I can tell

Re: [PATCH v3 1/3] dt-bindings: Add YAML bindings for NVDEC

2021-08-18 Thread Mikko Perttunen
On 8/18/21 12:20 AM, Rob Herring wrote: On Wed, Aug 11, 2021 at 01:50:28PM +0300, Mikko Perttunen wrote: Add YAML device tree bindings for NVDEC, now in a more appropriate place compared to the old textual Host1x bindings. Signed-off-by: Mikko Perttunen --- v3: * Drop host1x bindings * Change

Re: [PATCH v5 01/21] gpu: host1x: Use different lock classes for each client

2021-03-22 Thread Mikko Perttunen
On 22.3.2021 16.48, Dmitry Osipenko wrote: 22.03.2021 17:46, Thierry Reding пишет: On Mon, Jan 11, 2021 at 02:59:59PM +0200, Mikko Perttunen wrote: To avoid false lockdep warnings, give each client lock a different lock class, passed from the initialization site by macro. Signed-off-by: Mikko

Re: [PATCH v5 02/21] gpu: host1x: Allow syncpoints without associated client

2021-03-23 Thread Mikko Perttunen
On 3/23/21 12:10 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:00PM +0200, Mikko Perttunen wrote: Syncpoints don't need to be associated with any client, so remove the property, and expose host1x_syncpt_alloc. This will allow allocating syncpoints without prior knowledge of the e

Re: [PATCH v5 06/21] gpu: host1x: Cleanup and refcounting for syncpoints

2021-03-23 Thread Mikko Perttunen
On 3/23/21 12:36 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:04PM +0200, Mikko Perttunen wrote: Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use

Re: [PATCH v5 07/21] gpu: host1x: Introduce UAPI header

2021-03-23 Thread Mikko Perttunen
On 3/23/21 12:52 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:05PM +0200, Mikko Perttunen wrote: Add the userspace interface header, specifying interfaces for allocating and accessing syncpoints from userspace, and for creating sync_file based fences based on syncpoint thresholds

Re: [PATCH v5 08/21] gpu: host1x: Implement /dev/host1x device node

2021-03-23 Thread Mikko Perttunen
On 3/23/21 1:02 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:06PM +0200, Mikko Perttunen wrote: Add the /dev/host1x device node, implementing the following functionality: - Reading syncpoint values - Allocating syncpoints (providing syncpoint FDs) - Incrementing syncpoints (based on

Re: [PATCH v5 18/21] drm/tegra: Allocate per-engine channel in core code

2021-03-23 Thread Mikko Perttunen
On 3/23/21 2:35 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:16PM +0200, Mikko Perttunen wrote: To avoid duplication, allocate the per-engine shared channel in the core code instead. Once MLOCKs are implemented on Host1x side, we can also update this to avoid allocating a shared

Re: [PATCH v5 20/21] drm/tegra: Implement job submission part of new UAPI

2021-03-23 Thread Mikko Perttunen
On 3/23/21 3:38 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:18PM +0200, Mikko Perttunen wrote: Implement the job submission IOCTL with a minimum feature set. Signed-off-by: Mikko Perttunen --- v5: * Add 16K size limit to copies from userspace. * Guard RELOC_BLOCKLINEAR flag

Re: [PATCH v5 19/21] drm/tegra: Implement new UAPI

2021-03-23 Thread Mikko Perttunen
On 3/23/21 3:25 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:17PM +0200, Mikko Perttunen wrote: Implement the non-submission parts of the new UAPI, including channel management and memory mapping. The UAPI is under the CONFIG_DRM_TEGRA_STAGING config flag for now. Signed-off-by

Re: [PATCH v5 03/21] gpu: host1x: Show number of pending waiters in debugfs

2021-03-26 Thread Mikko Perttunen
On 3/23/21 12:16 PM, Thierry Reding wrote: On Mon, Jan 11, 2021 at 03:00:01PM +0200, Mikko Perttunen wrote: Show the number of pending waiters in the debugfs status file. This is useful for testing to verify that waiters do not leak or accumulate incorrectly. Signed-off-by: Mikko Perttunen

Re: [PATCH v5 01/21] gpu: host1x: Use different lock classes for each client

2021-03-26 Thread Mikko Perttunen
On 3/22/21 5:19 PM, Mikko Perttunen wrote: On 22.3.2021 16.48, Dmitry Osipenko wrote: 22.03.2021 17:46, Thierry Reding пишет: On Mon, Jan 11, 2021 at 02:59:59PM +0200, Mikko Perttunen wrote: To avoid false lockdep warnings, give each client lock a different lock class, passed from the

Re: [PATCH v5 01/21] gpu: host1x: Use different lock classes for each client

2021-03-26 Thread Mikko Perttunen
On 3/26/21 8:31 PM, Dmitry Osipenko wrote: 26.03.2021 17:54, Mikko Perttunen пишет: Lockdep doesn't seem to be liking dev_name() for the name, and I think allocating a string for this purpose seems a bit overkill, so I'll keep the lock name as is if there are no objections. What do

[PATCH v6 03/10] gpu: host1x: Show number of pending waiters in debugfs

2021-03-29 Thread Mikko Perttunen
Show the number of pending waiters in the debugfs status file. This is useful for testing to verify that waiters do not leak or accumulate incorrectly. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/debug.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH v6 00/10] Fixes and cleanups for Host1x

2021-03-29 Thread Mikko Perttunen
Hunter (1): gpu: host1x: Fix Tegra194 syncpt interrupt threshold Mikko Perttunen (9): gpu: host1x: Use different lock classes for each client gpu: host1x: Allow syncpoints without associated client gpu: host1x: Show number of pending waiters in debugfs gpu: host1x: Remove cancelled waiters

[PATCH v6 01/10] gpu: host1x: Use different lock classes for each client

2021-03-29 Thread Mikko Perttunen
To avoid false lockdep warnings, give each client lock a different lock class, passed from the initialization site by macro. Signed-off-by: Mikko Perttunen --- v6: - Update kerneldoc --- drivers/gpu/host1x/bus.c | 10 ++ include/linux/host1x.h | 9 - 2 files changed, 14

[PATCH v6 02/10] gpu: host1x: Allow syncpoints without associated client

2021-03-29 Thread Mikko Perttunen
Syncpoints don't need to be associated with any client, so remove the property, and expose host1x_syncpt_alloc. This will allow allocating syncpoints without prior knowledge of the engine that it will be used with. Signed-off-by: Mikko Perttunen --- v6: * Add kerneldoc * Return error if a

[PATCH v6 05/10] gpu: host1x: Use HW-equivalent syncpoint expiration check

2021-03-29 Thread Mikko Perttunen
syncpoint too many times -- then the hardware would trigger an interrupt, but the driver would assume that a syncpoint value greater than the syncpoint's max value is in the future, and not clean up the job. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/syncpt.c

[PATCH v6 09/10] gpu: host1x: Assign intr waiter inside lock

2021-03-29 Thread Mikko Perttunen
practice, there is currently no situation where this issue can manifest -- it was first noticed with the upcoming DMA fence implementation patches. As such this doesn't need to be backported. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/intr.c | 5 +++-- 1 file changed, 3 insertions(

[PATCH v6 04/10] gpu: host1x: Remove cancelled waiters immediately

2021-03-29 Thread Mikko Perttunen
Before this patch, cancelled waiters would only be cleaned up once their threshold value was reached. Make host1x_intr_put_ref process the cancellation immediately to fix this. Signed-off-by: Mikko Perttunen --- v6: * Call schedule instead of cpu_relax while waiting for pending interrupt

[PATCH v6 06/10] gpu: host1x: Cleanup and refcounting for syncpoints

2021-03-29 Thread Mikko Perttunen
Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use host1x_syncpt pointers instead. Signed-off-by: Mikko Perttunen --- v5: - Remove host1x_syncpt_put in submit code, as

[PATCH v6 07/10] gpu: host1x: Reset max value when freeing a syncpoint

2021-03-29 Thread Mikko Perttunen
With job recovery becoming optional, syncpoints may have a mismatch between their value and max value when freed. As such, when freeing, set the max value to the current value of the syncpoint so that it is in a sane state for the next user. Signed-off-by: Mikko Perttunen --- v3: * Use

[PATCH v6 08/10] gpu: host1x: Reserve VBLANK syncpoints at initialization

2021-03-29 Thread Mikko Perttunen
chips, reserve those two syncpoints at initialization, and only mark them free once the DC driver has indicated it's safe to do so. Signed-off-by: Mikko Perttunen --- v6: * Updated kerneldoc v3: * New patch --- drivers/gpu/drm/tegra/dc.c | 6 ++ drivers/gpu/host1x/dev.c| 6 ++ d

[PATCH v6 10/10] gpu: host1x: Fix Tegra194 syncpt interrupt threshold

2021-03-29 Thread Mikko Perttunen
downstream. Signed-off-by: Jon Hunter Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/hw_host1x07_vm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/hw/hw_host1x07_vm.h b/drivers/gpu/host1x/hw/hw_host1x07_vm.h index 3058b3c9a91d..b766851d5b83 100644

Re: [PATCH v6 04/10] gpu: host1x: Remove cancelled waiters immediately

2021-03-29 Thread Mikko Perttunen
On 3/29/21 11:27 PM, Dmitry Osipenko wrote: 29.03.2021 16:38, Mikko Perttunen пишет: Before this patch, cancelled waiters would only be cleaned up once their threshold value was reached. Make host1x_intr_put_ref process the cancellation immediately to fix this. Signed-off-by: Mikko Perttunen

Re: [PATCH v5 15/21] drm/tegra: Add new UAPI to header

2021-01-14 Thread Mikko Perttunen
On 1/14/21 10:36 AM, Dmitry Osipenko wrote: 13.01.2021 21:56, Mikko Perttunen пишет: On 1/13/21 8:14 PM, Dmitry Osipenko wrote: 11.01.2021 16:00, Mikko Perttunen пишет: +struct drm_tegra_submit_buf { +    /** + * @mapping_id: [in] + * + * Identifier of the mapping to use in the

Re: [PATCH v5 00/21] Host1x/TegraDRM UAPI

2021-01-25 Thread Mikko Perttunen
On 1/20/21 12:29 AM, Dmitry Osipenko wrote: 11.01.2021 15:59, Mikko Perttunen пишет: Hi all, here's the fifth revision of the Host1x/TegraDRM UAPI proposal, containing primarily small bug fixes. It has also been rebased on top of recent linux-next. vaapi-tegra-driver has been updat

Re: [PATCH v5 00/21] sync_file API is not very suitable for DRM

2021-01-27 Thread Mikko Perttunen
On 1/27/21 11:35 PM, Dmitry Osipenko wrote: 26.01.2021 05:45, Mikko Perttunen пишет: 4. Sync file shouldn't be needed for the part of DRM API which doesn't interact with external non-DRM devices.  We should use DRM syncobj for everything related to DRM, it's a superior API over

Re: [PATCH v5 00/21] Host1x/TegraDRM UAPI

2021-01-27 Thread Mikko Perttunen
On 1/27/21 11:26 PM, Dmitry Osipenko wrote: 26.01.2021 05:45, Mikko Perttunen пишет: 5. The hardware state of sync points should be reset when sync point is requested, not when host1x driver is initialized. This may be doable, but I don't think it is critical for this UAPI, so

Re: [PATCH v5 00/21] Host1x sync point UAPI should not be used for tracking DRM jobs

2021-01-28 Thread Mikko Perttunen
On 1/27/21 11:20 PM, Dmitry Osipenko wrote: 26.01.2021 05:45, Mikko Perttunen пишет: 2. We will probably need a dedicated drm_tegra_submit_cmd for sync point increments.  The job's sync point will be allocated dynamically when job is submitted.  We will need a fag for the sync_inc

Re: [PATCH v5 00/21] Host1x/TegraDRM UAPI

2021-01-28 Thread Mikko Perttunen
On 1/28/21 12:06 AM, Dmitry Osipenko wrote: 28.01.2021 00:57, Mikko Perttunen пишет: On 1/27/21 11:26 PM, Dmitry Osipenko wrote: 26.01.2021 05:45, Mikko Perttunen пишет: 5. The hardware state of sync points should be reset when sync point is requested, not when host1x driver is initialized

Re: [PATCH v5 00/21] Host1x sync point UAPI should not be used for tracking DRM jobs

2021-02-03 Thread Mikko Perttunen
On 1/29/21 7:30 PM, Dmitry Osipenko wrote: 28.01.2021 19:58, Thierry Reding пишет: On Thu, Jan 28, 2021 at 01:08:54PM +0200, Mikko Perttunen wrote: On 1/27/21 11:20 PM, Dmitry Osipenko wrote: 26.01.2021 05:45, Mikko Perttunen пишет: 2. We will probably need a dedicated drm_tegra_submit_cmd

[RFC PATCH 0/8] Host1x context isolation support

2021-02-08 Thread Mikko Perttunen
pdated the device tree bindings (or converted them to YAML) yet, so this is RFC for now. Thanks! Mikko Mikko Perttunen (8): of/device: Allow specifying a custom iommu_spec to of_dma_configure gpu: host1x: Add context bus gpu: host1x: Add context device management code gpu: host1x: Progra

[RFC PATCH 2/8] gpu: host1x: Add context bus

2021-02-08 Thread Mikko Perttunen
ned-off-by: Mikko Perttunen --- drivers/gpu/Makefile | 3 +-- drivers/gpu/host1x/Kconfig | 5 + drivers/gpu/host1x/Makefile| 1 + drivers/gpu/host1x/context_bus.c | 31 ++ include/linux/host1x_context_bus.h | 15 ++

[RFC PATCH 4/8] gpu: host1x: Program context stream ID on submission

2021-02-08 Thread Mikko Perttunen
that might do DMA using the new stream ID. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/channel_hw.c| 52 +-- drivers/gpu/host1x/hw/host1x06_hardware.h | 10 + drivers/gpu/host1x/hw/host1x07_hardware.h | 10 + include/linux/host1x.h

[RFC PATCH 8/8] drm/tegra: vic: Implement get_streamid_offset

2021-02-08 Thread Mikko Perttunen
Implement the get_streamid_offset required for supporting context isolation. Since old firmware cannot support context isolation without hacks that we don't want to implement, check the firmware binary to see if context isolation should be enabled. Signed-off-by: Mikko Perttunen --- driver

[RFC PATCH 1/8] of/device: Allow specifying a custom iommu_spec to of_dma_configure

2021-02-08 Thread Mikko Perttunen
. These contexts don't correspond to platform devices and are instead attached to dummy devices on a custom software bus. Signed-off-by: Mikko Perttunen --- drivers/iommu/of_iommu.c | 12 drivers/of/device.c | 9 + include/linux/of_device.h

[RFC PATCH 5/8] iommu/arm-smmu: Attach to host1x context device bus

2021-02-08 Thread Mikko Perttunen
Set itself as the IOMMU for the host1x context device bus, containing "dummy" devices used for Host1x context isolation. Signed-off-by: Mikko Perttunen --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/iommu/arm/ar

[RFC PATCH 7/8] drm/tegra: Support context isolation

2021-02-08 Thread Mikko Perttunen
For engines that support context isolation, allocate a context when opening a channel, and set up stream ID offset and context fields when submitting a job. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/drm.h | 1 + drivers/gpu/drm/tegra/uapi.h| 1 + drivers/gpu/drm

[RFC PATCH 3/8] gpu: host1x: Add context device management code

2021-02-08 Thread Mikko Perttunen
Add code to register context devices from device tree, allocate them out and manage their refcounts. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/Makefile | 1 + drivers/gpu/host1x/context.c | 161 +++ drivers/gpu/host1x/context.h | 27

[RFC PATCH 6/8] arm64: tegra: Add Host1x context stream IDs on Tegra186+

2021-02-08 Thread Mikko Perttunen
-off-by: Mikko Perttunen --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index c567aa65418b..25a8cb1a97a6 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186

Re: [RFC PATCH 1/8] of/device: Allow specifying a custom iommu_spec to of_dma_configure

2021-02-08 Thread Mikko Perttunen
On 2/8/21 6:38 PM, Mikko Perttunen wrote: ... -static int of_iommu_xlate(struct device *dev, - struct of_phandle_args *iommu_spec) +int of_iommu_xlate(struct device *dev, struct of_phandle_args *iommu_spec) ... +EXPORT_SYMBOL_GPL(of_iommu_xlate); These two chunks

[PATCH 3/3] drm/tegra: Add NVDEC driver

2021-02-13 Thread Mikko Perttunen
Add support for booting and using NVDEC on Tegra210, Tegra186 and Tegra194 to the Host1x and TegraDRM drivers. Booting in secure mode is not currently supported. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/Makefile | 3 +- drivers/gpu/drm/tegra/drm.c| 4 + drivers/gpu/drm

[PATCH 0/3] NVIDIA Tegra NVDEC support

2021-02-13 Thread Mikko Perttunen
-gpu-doc/tree/master/classes/video [2] https://github.com/cyndis/vaapi-tegra-driver Mikko Perttunen (3): dt-bindings: Add YAML bindings for Host1x and NVDEC arm64: tegra: Add NVDEC to Tegra186 device tree drm/tegra: Add NVDEC driver .../gpu/host1x/nvidia,tegra20-host1x.yaml | 129 + .

[PATCH 2/3] arm64: tegra: Add NVDEC to Tegra186 device tree

2021-02-13 Thread Mikko Perttunen
Add a device tree node for NVDEC on Tegra186. Signed-off-by: Mikko Perttunen --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 58c51965df47

[PATCH 1/3] dt-bindings: Add YAML bindings for Host1x and NVDEC

2021-02-13 Thread Mikko Perttunen
ost1x.yaml#"; +$schema: "http://devicetree.org/meta-schemas/core.yaml#"; + +title: Device tree binding for NVIDIA Host1x + +maintainers: + - Thierry Reding + - Mikko Perttunen + +properties: + $nodename: +pattern: "^host1x@[0-9a-f]*$" + + compatible: +oneOf: +

Re: [RFC PATCH 1/8] of/device: Allow specifying a custom iommu_spec to of_dma_configure

2021-02-16 Thread Mikko Perttunen
On 2/16/21 2:47 PM, Robin Murphy wrote: Hi Mikko, On 2021-02-08 16:38, Mikko Perttunen wrote: To allow for more customized device tree bindings that point to IOMMUs, allow manual specification of iommu_spec to of_dma_configure. The initial use case for this is with Host1x, where the driver

Re: [PATCH 1/3] dt-bindings: Add YAML bindings for Host1x and NVDEC

2021-02-18 Thread Mikko Perttunen
On 2/17/21 11:49 PM, Rob Herring wrote: On Sat, Feb 13, 2021 at 12:15:10PM +0200, Mikko Perttunen wrote: Convert the original Host1x bindings to YAML and add new bindings for NVDEC, now in a more appropriate location. The old text bindings for Host1x and engines are still kept at display/tegra

Re: [PATCH v5 00/21] Host1x sync point UAPI should not be used for tracking DRM jobs

2021-03-01 Thread Mikko Perttunen
On 2/27/21 1:19 PM, Dmitry Osipenko wrote: 03.02.2021 14:18, Mikko Perttunen пишет: ... I'll need more time to think about it. How about something like this: Turn the syncpt_incr field back into an array of structs like #define DRM_TEGRA_SUBMIT_SYNCPT_INCR_REPLACE_SYNCOBJ   

Re: [PATCH v8 00/14] drm/tegra: Introduce a modern UABI

2021-07-14 Thread Mikko Perttunen
On 7/14/21 5:50 PM, Dmitry Osipenko wrote: 14.07.2021 11:30, Thierry Reding пишет: On Sat, Jul 10, 2021 at 12:16:28AM +0300, Dmitry Osipenko wrote: Hello Thierry, 09.07.2021 22:31, Thierry Reding пишет: From: Thierry Reding Hi all, Mikko has been away for a few weeks, so I've been testing

Re: [PATCH] drm/tegra: Fix compilation of variadic macro

2021-07-16 Thread Mikko Perttunen
truct tegra_drm_mapping * tegra_drm_mapping_get(struct tegra_drm_context *context, u32 id) Thanks for taking care of this. Reviewed-by: Mikko Perttunen

Re: [PATCH v3 19/20] drm/tegra: Implement new UAPI

2020-11-09 Thread Mikko Perttunen
On 10/31/20 1:13 AM, Dmitry Osipenko wrote: 28.10.2020 12:54, Mikko Perttunen пишет: On 10/27/20 9:06 PM, Dmitry Osipenko wrote: 26.10.2020 12:11, Mikko Perttunen пишет: The first patches should be the ones that are relevant to the existing userspace code, like support for the waits. Can

[PATCH v4 18/21] drm/tegra: Allocate per-engine channel in core code

2020-11-20 Thread Mikko Perttunen
To avoid duplication, allocate the per-engine shared channel in the core code instead. Once MLOCKs are implemented on Host1x side, we can also update this to avoid allocating a shared channel when MLOCKs are enabled. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/drm.c | 11

[PATCH v4 13/21] gpu: host1x: Reset max value when freeing a syncpoint

2020-11-20 Thread Mikko Perttunen
With job recovery becoming optional, syncpoints may have a mismatch between their value and max value when freed. As such, when freeing, set the max value to the current value of the syncpoint so that it is in a sane state for the next user. Signed-off-by: Mikko Perttunen --- v3: * Use

[PATCH v4 00/21] Host1x/TegraDRM UAPI

2020-11-20 Thread Mikko Perttunen
ml v2: https://www.spinics.net/lists/linux-tegra/msg53061.html v3: https://www.spinics.net/lists/linux-tegra/msg54370.html Thank you, Mikko [1] https://github.com/cyndis/uapi-test Mikko Perttunen (21): gpu: host1x: Use different lock classes for each client gpu: host1x: Allow syncpoints wi

[PATCH v4 17/21] drm/tegra: Set resv fields when importing/exporting GEMs

2020-11-20 Thread Mikko Perttunen
To allow sharing of implicit fences when exporting/importing dma_buf objects, set the 'resv' fields when importing or exporting GEM objects. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tegra/gem.c

[PATCH v4 01/21] gpu: host1x: Use different lock classes for each client

2020-11-20 Thread Mikko Perttunen
To avoid false lockdep warnings, give each client lock a different lock class, passed from the initialization site by macro. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/bus.c | 7 --- include/linux/host1x.h | 9 - 2 files changed, 12 insertions(+), 4 deletions(-) diff

[PATCH v4 04/21] gpu: host1x: Remove cancelled waiters immediately

2020-11-20 Thread Mikko Perttunen
Before this patch, cancelled waiters would only be cleaned up once their threshold value was reached. Make host1x_intr_put_ref process the cancellation immediately to fix this. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/intr.c | 14 +- 1 file changed, 9 insertions(+), 5

[PATCH v4 16/21] drm/tegra: Boot VIC during runtime PM resume

2020-11-20 Thread Mikko Perttunen
: Mikko Perttunen --- v3: * runtime_get/put is now done directly from submit path, so no callbacks are added * Reworded. --- drivers/gpu/drm/tegra/vic.c | 114 +--- 1 file changed, 53 insertions(+), 61 deletions(-) diff --git a/drivers/gpu/drm/tegra/vic.c b

[PATCH v4 05/21] gpu: host1x: Use HW-equivalent syncpoint expiration check

2020-11-20 Thread Mikko Perttunen
syncpoint too many times -- then the hardware would trigger an interrupt, but the driver would assume that a syncpoint value greater than the syncpoint's max value is in the future, and not clean up the job. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/syncpt.c

[PATCH v4 09/21] gpu: host1x: DMA fences and userspace fence creation

2020-11-20 Thread Mikko Perttunen
error code. This is to allow fences that would never reach their syncpoint threshold to be cleaned up. Additionally, add a new /dev/host1x IOCTL for creating sync_file file descriptors backed by syncpoint fences. Signed-off-by: Mikko Perttunen --- v4: * Fix _signal prototype and include it to

[PATCH v4 12/21] gpu: host1x: Add support for syncpoint waits in CDMA pushbuffer

2020-11-20 Thread Mikko Perttunen
the job is submitted, these commands are pushed as the appropriate opcodes on the CDMA pushbuffer. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/hw/channel_hw.c | 51 +++ drivers/gpu/host1x/hw/debug_hw.c | 9 +++- drivers/gpu/host1x/job.c | 67

[PATCH v4 10/21] gpu: host1x: Add no-recovery mode

2020-11-20 Thread Mikko Perttunen
ned-off-by: Mikko Perttunen --- v3: * Move 'locked' check inside CDMA lock to prevent race * Add clarifying comment to NOP-patching code --- drivers/gpu/drm/tegra/drm.c| 1 + drivers/gpu/host1x/cdma.c | 58 ++ drivers/gpu/host1x/hw/channel_hw.c

[PATCH v4 07/21] gpu: host1x: Introduce UAPI header

2020-11-20 Thread Mikko Perttunen
Add the userspace interface header, specifying interfaces for allocating and accessing syncpoints from userspace, and for creating sync_file based fences based on syncpoint thresholds. Signed-off-by: Mikko Perttunen --- include/uapi/linux/host1x.h | 134 1

[PATCH v4 06/21] gpu: host1x: Cleanup and refcounting for syncpoints

2020-11-20 Thread Mikko Perttunen
Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use host1x_syncpt pointers instead. Signed-off-by: Mikko Perttunen --- v4: Update from _free to _put in VI driver as well

[PATCH v4 08/21] gpu: host1x: Implement /dev/host1x device node

2020-11-20 Thread Mikko Perttunen
Add the /dev/host1x device node, implementing the following functionality: - Reading syncpoint values - Allocating syncpoints (providing syncpoint FDs) - Incrementing syncpoints (based on syncpoint FD) Signed-off-by: Mikko Perttunen --- v4: * Put UAPI under CONFIG_DRM_TEGRA_STAGING v3: * Pass

[PATCH v4 21/21] drm/tegra: Add job firewall

2020-11-20 Thread Mikko Perttunen
sense for it to live on the DRM side, as it is only needed for userspace job submissions, and generally the data it needs to do its job is easier to access here. In the future, the other implementation will be removed. Signed-off-by: Mikko Perttunen --- v3: * New patch --- drivers/gpu/drm/tegr

[PATCH v4 03/21] gpu: host1x: Show number of pending waiters in debugfs

2020-11-20 Thread Mikko Perttunen
Show the number of pending waiters in the debugfs status file. This is useful for testing to verify that waiters do not leak or accumulate incorrectly. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/debug.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH v4 11/21] gpu: host1x: Add job release callback

2020-11-20 Thread Mikko Perttunen
Add a callback field to the job structure, to be called just before the job is to be freed. This allows the job's submitter to clean up any of its own state, like decrement runtime PM refcounts. Signed-off-by: Mikko Perttunen --- drivers/gpu/host1x/job.c | 3 +++ include/linux/host1x.h

[PATCH v4 14/21] gpu: host1x: Reserve VBLANK syncpoints at initialization

2020-11-20 Thread Mikko Perttunen
chips, reserve those two syncpoints at initialization, and only mark them free once the DC driver has indicated it's safe to do so. Signed-off-by: Mikko Perttunen --- v3: * New patch --- drivers/gpu/drm/tegra/dc.c | 6 ++ drivers/gpu/host1x/dev.c| 6 ++ drivers/gpu/host1x/dev

[PATCH v4 19/21] drm/tegra: Implement new UAPI

2020-11-20 Thread Mikko Perttunen
Implement the non-submission parts of the new UAPI, including channel management and memory mapping. The UAPI is under the CONFIG_DRM_TEGRA_STAGING config flag for now. Signed-off-by: Mikko Perttunen --- v4: * New patch, split out from combined UAPI + submit patch. --- drivers/gpu/drm/tegra

[PATCH v4 02/21] gpu: host1x: Allow syncpoints without associated client

2020-11-20 Thread Mikko Perttunen
Syncpoints don't need to be associated with any client, so remove the property, and expose host1x_syncpt_alloc. This will allow allocating syncpoints without prior knowledge of the engine that it will be used with. Signed-off-by: Mikko Perttunen --- v3: * Clean up host1x_syncpt_alloc sign

[PATCH v4 20/21] drm/tegra: Implement job submission part of new UAPI

2020-11-20 Thread Mikko Perttunen
Implement the job submission IOCTL with a minimum feature set. Signed-off-by: Mikko Perttunen --- v4: * Remove all features that are not strictly necessary. * Split into two patches. v3: * Remove WRITE_RELOC. Relocations are now patched implicitly when patching is needed. * Directly call PM

[PATCH v4 15/21] drm/tegra: Add new UAPI to header

2020-11-20 Thread Mikko Perttunen
Update the tegra_drm.h UAPI header, adding the new proposed UAPI. The old staging UAPI is left in for now, with minor modification to avoid name collisions. Signed-off-by: Mikko Perttunen --- v4: * Remove features that are not strictly necessary * Remove padding/reserved fields in IOCTL structs

Re: [PATCH libdrm v2 20/25] tests: tegra: Add VIC 4.0 support

2022-02-18 Thread Mikko Perttunen
On 2/17/22 21:19, Thierry Reding wrote: From: Thierry Reding The Video Image Composer (VIC) 4.0 can be found on NVIDIA Tegra210 SoCs. It uses a different class (B0B6) that is slightly incompatible with the class found on earlier generations. Signed-off-by: Thierry Reding --- tests/tegra/mes

Re: [PATCH libdrm v2 00/25] Update Tegra support

2022-02-18 Thread Mikko Perttunen
On 2/17/22 21:16, Thierry Reding wrote: ... Reviewed-by: Mikko Perttunen Left one cosmetic comment in the VIC4.0 patch, but overall looks OK. I think it would be fine to have some basic tests in libdrm as well. Cheers, Mikko

Re: [PATCH v3 3/9] gpu: host1x: Add context device management code

2022-02-21 Thread Mikko Perttunen
On 2/19/22 19:48, Dmitry Osipenko wrote: 18.02.2022 14:39, Mikko Perttunen пишет: ... +/* + * Due to an issue with T194 NVENC, only 38 bits can be used. + * Anyway, 256GiB of IOVA ought to be enough for anyone. + */ +static dma_addr_t context_device_dma_mask = DMA_BIT_MASK(38); s/dma_addr_t

Re: [PATCH v3 3/9] gpu: host1x: Add context device management code

2022-02-21 Thread Mikko Perttunen
On 2/19/22 19:52, Dmitry Osipenko wrote: 18.02.2022 14:39, Mikko Perttunen пишет: + for (index = 0; index < cdl->len; index++) { + struct iommu_fwspec *fwspec; + + ctx = &cdl->devs[index]; + + ctx-&

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-21 Thread Mikko Perttunen
On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: 18.02.2022 14:39, Mikko Perttunen пишет: +static int vic_get_streamid_offset(struct tegra_drm_client *client) +{ + struct vic *vic = to_vic(client); + int err; + + err = vic_load_firmware(vic

Re: [PATCH v3 9/9] drm/tegra: Support context isolation

2022-02-21 Thread Mikko Perttunen
On 2/19/22 20:35, Dmitry Osipenko wrote: 18.02.2022 14:39, Mikko Perttunen пишет: + if (context->memory_context && context->client->ops->get_streamid_offset) { ^^^ + int offset = context->client->ops->get_st

Re: [PATCH v3 1/9] dt-bindings: host1x: Add memory-contexts property

2022-02-21 Thread Mikko Perttunen
On 2/21/22 17:23, Robin Murphy wrote: On 2022-02-18 11:39, Mikko Perttunen via iommu wrote: Add schema information for the memory-contexts property used to specify context stream IDs. This uses the standard iommu-map property inside a child node. Couldn't you simply make "iom

Re: [PATCH v3 1/9] dt-bindings: host1x: Add memory-contexts property

2022-02-21 Thread Mikko Perttunen
On 2/21/22 18:58, Robin Murphy wrote: On 2022-02-21 15:28, Mikko Perttunen wrote: On 2/21/22 17:23, Robin Murphy wrote: On 2022-02-18 11:39, Mikko Perttunen via iommu wrote: Add schema information for the memory-contexts property used to specify context stream IDs. This uses the standard

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-21 Thread Mikko Perttunen
On 2/21/22 19:27, Robin Murphy wrote: On 2022-02-18 11:39, Mikko Perttunen via iommu wrote: Implement the get_streamid_offset required for supporting context isolation. Since old firmware cannot support context isolation without hacks that we don't want to implement, check the firmware b

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:10, Dmitry Osipenko wrote: 21.02.2022 14:44, Mikko Perttunen пишет: On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: 18.02.2022 14:39, Mikko Perttunen пишет: +static int vic_get_streamid_offset(struct tegra_drm_client *client) +{ +    struct vic

Re: [PATCH v3 9/9] drm/tegra: Support context isolation

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:02, Dmitry Osipenko wrote: 21.02.2022 15:06, Mikko Perttunen пишет: On 2/19/22 20:35, Dmitry Osipenko wrote: 18.02.2022 14:39, Mikko Perttunen пишет: +    if (context->memory_context && context->client->ops->get_streamid_offset) { ^^^

Re: [PATCH libdrm v2 00/25] Update Tegra support

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:29, Dmitry Osipenko wrote: 18.02.2022 12:31, Mikko Perttunen пишет: On 2/17/22 21:16, Thierry Reding wrote: ... Reviewed-by: Mikko Perttunen Left one cosmetic comment in the VIC4.0 patch, but overall looks OK. I think it would be fine to have some basic tests in libdrm as

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Mikko Perttunen
On 2/22/22 12:46, Dmitry Osipenko wrote: 22.02.2022 11:27, Mikko Perttunen пишет: On 2/21/22 22:10, Dmitry Osipenko wrote: 21.02.2022 14:44, Mikko Perttunen пишет: On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: 18.02.2022 14:39, Mikko Perttunen пишет

  1   2   3   4   5   6   7   >