Patch "drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-vc4-drv-adopt-the-dma-configuration-from-the-hvs.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 06208ff69009db66d711791450761f83b1a35f35
Author: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
Date:   Mon Jun 13 16:47:28 2022 +0200

    drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component
    
    [ Upstream commit da8e393e23efb60eba8959856c7df88f9859f6eb ]
    
    vc4_drv isn't necessarily under the /soc node in DT as it is a
    virtual device, but it is the one that does the allocations.
    The DMA addresses are consumed by primarily the HVS or V3D, and
    those require VideoCore cache alias address mapping, and so will be
    under /soc.
    
    During probe find the a suitable device node for HVS or V3D,
    and adopt the DMA configuration of that node.
    
    Cc: <stable@xxxxxxxxxxxxxxx>
    Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220613144800.326124-2-maxime@xxxxxxxxxx
    Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index f6c16c5aee68..6e52801e2d99 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -214,6 +214,15 @@ static void vc4_match_add_drivers(struct device *dev,
 	}
 }
 
+const struct of_device_id vc4_dma_range_matches[] = {
+	{ .compatible = "brcm,bcm2711-hvs" },
+	{ .compatible = "brcm,bcm2835-hvs" },
+	{ .compatible = "brcm,bcm2835-v3d" },
+	{ .compatible = "brcm,cygnus-v3d" },
+	{ .compatible = "brcm,vc4-v3d" },
+	{}
+};
+
 static int vc4_drm_bind(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -231,6 +240,16 @@ static int vc4_drm_bind(struct device *dev)
 		vc4_drm_driver.driver_features &= ~DRIVER_RENDER;
 	of_node_put(node);
 
+	node = of_find_matching_node_and_match(NULL, vc4_dma_range_matches,
+					       NULL);
+	if (node) {
+		ret = of_dma_configure(dev, node, true);
+		of_node_put(node);
+
+		if (ret)
+			return ret;
+	}
+
 	vc4 = devm_drm_dev_alloc(dev, &vc4_drm_driver, struct vc4_dev, base);
 	if (IS_ERR(vc4))
 		return PTR_ERR(vc4);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux