diff options
author | Robin Murphy <robin.murphy@arm.com> | 2020-09-22 15:16:49 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2020-10-30 10:08:08 +0100 |
commit | 268af50f38b1f2199a2e85e38073d7a25c20190c (patch) | |
tree | f2caab51c94a3be217cfc88006f069c4bedb526d /drivers/gpu/drm/panfrost/panfrost_drv.c | |
parent | 728da60da7c1ec1e21ae64648e376666de3c279c (diff) | |
download | linux-stable-268af50f38b1f2199a2e85e38073d7a25c20190c.tar.gz linux-stable-268af50f38b1f2199a2e85e38073d7a25c20190c.tar.bz2 linux-stable-268af50f38b1f2199a2e85e38073d7a25c20190c.zip |
drm/panfrost: Support cache-coherent integrations
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: Robin Murphy <robin.murphy@arm.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7024ce18c1cb1a226e918037d49175571db0b436.1600780574.git.robin.murphy@arm.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_drv.c')
-rw-r--r-- | drivers/gpu/drm/panfrost/panfrost_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 37d4cb7a5491..6e5dedacb777 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -587,6 +587,8 @@ static int panfrost_probe(struct platform_device *pdev) if (!pfdev->comp) return -ENODEV; + pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT; + /* Allocate and initialze the DRM device. */ ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev); if (IS_ERR(ddev)) |