• David Weinehall's avatar
    drm/i915: Allow parsing of variable size child device entries from VBT · e2d6cf7f
    David Weinehall authored
    VBT version 196 increased the size of common_child_dev_config. The
    parser code assumed that the size of this structure would not change.
    
    The modified code now copies the amount needed based on the VBT version,
    and emits a debug message if the VBT version is unknown (too new); since
    the struct config block won't shrink in newer versions it should be
    harmless to copy the maximum known size in such cases, so that's what we
    do, but emitting the warning is probably sensible anyway.
    
    In the longer run it might make sense to modify the parser code to use a
    version/feature mapping, rather than hardcoding things like this, but
    for now the variants are fairly manageable.
    
    This fixes a regression introduced in
    
    commit 75067dde
    Author: Antti Koskipaa <antti.koskipaa@linux.intel.com>
    Date:   Fri Jul 10 14:10:55 2015 +0300
    
        drm/i915: Per-DDI I_boost override
    
    since that commit changed the child device config size without updating
    the checks and memcpy.
    
    v2: Stricter size checks
    
    v3 by Jani:
    - Keep the checks strict, and warnigns verbose, but keep going anyway.
    - Take care to copy the max amount of child device config we can.
    - Fix the messages.
    Signed-off-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    e2d6cf7f
intel_bios.h 24.7 KB