Age | Commit message (Collapse) | Author |
|
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>
|
|
Decode the panel PNP ID from the LVDS data block.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Get rid of the mess in the LVDS data block parsing and juse
use the offsets straight from the LVDS data table pointers
block.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
block
For some crazy reason the LFP data pointer offsets are specified
as relative to the BDB header. That won't work with out private
BDB block copies, so let's convert them to be relative to the
start of the LFP data block.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Guarantee that we have enough memory allocated for the structure
we use to decode the BDB blocks. We no longer have to worry about
going out of bounds in case of malformed VBT or incorrect version
checks.
The BDB_SDVO_PANEL_DTDS and BDB_GENERIC_DTD code looks a bit
bit suspicious so those probably need a full review. Also
BDB_LVDS_LFP_DATA and BDB_LVDS_LFP_DATA_PTRS will need further
work due to the variable size nature of the data.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Make a copy of the BDB blocks. For the moment we just do a
1:1 copy but later on we can specify a minimum size for
the copy and stop worrying about going out of bounds during
parsing in case the version checks are wrong of the VBT is
malformed.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Include the block header in the hex dump as well. Might
as well have the full data available in case we need to
diagnose some decoding failures.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
VBT version 244 onwards have a new eDP max link rate field.
Parse it.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
We're failing to parse the 5.4 Gbps value of the old
fast link training rate. Remedy it.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the fast link training link rate.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode per-panel stuff from the LVDS options block.
Not at all sure which version have which fields since the spec
only goes back to v155. But earlier VBTs do have some of this
stuff already so going by block size instead for the older
stuff.
Here's a quick list from my VBT stash:
mgm version 108 -> 4 bytes
alv version 120 -> 4 bytes
cst version 134 -> 14 bytes
pnv version 144 -> 14 bytes
cl version 142 -> 16 bytes
ctg version 155 -> 24 bytes
The pnv VBT is particularly interesting since it has a higher version
number that the cl VBT and yet has a smaller LVDS options block.
I guess the "Atom==let's not follow any rules" rule started already
back then.
All the more modern VBTs I have are 24 bytes (or more).
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the contents of the LFP power conservation block (44).
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Knowing the size of each block can help in figuring out what should
be in there. Let's dump that.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Print the panel type(s) the same way in dump_lvds_data() as
elsewhere.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the child device DP max link rate stuff.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Use the same logic as we use in the kernel to decode
the SSC frequency.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode new HDMI data rates.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode the DP/HDMI DVO ports up to 'I'.
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
24b8b74eb2eb ("drm/i915: Parse max link rate from the eDP BDB block")
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>
|
|
Opendir(3) and fdopendir(3) are quite expensive system calls when ran in
a loop which iterates all processes in a system times all open files in
each.
Replace some of them (easy ones) with simpler open(2)/read(2) combo to
avoid hammering on the malloc/free.
This brings the default CPU usage of the tool on my desktop from ~3% to
~2%.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Be nice and explicitly free all memory on exit.
Also fix a Valgrind reported unitilised conditional jump.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
On kernels without support for the feature we should skip showing the
clients header to avoid confusing users.
Simply briefly open a render node to the selected device during init and
look if the relevant fields are present in the fdinfo data.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/120
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Few PCI devices under DGFX card tree don't have any kernel driver.
These devices will block D3cold state of gfx root port.
Adding support to setup d3cold by enabling runtime PM for all PCI
devices under the gfx root port.
It will not save/restore pci devices power attributes.
It will be useful to tune D3Cold after boot.
v2:
- Change naming convention from configure_autosuspend to
setup-d3cold. [Rodrigo].
v3:
- Kept setting auto-suspend delay as optional. [Rodrigo]
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
intel_pm_rpm tool is a debug tool. It can be use to setup
and prepare the gfx card to go to D3Cold.
It also provide the debug option to disable all display and
prepare device to enter to runtime suspend.
v2:
- Removed IS_DGFX() condition.
v3:
- Change naming convention from setup-d3cold to force-d3cold-wait
disable-display to disable-display-wait. [Rodrigo]
v4:
- Use igt_setup_runtime_pm() only for --disable-display-wait.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Use the i915 exported data in /proc/<pid>/fdinfo to show GPU utilization
per DRM client.
Example of the output:
intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card0 - 220/ 221 MHz
70% RC6; 0.62/ 7.08 W; 760 irqs/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 23.06% |██████▊ | 0% 0%
Blitter 0.00% | | 0% 0%
Video 5.40% |█▋ | 0% 0%
VideoEnhance 20.67% |██████ | 0% 0%
PID NAME Render/3D Blitter Video VideoEnhance
3082 mpv | || ||▌ ||██ |
3117 neverball |█▉ || || || |
1 systemd |▍ || || || |
2338 gnome-shell | || || || |
v2:
* Removed hardcoded array size from client add/update by passing in
drm_fd_info directly.
* Added some asserts and simplified a couple expressions. (Umesh)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Add an api to support the CTA range color square video test
pattern as explained in section 3.2.5.3 of the DP CTS
specification. This pattern is required for supporting
the CTA range for RGB formats.
Also rename the existing api igt_fill_cts_framebuffer to
igt_fill_cts_color_ramp_framebuffer to highlight the
pattern type.
changes in v3:
- fix compilation warnings by reformatting code
changes in v2:
- removed redundant pointers
- fixed overall formatting issues
- Fixed author name
Signed-off-by: Maitreyee Rao <maitreye@codeaurora.org>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Save initial terminal attributes when in interactive mode, and reset
when the program quits or receives SIGINT. Prevents bad text entry
in some password prompts (e.g., su, passwd).
[tursulin: Added commit text from earlier posting. Drop static initializer.]
Signed-off-by: K. Eugene Carlson <kvngncrlsn@gmail.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Print out end user friendly help text when the running user has
insufficient privilege for accessing system wide performance counters.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/-/issues/5018
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Adding a cross-check with ABI config name space and not just relying on
sysfs names.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Acked-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
|
|
When kernel feature was removed the intel_gpu_top part was forgotten.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add another VRR test, this time to dermine on which scanline
the hardware will clear the push bit.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a new command line knob to specify the scanline on which we
should send the VRR push. This allows many of the test modes
to probe the hardware behaviour in the presence of VRR pushes.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Rework the structure of some of the loops a bit. This is
going to help slide VRR support into the tests.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add a couple of new test modes to verify how frame timestamps
work.
* frametimestamp determines on which scanline the frame
timestamp is sampled
* timestamp returns the difference between the current timestamp
on a specific scanline from the last sampled frame timestamp.
This can be used to determine if the timestamp ticks at the
expected rate.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Pull the code to wait for a specific scanline to a helper.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Test various things using mmio async flips. These are present since
g4x, except g4x does not seem to have a working flipdone interrupt.
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Use a more reasonable variable name for modifiers.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
DRM_FORMAT_MOD_LINEAR is the more sensible name for
DRM_FORMAT_MOD_NONE. Use the better name.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Add typechecking to the min/max macros and make their locals truly
unique-ish to reduce the risk of shadowing.
v2: small bug fix, write also height coordinate on rotation
test. (jheikkil)
v3: Fix up a couple of other max/max_t instances (Ashutosh)
Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
From TGL+, there is no eDP transcoder instead all transcoders supports
eDP panels but in 99% of the cases it is used in pipe/transcoder A.
Also there is couple of new registers for PSR2 selective fetch.
v2:
- adding VIDEO DIP
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Use the definition from kernel headers.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Just use the one from the kernel headers. Updated with:
git grep -l LOCAL_I915 | \
xargs sed -i -e '/^#define LOCAL_I915/d' -e 's/LOCAL_\(I915[[:alnum:]_]*\)/\1/g'
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Going forward, platforms may have separate architecture versions for
graphics and display and should no longer utilize a single 'gen'
version.
While doing this, let's change the versions to raw version values rather
than BIT(v) as we were doing in the past. It looks like some of the
existing uses of devinfo->gen were already misinterpreting this field
and failing to pass the value through ffs(), so this change may also fix
some bugs.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Add a wrapper for gem_create_ext ioctl (a version of gem_create that
accepts extensions). In preparation for the driver change implementing it,
a local definition of its id and necessary structs have been added,
which are to be erased as soon as those definitions
appear in the i915_drm.h file.
The new ioctl wrapper is added to a separate file.
For consistency the wrapper of the old ioctl, gem_create
is moved from ioctl_wrappers to gem_create.
Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Chris P Wilson <chris.p.wilson@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Just so that we can tell how the HW is configured.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Add test for determining on which scanline the flipdone interrupt
is signalled. ilk+ and vlv/chv have this. Earlier platforms had
a "flip pending" bit instead which only seems to respond to CS flips
so not relevant for MMIO based flips.
v2: Rework the loops a bit to ease VRR in the future
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|