Loading Documentation/devicetree/bindings/fb/mdss-mdp.txt +14 −4 Original line number Diff line number Diff line Loading @@ -437,11 +437,18 @@ Subnode properties: for the framebuffer used to display the splash screen. This property is required whenever the continuous splash screen feature is enabled for the corresponding framebuffer device. framebuffer device. It should be used for only 32bit kernel. - qcom,cont-splash-memory: Specifies the memory block region reserved for continuous splash screen feature. This property should be defined for corresponding framebuffer device if "qcom,memblock-reserve" is not defined when continuous splash screen feature is enabled. - linux,contiguous-region: Phandle to the continuous memory region reserved for frame-buffer. Size of this region is dependent on the display panel resolution and buffering scheme. Currently driver uses double buffering. frame-buffer or continuous splash screen. Size of this region is dependent on the display panel resolution and buffering scheme for frame-buffer node. Currently driver uses double buffering. Example: Width = 1920, Height = 1080, BytesPerPixel = 4, Number of frame-buffers reserved = 2. Loading Loading @@ -590,6 +597,9 @@ Example: qcom,mdss-fb-split = <480 240> linux,contiguous-region = <&fb_mem>; qcom,mdss-fb-splash-logo-enabled: qcom,cont-splash-memory { linux,contiguous-region = <&cont_splash_mem>; }; }; }; drivers/video/msm/mdss/mdss_mdp_splash_logo.c +38 −11 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/memblock.h> #include <linux/bootmem.h> #include <linux/iommu.h> #include <linux/of_address.h> #include <linux/fb.h> #include "mdss_fb.h" Loading Loading @@ -552,26 +553,52 @@ static __ref int mdss_mdp_splash_parse_dt(struct msm_fb_data_type *mfd) struct mdss_overlay_private *mdp5_mdata = mfd_to_mdp5_data(mfd); int len = 0, rc = 0; u32 offsets[2]; struct device_node *pnode, *child_node; mfd->splash_info.splash_logo_enabled = of_property_read_bool(pdev->dev.of_node, "qcom,mdss-fb-splash-logo-enabled"); of_find_property(pdev->dev.of_node, "qcom,memblock-reserve", &len); if (len < 1) { pr_debug("mem reservation for splash screen fb not present\n"); rc = -EINVAL; goto error; } if (len) { len = len / sizeof(u32); rc = of_property_read_u32_array(pdev->dev.of_node, "qcom,memblock-reserve", offsets, len); if (rc) { pr_debug("error reading mem reserve settings for fb\n"); pr_err("error reading mem reserve settings for fb\n"); goto error; } } else { child_node = of_get_child_by_name(pdev->dev.of_node, "qcom,cont-splash-memory"); if (!child_node) { pr_err("splash mem child node is not present\n"); rc = -EINVAL; goto error; } pnode = of_parse_phandle(child_node, "linux,contiguous-region", 0); if (pnode != NULL) { const u32 *addr; u64 size; addr = of_get_address(pnode, 0, &size, NULL); if (!addr) { pr_err("failed to parse the splash memory address\n"); of_node_put(pnode); rc = -EINVAL; goto error; } offsets[0] = (u32) of_read_ulong(addr, 2); offsets[1] = (u32) size; of_node_put(pnode); } else { pr_err("mem reservation for splash screen fb not present\n"); rc = -EINVAL; goto error; } } if (!memblock_is_reserved(offsets[0])) { pr_debug("failed to reserve memory for fb splash\n"); Loading Loading
Documentation/devicetree/bindings/fb/mdss-mdp.txt +14 −4 Original line number Diff line number Diff line Loading @@ -437,11 +437,18 @@ Subnode properties: for the framebuffer used to display the splash screen. This property is required whenever the continuous splash screen feature is enabled for the corresponding framebuffer device. framebuffer device. It should be used for only 32bit kernel. - qcom,cont-splash-memory: Specifies the memory block region reserved for continuous splash screen feature. This property should be defined for corresponding framebuffer device if "qcom,memblock-reserve" is not defined when continuous splash screen feature is enabled. - linux,contiguous-region: Phandle to the continuous memory region reserved for frame-buffer. Size of this region is dependent on the display panel resolution and buffering scheme. Currently driver uses double buffering. frame-buffer or continuous splash screen. Size of this region is dependent on the display panel resolution and buffering scheme for frame-buffer node. Currently driver uses double buffering. Example: Width = 1920, Height = 1080, BytesPerPixel = 4, Number of frame-buffers reserved = 2. Loading Loading @@ -590,6 +597,9 @@ Example: qcom,mdss-fb-split = <480 240> linux,contiguous-region = <&fb_mem>; qcom,mdss-fb-splash-logo-enabled: qcom,cont-splash-memory { linux,contiguous-region = <&cont_splash_mem>; }; }; };
drivers/video/msm/mdss/mdss_mdp_splash_logo.c +38 −11 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/memblock.h> #include <linux/bootmem.h> #include <linux/iommu.h> #include <linux/of_address.h> #include <linux/fb.h> #include "mdss_fb.h" Loading Loading @@ -552,26 +553,52 @@ static __ref int mdss_mdp_splash_parse_dt(struct msm_fb_data_type *mfd) struct mdss_overlay_private *mdp5_mdata = mfd_to_mdp5_data(mfd); int len = 0, rc = 0; u32 offsets[2]; struct device_node *pnode, *child_node; mfd->splash_info.splash_logo_enabled = of_property_read_bool(pdev->dev.of_node, "qcom,mdss-fb-splash-logo-enabled"); of_find_property(pdev->dev.of_node, "qcom,memblock-reserve", &len); if (len < 1) { pr_debug("mem reservation for splash screen fb not present\n"); rc = -EINVAL; goto error; } if (len) { len = len / sizeof(u32); rc = of_property_read_u32_array(pdev->dev.of_node, "qcom,memblock-reserve", offsets, len); if (rc) { pr_debug("error reading mem reserve settings for fb\n"); pr_err("error reading mem reserve settings for fb\n"); goto error; } } else { child_node = of_get_child_by_name(pdev->dev.of_node, "qcom,cont-splash-memory"); if (!child_node) { pr_err("splash mem child node is not present\n"); rc = -EINVAL; goto error; } pnode = of_parse_phandle(child_node, "linux,contiguous-region", 0); if (pnode != NULL) { const u32 *addr; u64 size; addr = of_get_address(pnode, 0, &size, NULL); if (!addr) { pr_err("failed to parse the splash memory address\n"); of_node_put(pnode); rc = -EINVAL; goto error; } offsets[0] = (u32) of_read_ulong(addr, 2); offsets[1] = (u32) size; of_node_put(pnode); } else { pr_err("mem reservation for splash screen fb not present\n"); rc = -EINVAL; goto error; } } if (!memblock_is_reserved(offsets[0])) { pr_debug("failed to reserve memory for fb splash\n"); Loading