x86: queensbay: Return directly if IGD / SDVO were already disabled
PATCH v2 1/2 x86: queensbay: Return directly if IGD / SDVO were already disabled
Initialize 'igd' and 'sdvo' to NULL so that we just need to test them against NULL later, to be compatible with that case that IGD and SDVO devices were already in disabled state.
---
Changes in v2:
- Reword the commit message and add a comment in the codes
arch/x86/cpu/queensbay/tnc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
arch/x86/cpu/queensbay/tnc.c +9 -11
@@ -18,19 +18,17 @@static int __maybe_unused disable_igd (void ) { -struct udevice *igd, *sdvo; +struct udevice *igd =NULL ; +struct udevice *sdvo =NULL ;int ret; - ret =dm_pci_bus_find_bdf (TNC_IGD , &igd); -if (ret) -return ret; -if (!igd) -return 0 ; - - ret =dm_pci_bus_find_bdf (TNC_SDVO , &sdvo); -if (ret) -return ret; -if (!sdvo) +/* +* In case the IGD and SDVO devices were already in disabled state, +* we should return and not proceed any further. +*/ +dm_pci_bus_find_bdf (TNC_IGD , &igd); +dm_pci_bus_find_bdf (TNC_SDVO , &sdvo); +if (!igd || !sdvo)return 0 ;/*
Signature · 1 line
2.25.1
PATCH v2 2/2 x86: crownbay: Use external graphics card by default
The board routes the Integrated Graphics Device (IGD) to an LVDS panel, which is less popular than a PCIe based graphics card.
Disable the IGD so that it does not show up in the PCI configuration space as a VGA display controller, so we can use an external PCIe graphics card with whatever cable we have.
---
(no changes since v1)
configs/crownbay_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
configs/crownbay_defconfig +1 -2
@@ -8,9 +8,8 @@ CONFIG_MAX_CPUS=2 CONFIG_DEFAULT_DEVICE_TREE="crownbay" CONFIG_VENDOR_INTEL=y CONFIG_TARGET_CROWNBAY=y +CONFIG_DISABLE_IGD=y CONFIG_SMP=y -CONFIG_HAVE_VGA_BIOS=y -CONFIG_VGA_BIOS_ADDR=0xfffa0000 CONFIG_GENERATE_PIRQ_TABLE=y CONFIG_GENERATE_MP_TABLE=y CONFIG_FIT=y
Signature · 1 line
2.25.1
Re: [PATCH v2 2/2] x86: crownbay: Use external graphics card by default
Quoted 8 lines · Bin Meng
The board routes the Integrated Graphics Device (IGD) to an LVDS panel, which is less popular than a PCIe based graphics card.
Disable the IGD so that it does not show up in the PCI configuration space as a VGA display controller, so we can use an external PCIe graphics card with whatever cable we have.
Quoted 9 lines
Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>---
(no changes since v1)
configs/crownbay_defconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
applied to u-boot-x86, thanks!
Quoted 7 lines · Bin Meng
Initialize 'igd' and 'sdvo' to NULL so that we just need to test them against NULL later, to be compatible with that case that IGD and SDVO devices were already in disabled state.
Signed-off-by Bin Meng <[email protected]>
Quoted 7 lines
---
Changes in v2:
- Reword the commit message and add a comment in the codesarch/x86/cpu/queensbay/tnc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
Quoted 11 lines · Simon Glass
Quoted 9 lines · Bin Meng
Initialize 'igd' and 'sdvo' to NULL so that we just need to test them against NULL later, to be compatible with that case that IGD and SDVO devices were already in disabled state.
Signed-off-by Bin Meng <[email protected]>---
Quoted 7 lines
Quoted 5 lines
Changes in v2:
- Reword the commit message and add a comment in the codesarch/x86/cpu/queensbay/tnc.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)Reviewed-by Simon Glass <[email protected]>
applied to u-boot-x86, thanks!