From 7141ff3b9f836220333ed153b726a6756b3a5f02 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 10 Oct 2016 17:49:00 +0200 Subject: nb/intel/*/graphic_init: use sizeof instead of hardcoding edid size Change-Id: I2b8c4ef75cca9f9d5251789cda4187a02076b69d Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/16964 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- src/northbridge/intel/sandybridge/gma_ivybridge_lvds.c | 3 ++- src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/northbridge/intel/sandybridge') diff --git a/src/northbridge/intel/sandybridge/gma_ivybridge_lvds.c b/src/northbridge/intel/sandybridge/gma_ivybridge_lvds.c index 831e8ce8b5..32becc1983 100644 --- a/src/northbridge/intel/sandybridge/gma_ivybridge_lvds.c +++ b/src/northbridge/intel/sandybridge/gma_ivybridge_lvds.c @@ -202,7 +202,8 @@ int i915lightup_ivy(const struct i915_gpu_controller_info *info, enable_port(mmio); - intel_gmbus_read_edid(mmio + PCH_GMBUS0, 3, 0x50, edid_data, 128); + intel_gmbus_read_edid(mmio + PCH_GMBUS0, 3, 0x50, edid_data, + sizeof(edid_data)); intel_gmbus_stop(mmio + PCH_GMBUS0); decode_edid(edid_data, sizeof(edid_data), &edid); diff --git a/src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c b/src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c index c2c8087b78..756f7bf4f2 100644 --- a/src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c +++ b/src/northbridge/intel/sandybridge/gma_sandybridge_lvds.c @@ -186,7 +186,8 @@ int i915lightup_sandy(const struct i915_gpu_controller_info *info, power_port(mmio); - intel_gmbus_read_edid(mmio + PCH_GMBUS0, 3, 0x50, edid_data, 128); + intel_gmbus_read_edid(mmio + PCH_GMBUS0, 3, 0x50, edid_data, + sizeof(edid_data)); decode_edid(edid_data, sizeof(edid_data), &edid); mode = &edid.mode; -- cgit v1.2.3