Age | Commit message (Collapse) | Author | Files | Lines |
|
Decode the new EFP panel index field.
TODO: hook this up into panel_str()
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add decoding for bunch of driver feature bits: Hpd wake, ADT, DFPS.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump the MIPI sequence blocks in the order they appear
in the VBT (as opposed to being ordered by the sequence type).
This makes it easier to compare the hexdump vs. the decoded
output, which is what I tend to do occasionally when trying to
check whether we are decoding things correctly or not.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump the backlight entry size for completeness. It's easier to
compare against the spec/etc. when everything is decoded.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode stuff from the backlight block based on the version
number.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
lace_aggressiveness_profile
The LFP power lace_aggressiveness_profile was introduced in
VBT verson 210. Check for that version before deocoding the
information.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Looks like there used to be a field for DPST in the LFP power block
feature bits. Later that got first into the driver features block,
and then back into a different part of the LFP power block.
Not sure when this got deprecated.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the (obsolete) backlight i2c stuff for completeness.
v2: Add missing '<' to "<reserved>" (Jani)
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump the AIM offsets from the header. I don't think these should
be actually in ant of modern VBT, but no harm in dumping them out
anyway.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Print out our idea of the minimum size for each block. Can be
helpful in determining if we're potentially decoding stuff
that's not really present.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Make it possible to give blocks a name without having to
implement full decoding.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Extract default_algorithm() for later use in decoding
other blocks.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
VBT may declare panel type as 255, which means we should match the
EDID PnP ID against the panel entries in the VBT to determine the
correct panel type. Implement support for this by allowing the user
to optionally provide the EDID via a command like parameter.
v2: Drop extra ' ' and some lefover debug junk (Jani)
v3: s/0/NULL/ for mmap()
s/ /_/ in usage() for consistency
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Modern VBTs can declare two panel types in order to support
dual panel systems. Dump the panel information for the second
panel as well. Since panel_type2 could also be declared as 255
(== match pnpid to EDID) we also add a new command line knob
to select panel_type2 by hand.
Data for the second panel will be indicated by "(2)", as opposed
to "(1)" for the first panel.
We can also end up in a situation where panel_type==panel_type2.
The reasons being a dodgy VBT, or the VBT might declare
panel_type==255 and panel_type2=0, and if we can't determine
which panel the 255 refers to (via pnpid) then we just default
to panel_type==0.
v2: Break the ?: into separate ifs (Jani)
Clarify why we can end up with panel_type==panel_type2 (Jani)
v3: Update usage()
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
In preparation for also indicating the second panel (panel_type2)
change the indicator for the first panel (panel_type) to "(1)"
from "*".
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Extract the code to generate the panel==panel_type indicator
string to a small helper.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Pull the repeated "dump this panel?" expression
into a small helper.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump the new stuff from the backlight block:
- brightness_level
- brightness_min_level
- brightness_precision_bits
- hdr_dpcd_refresh_timeout
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Real world VBTs keep fuzzing our decoder, this time with a legacy child
devices block #11 that has child_dev_size 0, leading to division by
zero. Check for it, and bail out early, both for legacy and current
child device blocks.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
The tool outputs the decoded and somewhat nicely formatted VBT to
stdout, so debug style messages to stdout aren't a great fit. For
example:
BDB blocks present:
1 2 9 10 12 20 27 40Generating LVDS data table pointers
41Generating LVDS data table pointers
42 43 44 46 51 52 53
56 57 58 252 253 254
Print the debug message about data table pointers to stderr instead.
Fixes: ce4d30196d3c ("tools/intel_vbt_decode: Generate LVDS data table pointes if not provided")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
MIPI sequence v4 has a flag for native/non-native GPIO.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode a bunch of newish child dev fields:
- disable_compression_for_ext_disp
- lttpr_non_transparent
- dp_port_trace_length
- tbt
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Stop decoding most child dev fields if the BDB version
is too old.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump out block 2 contents in the same (big endianish)
order as it's listed in the spec. Also group each bitfield
into its own little block. Makes it a bit easier to cross
check between the two.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the i2c speed, just for kicks.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Sync up the the VBT definitions from kernel commit
758b018aa283 ("drm/i915/bios: Add the "Disable compression
for the Display Port/HDMI external display" bit")
and adjust the actual code to match.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Print out the second panel type as well.
I decided to just get rid of the "(override %d)" stuff
as it doesn't really get us anything and doesn't really
make sense anyway when we have two possible panel types
to consider. The command line override may or may not match
either of those.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Respect the --all-panels in the MIPI blocks dumping
and dump all six possible panels.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The compression structure index is just that, and index. So just
dump it as a decimal number (and drop the mispaced parenthesis).
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Dump the DVO port using the more standard form:
"DVO Port: <decoded name> (<raw value>)".
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the AUX CH to a human readable name.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Print all the stuff from the driver features block, and print
it in the same order as the spec lists it to make it a bit
easier to compare the two.
Also use consistent naming for a bunch of the fields that
exist in both the driver features block and the power conservation
block.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We have a new field for eDP/DP max lane count. Decode it.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the "Use VBT swging tables" bit. Note that we don't decode
the actual tables so far.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Parse the max HDMI FRL rate stuff.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Extract the panel_fitting string representation into an array.
Less clutter in the code this way.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Extract the lvds_config string representation into an array.
Less clutter in the code this way.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
A bunch of places assign some random variable just to
print out its value with YESNO(). Skip the pointless
intermediate step.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a few helpers for extracting panel specific bits from
the bitfields.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Sync up the the VBT definitions from kernel commit
ac7af83ae08b ("drm/i915: Rename some VBT bits")
and adjust the actual code to match.
Note that 'slave_port' is gone now, so we'll just throw it out,
and the DP redriver stuff is now defined as bitfields which need
to be properly decoded.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
pointers
The current scheme for generating the LFP data table pointers
(when the block including them is missing from the VBT) expects
the 0xffff sequence to only appear in the fp_timing terminator
entries. However some VBTs also have extra 0xffff sequences
elsewhere in the LFP data. When looking for the terminators
we may end up finding those extra sequeneces insted, which means
we deduce the wrong size for the fp_timing table. The code
then notices the inconsistent looking values and gives up on
the generated data table pointers, preventing us from parsing
the LFP data table entirely.
Let's give up on the "search for the terminators" approach
and instead just hardcode the expected size for the fp_timing
table.
We have enough sanity checks in place to make sure we
shouldn't end up parsing total garbage even if that size
should change in the future (although that seems unlikely
as the fp_timing and dvo_timing tables have been declared
obsolete as of VBT version 229).
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Validate the LFP data block a bit hardwer by making sure the
fp_timing terminators (0xffff) are where we expect them to be.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The v3+ MIPI sequence block version number and new size
field are considered part of the BDB block header, and thus
not included in the reported size. Bump up the size appropariately
so that we copy the whole block.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
A bunch of places need to decode the DP vswing/preemph values.
Fortunately all of them use the the same format so we can
extract this stuff into a few helpers.
v2: Fix dp_preemph vs. dp_vswing copypaste fail (Jani)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
|
|
Get rid of the pointless switch statement and decode the
fast link training lane count as just <val>+1. We already
do the same for the DSI lane count.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
|
|
Warn in case out BDB block definition is smaller than what
the VBT has. That is an indication that we are potentially
forgetting to decode some useful new data.
We exclude blocks 2,11,22 from this since we don't have
a sensible min size for them.
We also limit this to modernish VBTs (155+) since some
old stuff doesn't really conform (eg. my cst with version
134 has a 9 byte block 1 even though our min size for it
is 7 bytes, and all the other oldish machines have block
1 only made up of of 4 or 5 bytes).
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Modern VBTs (at least observed on TGL machines) no longer provide the
LVDS data table pointers block. Thus we can't currently decode the
contents of the LVDS data table block.
I see two options how to handle this:
1) Just hardocode the offsets/sizes (+ some checks to make sure the
hardcoded values makes sense)
2) Deduce the offsets/sizes from the actual LVDS data table block
contents
I've chosen option 2 here. The fp_timing table 0xffff terminator
is what allows us to do this. We just look up the first two
of those from the LVDS data block and calculate the offsets/sizes
from there. Only the fp_timing entries should have a variable size,
and the dvo_timings and panel_pnp_id have fixed size (in fact IIRC
they are 1:1 match for the equivalent EDID stuff).
This is the same thing we do in the kernel parser as well since
commit a87d0a847607 ("drm/i915/bios: Generate LFP data table
pointers if the VBT lacks them")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Do a reasonably exhaustive check to make sure the LVDS
data table pointers are sane.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decoede the LVDS data pointers. The offsets are specificed from
the start of the whole VBT, but we've fixed them up to be relative
to the start of the block already. For human parsing printing
them as relative from the start of the block seems more useful
anywya.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the tail end of the LFP data, if available.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|