Message ID | 20240222130811.3878567-3-devarsht@ti.com |
---|---|
State | Accepted |
Commit | 4ac7ffb60ee9a342337dce6e4fda3cbac827c398 |
Delegated to: | Anatolij Gustschin |
Headers | show |
Series | Simplefb and fb reservation related updates | expand |
Hi Devarsh, On 22/02/24 18:38, Devarsh Thakkar wrote: > If SPL is passing video handoff structure to U-boot then it is safe to > assume that SPL has already enabled video and that's why it is passing > video handoff structure to U-boot so that U-boot can preserve the > framebuffer. > > Signed-off-by: Devarsh Thakkar <devarsht@ti.com> > --- > drivers/video/video-uclass.c | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Nikhil M Jain <n-jain1@ti.com> > > diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c > index 3571e62ba2..7b5d1dfbb3 100644 > --- a/drivers/video/video-uclass.c > +++ b/drivers/video/video-uclass.c > @@ -404,6 +404,10 @@ bool video_is_active(void) > { > struct udevice *dev; > > + /* Assume video to be active if SPL passed video hand-off to U-boot */ > + if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) > + return true; > + > for (uclass_find_first_device(UCLASS_VIDEO, &dev); > dev; > uclass_find_next_device(&dev)) { Thanks, Nikhil
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 3571e62ba2..7b5d1dfbb3 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -404,6 +404,10 @@ bool video_is_active(void) { struct udevice *dev; + /* Assume video to be active if SPL passed video hand-off to U-boot */ + if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) + return true; + for (uclass_find_first_device(UCLASS_VIDEO, &dev); dev; uclass_find_next_device(&dev)) {
If SPL is passing video handoff structure to U-boot then it is safe to assume that SPL has already enabled video and that's why it is passing video handoff structure to U-boot so that U-boot can preserve the framebuffer. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> --- drivers/video/video-uclass.c | 4 ++++ 1 file changed, 4 insertions(+)