• Chris Wilson's avatar
    drm/i915/bios: Avoid temporary allocation whilst searching for downclock · 99834ea4
    Chris Wilson authored
    Alan Cox reported a missing check on the kmalloc return value for the
    allocation of a temporary mode used for searching for the LVDS downlock
    frequency. This allocation is roughly 200 bytes, a little too large to
    friviously place on the stack. However, we can simply use the few bytes
    we need stored within the original DVO timing data, skip the translation
    and do the compare directly between the timing data rather than on a
    mode, thus avoiding the need for any temporary allocations.
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Keith Packard <keithp@keithp.com>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    99834ea4
intel_bios.c 19.1 KB