Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38646 )
Change subject: drivers/intel/gma/edid: Measure execution time of EDID read function ......................................................................
drivers/intel/gma/edid: Measure execution time of EDID read function
Getting more data, it might turn out, that storing the EDID data in CBFS might save some time.
Change-Id: I4c3672ef85bfc2d206620e689626573e04a0f63b Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de --- M src/drivers/intel/gma/edid.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/38646/1
diff --git a/src/drivers/intel/gma/edid.c b/src/drivers/intel/gma/edid.c index 7e6c840..6885f98 100644 --- a/src/drivers/intel/gma/edid.c +++ b/src/drivers/intel/gma/edid.c @@ -15,6 +15,7 @@ #include <device/mmio.h> #include <console/console.h> #include <delay.h> +#include <timer.h>
#include "i915_reg.h" #include "edid.h" @@ -66,10 +67,12 @@ void intel_gmbus_read_edid(u8 *mmio, u8 bus, u8 slave, u8 *edid, u32 edid_size) { unsigned int i; + struct stopwatch sw;
slave &= 0x7f; edid_size &= 0x1fc;
+ stopwatch_init(&sw); wait_rdy(mmio); /* 100 KHz, hold 0ns, */ write32(GMBUS0_ADDR, bus); @@ -107,4 +110,6 @@ if ((i & 0xf) == 0xf) printk (BIOS_SPEW, "\n"); } + printk(BIOS_DEBUG, "%s finished in %lu msecs\n", __func__, + stopwatch_duration_msecs(&sw)); }