mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
boot: fdt_simplefb: Enumerate framebuffer info from video handoff
Enable and update simple-framebuffer node using the video handoff bloblist if video was enabled at SPL stage and corresponding video bloblist was received at u-boot proper with necessary parameters. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
This commit is contained in:
parent
91e9687b49
commit
86281e4705
1 changed files with 25 additions and 9 deletions
|
@ -12,6 +12,8 @@
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
#include <linux/libfdt.h>
|
#include <linux/libfdt.h>
|
||||||
#include <video.h>
|
#include <video.h>
|
||||||
|
#include <spl.h>
|
||||||
|
#include <bloblist.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -26,6 +28,18 @@ static int fdt_simplefb_configure_node(void *blob, int off)
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) {
|
||||||
|
struct video_handoff *ho;
|
||||||
|
|
||||||
|
ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
|
||||||
|
if (!ho)
|
||||||
|
return log_msg_ret("Missing video bloblist", -ENOENT);
|
||||||
|
|
||||||
|
xsize = ho->xsize;
|
||||||
|
ysize = ho->ysize;
|
||||||
|
bpix = ho->bpix;
|
||||||
|
fb_base = ho->fb;
|
||||||
|
} else {
|
||||||
ret = uclass_first_device_err(UCLASS_VIDEO, &dev);
|
ret = uclass_first_device_err(UCLASS_VIDEO, &dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -35,6 +49,8 @@ static int fdt_simplefb_configure_node(void *blob, int off)
|
||||||
ysize = uc_priv->ysize;
|
ysize = uc_priv->ysize;
|
||||||
bpix = uc_priv->bpix;
|
bpix = uc_priv->bpix;
|
||||||
fb_base = plat->base;
|
fb_base = plat->base;
|
||||||
|
}
|
||||||
|
|
||||||
switch (bpix) {
|
switch (bpix) {
|
||||||
case 4: /* VIDEO_BPP16 */
|
case 4: /* VIDEO_BPP16 */
|
||||||
name = "r5g6b5";
|
name = "r5g6b5";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue