• Matt Roper's avatar
    drm/i915/vbt: Handle generic DTD block · 33ef6d4f
    Matt Roper authored
    VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
    old LFP panel mode data in block 42.  Let's start parsing this block to
    fill in the panel fixed mode on devices with a >=229 VBT.
    
    v2:
     * Update according to the recent updates:
        - DTD size is now 16 bits instead of 24
        - polarity is now just a single bit for hsync and vsync and is
          properly documented
     * Minor checkpatch fix
    
    v3:
     * Now that panel options are parsed separately from the previous patch,
       move generic DTD parsing into a function parallel to
       parse_lfp_panel_dtd.  We'll still fall back to looking at the legacy
       LVDS timing block if the generic DTD fails.  (Jani)
     * Don't forget to actually set lfp_lvds_vbt_mode!  (Jani)
     * Drop "bdb_" prefix from dtd entry structure.  (Jani)
     * Follow C99 standard for structure's flexible array member.  (Jani)
    
    v4:
     * Add "positive" to polarity field names for clarity.  (Jani)
     * Move VBT version check and fallback to legacy DTD parsing logic to a
       helper to keep top-level VBT parsing uncluttered.  (Jani)
     * Restructure reserved bit packing at end of generic_dtd_entry from
       "u32 rsvd:24" to "u8 rsvd[3]" to prevent copy/paste mistakes in the
       future.  (Jani)
    
    Bspec: 54751
    Bspec: 20148
    Cc: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20191115165132.9472-3-matthew.d.roper@intel.com
    33ef6d4f
intel_bios.c 64.8 KB