x86: Updates to some commands
v3 cover x86: Updates to some commands
This series adds a few more features to some x86-specific commands.
Changes in v3:
- Update header file to avoid build error with !DM_VIDEO
Changes in v2:
- Fix '93' typo
- Capitalise 'System'
Simon Glass (5):
x86: hob: Add way to show a single hob entry
x86: hob: Try to show a name instead of a GUID
x86: Allow showing details about a HOB entry
x86: Add support for more than 8 MTRRs
x86: video: Show information about each video device
arch/x86/cpu/mtrr.c | 12 ++-- arch/x86/include/asm/fsp/fsp_hob.h | 25 ++++++++ arch/x86/include/asm/mtrr.h | 15 ++++- cmd/bdinfo.c | 26 +++++++- cmd/x86/hob.c | 100 +++++++++++++++++++++++++++-- cmd/x86/mtrr.c | 9 +-- include/video.h | 6 +- 7 files changed, 169 insertions(+), 24 deletions(-)
Signature · 1 line
2.28.0.681.g6f77f65b4e-goog
PATCH v3 5/5 x86: video: Show information about each video device
At present the 'bdinfo' command shows the framebuffer address, but not the address of the copy framebuffer, if present. Add support for this.
---
Changes in v3:
- Update header file to avoid build error with !DM_VIDEO
cmd/bdinfo.c | 26 +++++++++++++++++++++++++- include/video.h | 6 ++---- 2 files changed, 27 insertions(+), 5 deletions(-)
cmd/bdinfo.c +25 -1
@@ -8,9 +8,11 @@#include <common.h> #include <command.h> +#include <dm.h> #include <env.h> #include <lmb.h> #include <net.h> +#include <video.h> #include <vsprintf.h> #include <asm/cache.h>
@@ -66,6 +68,26 @@ __weak void arch_print_bdinfo(void) { } +static void show_video_info (void ) +{ +const struct udevice *dev; +struct uclass *uc; + + uclass_id_foreach_dev(UCLASS_VIDEO, dev, uc) { +printf ("%-12s= %s %sactive\n" ,"Video" , dev->name, +device_active (dev) ?"" :"in" ); +if (device_active (dev)) { +struct video_priv *upriv =dev_get_uclass_priv (dev); + +print_phys_addr ("FB base" , (ulong )upriv->fb); +if (upriv->copy_fb) +print_phys_addr ("FB copy" , (ulong )upriv->copy_fb); +printf ("%-12s= %dx%dx%d\n" ,"FB size" , upriv->xsize, + upriv->ysize,1 << upriv->bpix); + } + } +} +int do_bdinfo (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[]) {struct bd_info *bd = gd->bd;
@@ -96,7 +118,9 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])bdinfo_print_num ("fdt_blob" , (ulong )gd->fdt_blob);bdinfo_print_num ("new_fdt" , (ulong )gd->new_fdt);bdinfo_print_num ("fdt_size" , (ulong )gd->fdt_size); -#if defined(CONFIG_LCD ) || defined(CONFIG_VIDEO ) || defined(CONFIG_DM_VIDEO ) +if (IS_ENABLED (CONFIG_DM_VIDEO )) +show_video_info (); +#if defined(CONFIG_LCD ) || defined(CONFIG_VIDEO )bdinfo_print_num ("FB base " , gd->fb_base);#endif #if CONFIG_IS_ENABLED (MULTI_DTB_FIT )
include/video.h +2 -4
@@ -13,8 +13,6 @@#ifndef _VIDEO_H_#define _VIDEO_H_ -#ifdef CONFIG_DM_VIDEO -#include <stdio_dev.h> struct udevice ;
@@ -140,6 +138,7 @@ struct video_ops {*/ int video_reserve (ulong *addrp); +#ifdef CONFIG_DM_VIDEO /** * video_clear() - Clear a device's frame buffer to background color. *
@@ -147,6 +146,7 @@ int video_reserve(ulong *addrp);* @return 0 */ int video_clear (struct udevice *dev); +#endif /* CONFIG_DM_VIDEO */ /** * video_sync() - Sync a device's frame buffer with its hardware
@@ -243,8 +243,6 @@ static inline int video_sync_copy(struct udevice *dev, void *from, void *to) }#endif -#endif /* CONFIG_DM_VIDEO */ -#ifndef CONFIG_DM_VIDEO /* Video functions */
Signature · 1 line
2.28.0.681.g6f77f65b4e-goog
PATCH v3 5/5 x86: video: Show information about each video device
Quoted 6 lines · Simon Glass
At present the 'bdinfo' command shows the framebuffer address, but not the address of the copy framebuffer, if present. Add support for this.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Bin Meng <[email protected]>
Quoted 9 lines
---
Changes in v3:
- Update header file to avoid build error with !DM_VIDEOcmd/bdinfo.c | 26 +++++++++++++++++++++++++- include/video.h | 6 ++---- 2 files changed, 27 insertions(+), 5 deletions(-)
applied to u-boot-x86/next, thanks!