From 25d01be47d0b5c1b545cc323ba11c2546c588d8b Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 1 Sep 2022 16:39:36 +0530 Subject: [PATCH] soc/intel/cmn/graphics: Use pci_dev_request_bus_master for BM enabling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabling Bus Master isn't required by the hardware, so we shouldn't need to enable it at all. However, some payloads do not set this bit before attempting DMA transfers, which results in functionality failure. For example: in this case, unable to see the developer screen in Depthcharge. In the prior IA SoC platform, FSP/GFX PEIM does the BM enabling for the IGD BAR resources but starting with the MTL platform, it fails to do so resulting into inability to see the Pre-OS display. BUG=b:243919230 ([Rex] Unable to see Pre-OS display although GFX PEIM Display Init is successful during AP boot) TEST=Able to see the developer screen with eDP/HDMI while booting the Google/Rex. Also, this change doesn't impact the previous platforms (ADL, TGL, CML etc.) where the BM is default enabled. Signed-off-by: Subrata Banik Change-Id: I9ad9eee8379b7ea1e50224e3fabb347e5f14c25b Reviewed-on: https://review.coreboot.org/c/coreboot/+/67273 Tested-by: build bot (Jenkins) Reviewed-by: Tarun Tuli Reviewed-by: Werner Zeh Reviewed-by: Angel Pons Reviewed-by: Wonkyu Kim Reviewed-by: Jamie Ryu Reviewed-by: Kapil Porwal --- src/soc/intel/common/block/graphics/graphics.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/soc/intel/common/block/graphics/graphics.c b/src/soc/intel/common/block/graphics/graphics.c index e4ef458631..6b5770c3d9 100644 --- a/src/soc/intel/common/block/graphics/graphics.c +++ b/src/soc/intel/common/block/graphics/graphics.c @@ -180,6 +180,7 @@ static const struct device_operations graphics_ops = { .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = gma_init, + .final = pci_dev_request_bus_master, .ops_pci = &pci_dev_ops_pci, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt = gma_generate_ssdt,