int igd_memory = 0;
if (CONFIG_VIDEO_MB == 512) { igd_memory = (CONFIG_VIDEO_MB); } else { igd_memory = (CONFIG_VIDEO_MB * 1024); }
If you made the 512(K) 0.5 (MB), then you wouldn't need the if.
tomk -= (CONFIG_VIDEO_MB * 1024);
I think CONFIG_VIDEO_MB=512 is misleading.
Thanks, Myles