- 04 6月, 2021 1 次提交
-
-
由 Alyssa Rosenzweig 提交于
The value of the AFBC_FEATURES register is required by userspace to determine AFBC support on Bifrost. A user on our IRC channel (#panfrost) reported a workload that raised a fault on one system's Mali G31 but worked flawlessly with another system's Mali G31. We determined the cause to be missing AFBC support on one vendor's Mali implementation -- it turns out AFBC is optional on Bifrost! Whether AFBC is supported or not is exposed in the AFBC_FEATURES register on Bifrost, which reads back as 0 on Midgard. A zero value indicates AFBC is fully supported, provided the architecture itself supports AFBC, allowing backwards-compatibility with Midgard. Bits 0 and 15 indicate that AFBC support is absent for texturing and rendering respectively. The user experiencing the fault reports that AFBC_FEATURES reads back 0x10001 on their system, confirming the architectural lack of AFBC. Userspace needs this parameter to know to disable AFBC on that chip, and perhaps others. v2: Fix typo from copy-paste fail. v3: Bump the UABI version. This commit was cherry-picked from another series so chalking this up to a rebase fail. Signed-off-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Cc: Rob Herring <robh@kernel.org> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210604130011.3203-1-alyssa.rosenzweig@collabora.com
-
- 14 5月, 2021 1 次提交
-
-
由 Nicolas Boichat 提交于
Add support for MT8183's G72 Bifrost. Signed-off-by: NNicolas Boichat <drinkcat@chromium.org> Reviewed-by: NTomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210421132841.v13.4.I5f6b04431828ec9c3e41e65f3337cec6a127480d@changeid
-
- 06 11月, 2020 1 次提交
-
-
由 Daniel Vetter 提交于
Only the following drivers aren't converted: - amdgpu, because of the driver_feature mangling due to virt support. Subsequent patch will address this. - nouveau, because DRIVER_ATOMIC uapi is still not the default on the platforms where it's supported (i.e. again driver_feature mangling) - vc4, again because of driver_feature mangling - qxl, because the ioctl table is somewhere else and moving that is maybe a bit too much, hence the num_ioctls assignment prevents a const driver structure. - arcpgu, because that is stuck behind a pending tiny-fication series from me. - legacy drivers, because legacy requires non-const drm_driver. Note that for armada I also went ahead and made the ioctl array const. Only cc'ing the driver people who've not been converted (everyone else is way too much). v2: Fix one misplaced const static, should be static const (0day) v3: - Improve commit message (Sam) Acked-by: NSam Ravnborg <sam@ravnborg.org> Cc: kernel test robot <lkp@intel.com> Acked-by: NMaxime Ripard <mripard@kernel.org> Reviewed-by: NAlex Deucher <alexander.deucher@amd.com> Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Eric Anholt <eric@anholt.net> Cc: Maxime Ripard <mripard@kernel.org> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: nouveau@lists.freedesktop.org Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch
-
- 03 11月, 2020 1 次提交
-
-
由 Steven Price 提交于
When unloading the call to pm_runtime_put_sync_suspend() will attempt to turn the GPU cores off, however panfrost_device_fini() will have turned the clocks off. This leads to the hardware locking up. Instead don't call pm_runtime_put_sync_suspend() and instead simply mark the device as suspended using pm_runtime_set_suspended(). And also include this on the error path in panfrost_probe(). Fixes: aebe8c22 ("drm/panfrost: Fix possible suspend in panfrost_remove") Signed-off-by: NSteven Price <steven.price@arm.com> Reviewed-by: NTomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201030145833.29006-1-steven.price@arm.com
-
- 30 10月, 2020 1 次提交
-
-
由 Robin Murphy 提交于
When the GPU's ACE-Lite interface is fully wired up and capable of snooping CPU caches, it may be described as "dma-coherent" in devicetree, which will already inform the DMA layer not to perform unnecessary cache maintenance. However, we still need to ensure that the GPU uses the appropriate cacheable outer-shareable attributes in order to generate the requisite snoop signals, and that CPU mappings don't create a mismatch by using a non-cacheable type either. Signed-off-by: NRobin Murphy <robin.murphy@arm.com> Tested-by: NNeil Armstrong <narmstrong@baylibre.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/7024ce18c1cb1a226e918037d49175571db0b436.1600780574.git.robin.murphy@arm.com
-
- 21 9月, 2020 1 次提交
-
-
由 Neil Armstrong 提交于
This adds the required GPU quirks, including the quirk in the PWR registers at the GPU reset time and the IOMMU quirk for shareability issues observed on G52 in Amlogic G12B SoCs. Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Reviewed-by: NSteven Price <steven.price@arm.com> Reviewed-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200916150147.25753-4-narmstrong@baylibre.com
-
- 08 8月, 2020 2 次提交
-
-
由 Clément Péron 提交于
Later we will introduce devfreq probing regulator if they are present. As regulator should be probe only one time we need to get this logic in the device_init(). panfrost_device is already taking care of devfreq_resume() and devfreq_suspend(), so it's not totally illogic to move the devfreq_init() and devfreq_fini() here. Reviewed-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NClément Péron <peron.clem@gmail.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-9-peron.clem@gmail.com
-
由 Tomeu Vizoso 提交于
Mesa now supports some Bifrost devices, so enable it. Tested-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NSteven Price <steven.price@arm.com> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200611085900.49740-2-tomeu.vizoso@collabora.com
-
- 20 5月, 2020 1 次提交
-
-
由 Emil Velikov 提交于
Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Rob Herring <robh@kernel.org> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Steven Price <steven.price@arm.com> Signed-off-by: NEmil Velikov <emil.velikov@collabora.com> Acked-by: NSam Ravnborg <sam@ravnborg.org> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-28-emil.l.velikov@gmail.com
-
- 27 2月, 2020 1 次提交
-
-
由 kbuild test robot 提交于
Fixes: 3e1399bc ("drm/panfrost: Add support for multiple regulators") Signed-off-by: Nkbuild test robot <lkp@intel.com> Reviewed-by: NNicolas Boichat <drinkcat@chromium.org> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200227014100.GA61938@e50d7db646c3
-
- 26 2月, 2020 2 次提交
-
-
由 Nicolas Boichat 提交于
When there is a single power domain per device, the core will ensure the power domain is switched on (so it is technically equivalent to having not power domain specified at all). However, when there are multiple domains, as in MT8183 Bifrost GPU, we need to handle them in driver code. Signed-off-by: NNicolas Boichat <drinkcat@chromium.org> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200207052627.130118-6-drinkcat@chromium.org
-
由 Nicolas Boichat 提交于
Some GPUs, namely, the bifrost/g72 part on MT8183, have a second regulator for their SRAM, let's add support for that. We extend the framework in a generic manner so that we could support more than 2 regulators, if required. Signed-off-by: NNicolas Boichat <drinkcat@chromium.org> Reviewed-by: NSteven Price <steven.price@arm.com> Reviwed-by: NMark Brown <broonie@kernel.org> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200207052627.130118-5-drinkcat@chromium.org
-
- 03 2月, 2020 1 次提交
-
-
由 Boris Brezillon 提交于
Userspace might tag a BO purgeable while it's still referenced by GPU jobs. We need to make sure the shrinker does not purge such BOs until all jobs referencing it are finished. Fixes: 013b6510 ("drm/panfrost: Add madvise and shrinker support") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-9-boris.brezillon@collabora.com
-
- 22 1月, 2020 1 次提交
-
-
由 Boris Brezillon 提交于
With the introduction of per-FD address space, the same BO can be mapped in different address space if the BO is globally visible (GEM_FLINK) and opened in different context or if the dmabuf is self-imported. The current implementation does not take case into account, and attaches the mapping directly to the panfrost_gem_object. Let's create a panfrost_gem_mapping struct and allow multiple mappings per BO. The mappings are refcounted which helps solve another problem where mappings were torn down (GEM handle closed by userspace) while GPU jobs accessing those BOs were still in-flight. Jobs now keep a reference on the mappings they use. v2 (robh): - Minor review comment clean-ups from Steven - Use list_is_singular helper - Just WARN if we add a mapping when madvise state is not WILLNEED. With that, drop the use of object_name_lock. v3 (robh): - Revert returning list iterator in panfrost_gem_mapping_get() Fixes: a5efb4c9 ("drm/panfrost: Restructure the GEM object creation") Fixes: 7282f764 ("drm/panfrost: Implement per FD address spaces") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Acked-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200116021554.15090-1-robh@kernel.org
-
- 07 12月, 2019 3 次提交
-
-
由 Boris Brezillon 提交于
Commit a5efb4c9 ("drm/panfrost: Restructure the GEM object creation") moved the drm_mm_insert_node_generic() call to the gem->open() hook, but forgot to update perfcnt accordingly. Patch the perfcnt logic to call panfrost_gem_open/close() where appropriate. Fixes: a5efb4c9 ("drm/panfrost: Restructure the GEM object creation") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-6-boris.brezillon@collabora.com
-
由 Boris Brezillon 提交于
We should release the reference we grabbed when an error occurs. Fixes: 187d2929 ("drm/panfrost: Add support for GPU heap allocations") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-4-boris.brezillon@collabora.com
-
由 Boris Brezillon 提交于
If 2 threads change the MADVISE property of the same BO in parallel we might end up with an shmem->madv value that's inconsistent with the presence of the BO in the shrinker list. The easiest solution to fix that is to protect the drm_gem_shmem_madvise() call with the shrinker lock. Fixes: 013b6510 ("drm/panfrost: Add madvise and shrinker support") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-3-boris.brezillon@collabora.com
-
- 03 12月, 2019 1 次提交
-
-
由 Emil Velikov 提交于
As of earlier commit we have address space separation. Yet we forgot to remove the respective comment and DRM_AUTH in the ioctl declaration. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Steven Price <steven.price@arm.com> Fixes: 7282f764 ("drm/panfrost: Implement per FD address spaces") Signed-off-by: NEmil Velikov <emil.velikov@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191101130313.8862-4-emil.l.velikov@gmail.com
-
- 24 10月, 2019 1 次提交
-
-
由 Tomeu Vizoso 提交于
When deferring the probe because of a missing regulator, we were calling pm_runtime_disable even if pm_runtime_enable wasn't called. Move the call to pm_runtime_disable to the right place. Fixes: 63543079 ("drm/panfrost: Rework runtime PM initialization") Reported-by: NChen-Yu Tsai <wens@csie.org> Cc: Robin Murphy <robin.murphy@arm.com> Signed-off-by: NTomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: NRobin Murphy <robin.murphy@arm.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191023122157.32067-1-tomeu.vizoso@collabora.com
-
- 17 10月, 2019 1 次提交
-
-
由 Gerd Hoffmann 提交于
DEFINE_DRM_GEM_SHMEM_FOPS is identical to DEFINE_DRM_GEM_FOPS now, drop it. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-6-kraxel@redhat.com
-
- 30 8月, 2019 1 次提交
-
-
由 Rob Herring 提交于
There's a few issues with the runtime PM initialization. The documentation states pm_runtime_set_active() should be called before pm_runtime_enable(). The pm_runtime_put_autosuspend() could suspend the GPU before panfrost_perfcnt_init() is called which touches the h/w. The autosuspend delay keeps things from breaking. There's no need explicitly power off the GPU only to wake back up with pm_runtime_get_sync(). Just delaying pm_runtime_enable to the end of probe is sufficient. Lets move all the runtime PM calls into the probe() function so they are all in one place and are done after all initialization. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Steven Price <steven.price@arm.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Reviewed-by: NRobin Murphy <robin.murphy@arm.com> Reviewed-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190826223317.28509-2-robh@kernel.org
-
- 28 8月, 2019 1 次提交
-
-
由 Rob Herring 提交于
Calls to panfrost_device_fini() access the h/w, but we already done a pm_runtime_put_sync_autosuspend() beforehand. This only works if the autosuspend delay is long enough. A 0ms delay will hang the system when removing the device. Fix this by moving the pm_runtime_put_sync_suspend() after the panfrost_device_fini() call. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: NRob Herring <robh@kernel.org> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-2-robh@kernel.org
-
- 24 8月, 2019 1 次提交
-
-
由 Rob Herring 提交于
Calls to panfrost_device_fini() access the h/w, but we already done a pm_runtime_put_sync_autosuspend() beforehand. This only works if the autosuspend delay is long enough. A 0ms delay will hang the system when removing the device. Fix this by moving the pm_runtime_put_sync_suspend() after the panfrost_device_fini() call. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: NRob Herring <robh@kernel.org> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190823021216.5862-2-robh@kernel.org
-
- 20 8月, 2019 2 次提交
-
-
由 Steven Price 提交于
The devfreq opp table needs to be removed when unloading the driver to free the memory associated with it. Signed-off-by: NSteven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190816093107.30518-3-steven.price@arm.com
-
由 Rob Herring 提交于
Up until now, a single shared GPU address space was used. This is not ideal as there's no protection between processes and doesn't work for supporting the same GPU/CPU VA feature. Most importantly, this will hopefully mitigate Alyssa's fear of WebGL, whatever that is. Most of the changes here are moving struct drm_mm and struct panfrost_mmu objects from the per device struct to the per FD struct. The critical function is panfrost_mmu_as_get() which handles allocating and switching the h/w address spaces. There's 3 states an AS can be in: free, allocated, and in use. When a job runs, it requests an address space and then marks it not in use when job is complete(but stays assigned). The first time thru, we find a free AS in the alloc_mask and assign the AS to the FD. Then the next time thru, we most likely already have our AS and we just mark it in use with a ref count. We need a ref count because we have multiple job slots. If the job/FD doesn't have an AS assigned and there are no free ones, then we pick an allocated one not in use from our LRU list and switch the AS from the old FD to the new one. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Steven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190813150115.30338-1-robh@kernel.org
-
- 13 8月, 2019 5 次提交
-
-
由 Christian König 提交于
Be more consistent with the naming of the other DMA-buf objects. Signed-off-by: NChristian König <christian.koenig@amd.com> Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/323401/
-
由 Rob Herring 提交于
Increment the driver version to expose the new BO allocation flags. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Steven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-10-robh@kernel.org
-
由 Rob Herring 提交于
The midgard/bifrost GPUs need to allocate GPU heap memory which is allocated on GPU page faults and not pinned in memory. The vendor driver calls this functionality GROW_ON_GPF. This implementation assumes that BOs allocated with the PANFROST_BO_NOEXEC flag are never mmapped or exported. Both of those may actually work, but I'm unsure if there's some interaction there. It would cause the whole object to be pinned in memory which would defeat the point of this. On faults, we map in 2MB at a time in order to utilize huge pages (if enabled). Currently, once we've mapped pages in, they are only unmapped if the BO is freed. Once we add shrinker support, we can unmap pages with the shrinker. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Robin Murphy <robin.murphy@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: NSteven Price <steven.price@arm.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-9-robh@kernel.org
-
由 Rob Herring 提交于
Executable buffers have an alignment restriction that they can't cross 16MB boundary as the GPU program counter is 24-bits. This restriction is currently not handled and we just get lucky. As current userspace assumes all BOs are executable, that has to remain the default. So add a new PANFROST_BO_NOEXEC flag to allow userspace to indicate which BOs are not executable. There is also a restriction that executable buffers cannot start or end on a 4GB boundary. This is mostly avoided as there is only 4GB of space currently and the beginning is already blocked out for NULL ptr detection. Add support to handle this restriction fully regardless of the current constraints. For existing userspace, all created BOs remain executable, but the GPU VA alignment will be increased to the size of the BO. This shouldn't matter as there is plenty of GPU VA space. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Robin Murphy <robin.murphy@arm.com> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-6-robh@kernel.org
-
由 Rob Herring 提交于
Setting the GPU VA when creating the GEM object doesn't allow for any conditional adjustments to the mapping. In preparation to support adjusting the mapping and per FD address spaces, restructure the GEM object creation to map and unmap the GEM object in the GEM object .open() and .close() hooks. While panfrost_gem_free_object() and panfrost_gem_prime_import_sg_table() are not really needed after this commit, keep them as we'll need them in subsequent commits. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Robin Murphy <robin.murphy@arm.com> Reviewed-by: NSteven Price <steven.price@arm.com> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-4-robh@kernel.org
-
- 09 8月, 2019 1 次提交
-
-
由 Rob Herring 提交于
Add support for madvise and a shrinker similar to other drivers. This allows userspace to mark BOs which can be freed when there is memory pressure. Unlike other implementations, we don't depend on struct_mutex. The driver maintains a list of BOs which can be freed when the shrinker is called. Access to the list is serialized with the shrinker_lock. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Acked-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190805143358.21245-2-robh@kernel.org
-
- 07 8月, 2019 2 次提交
-
-
由 Rob Herring 提交于
This reverts commit 583bbf46. Turns out we need mmap to work on imported BOs even if the current code is buggy. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NSean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20190807145253.2037-3-sean@poorly.run
-
由 Sean Paul 提交于
This reverts commit be855382. Mandatory review was missing from this patch. Acked-by: NMaxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: NSean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190807142101.251400-3-sean@poorly.run
-
- 26 7月, 2019 1 次提交
-
-
由 Steven Price 提交于
Midgard/Bifrost GPUs have a bunch of feature registers providing details of what the hardware supports. Panfrost already reads these, this patch exports them all to user space so that the jobs created by the user space driver can be tuned for the particular hardware implementation. Signed-off-by: NSteven Price <steven.price@arm.com> Reviewed-by: NAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190724105626.53552-1-steven.price@arm.com
-
- 04 7月, 2019 1 次提交
-
-
由 Rob Herring 提交于
This reverts commit 583bbf46. Turns out we need mmap to work on imported BOs even if the current code is buggy. Signed-off-by: NRob Herring <robh@kernel.org>
-
- 29 6月, 2019 2 次提交
-
-
由 Boris Brezillon 提交于
drm_gem_shmem_create_with_handle() returns a GEM object and attach a handle to it. When the user closes the DRM FD, the core releases all GEM handles along with their backing GEM objs, which can lead to a double-free issue if panfrost_ioctl_create_bo() failed and went through the err_free path where drm_gem_object_put_unlocked() is called without deleting the associate handle. Replace this drm_gem_object_put_unlocked() call by a drm_gem_handle_delete() one to fix that. Fixes: f3ba9122 ("drm/panfrost: Add initial panfrost driver") Cc: <stable@vger.kernel.org> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190627172414.27231-1-boris.brezillon@collabora.com
-
由 Steven Price 提交于
panfrost_ioctl_mmap_bo() contains a reimplementation of drm_gem_map_offset() but with a bug - it allows mapping imported objects (without going through the exporter). Fix this by switching to use the newly renamed drm_gem_map_offset() function instead which has the bonus of simplifying the code. Signed-off-by: NSteven Price <steven.price@arm.com> Reviewed-by: NAlyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190627155318.38053-3-steven.price@arm.com
-
- 21 6月, 2019 1 次提交
-
-
由 Daniel Vetter 提交于
Split out to make the functional changes stick out more. All places where DRIVER_PRIME was used have been removed in previous patches already. v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE. v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE. v4: Don't add a space in i915_drv.c (Sam) v5: Add note that previous patches removed all the DRIVER_PRIME users already (Emil). v6: Fixupe ingenic (new driver) while applying. Cc: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: NEmil Velikov <emil.velikov@collabora.com> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com> Cc: amd-gfx@lists.freedesktop.org Cc: etnaviv@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: lima@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-tegra@vger.kernel.org Cc: nouveau@lists.freedesktop.org Cc: NXP Linux Team <linux-imx@nxp.com> Cc: spice-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: xen-devel@lists.xenproject.org Link: https://patchwork.freedesktop.org/patch/msgid/20190617153924.414-1-daniel.vetter@ffwll.ch
-
- 18 6月, 2019 2 次提交
-
-
由 Boris Brezillon 提交于
Expose performance counters through 2 driver specific ioctls: one to enable/disable the perfcnt block, and one to dump the counter values. There are discussions to expose global performance monitors (those counters that can't be retrieved on a per-job basis) in a consistent way, but this is likely to take time to settle on something that works for various HW/users. The ioctls are marked unstable so we can get rid of them when the time comes. We initally went for a debugfs-based interface, but this was making the transition to per-FD address space more complicated (we need to specify the namespace the GPU has to use when dumping the perf counters), hence the decision to switch back to driver specific ioctls which are passed the FD they operate on and thus will have a dedicated address space attached to them. Other than that, the implementation is pretty simple: it basically dumps all counters and copy the values to a userspace buffer. The parsing is left to userspace which has to know the specific layout that's used by the GPU (layout differs on a per-revision basis). Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Acked-by: NAlyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-5-boris.brezillon@collabora.com
-
由 Boris Brezillon 提交于
We plan to expose performance counters through 2 driver specific ioctls until there's a solution to expose them in a generic way. In order to be able to deprecate those ioctls when this new infrastructure is in place we add an unsafe module parameter that will keep those ioctls hidden unless it's set to true (which also has the effect of tainting the kernel). All unstable ioctl handlers should use panfrost_unstable_ioctl_check() to check whether they're supposed to handle the request or reject it with ENOSYS. Suggested-by: NEmil Velikov <emil.velikov@collabora.com> Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NAlyssa Rosenzweig <alyssa@rosenzweig.io> Signed-off-by: NRob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190618081648.17297-3-boris.brezillon@collabora.com
-