Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/komeda: Add support for 'memory-region' DT node property

The 'memory-region' property of the komeda display driver DT binding
allows the use of a 'reserved-memory' node for buffer allocations. Add
the requisite of_reserved_mem_device_{init,release} calls to actually
make use of the memory if present.

Changes since v1:
- Move handling inside komeda_parse_dt

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Link:- https://patchwork.kernel.org/patch/11076413/

authored by

Mihail Atanassov and committed by
Ayan kumar halder
a8c16b75 ea4e537a

+9
+9
drivers/gpu/drm/arm/display/komeda/komeda_dev.c
··· 8 8 #include <linux/iommu.h> 9 9 #include <linux/of_device.h> 10 10 #include <linux/of_graph.h> 11 + #include <linux/of_reserved_mem.h> 11 12 #include <linux/platform_device.h> 12 13 #include <linux/dma-mapping.h> 13 14 #ifdef CONFIG_DEBUG_FS ··· 146 145 DRM_ERROR("could not get IRQ number.\n"); 147 146 return mdev->irq; 148 147 } 148 + 149 + /* Get the optional framebuffer memory resource */ 150 + ret = of_reserved_mem_device_init(dev); 151 + if (ret && ret != -ENODEV) 152 + return ret; 153 + ret = 0; 149 154 150 155 for_each_available_child_of_node(np, child) { 151 156 if (of_node_cmp(child->name, "pipeline") == 0) { ··· 298 291 } 299 292 300 293 mdev->n_pipelines = 0; 294 + 295 + of_reserved_mem_device_release(dev); 301 296 302 297 if (funcs && funcs->cleanup) 303 298 funcs->cleanup(mdev);