summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
7 hourstests/intel/xe_exec_fault_mode: Fix misuse of __xe_wait_ufenceHEADmasterBrian Welty1-2/+2
When confirming that xe_exec() user_fences completed, this is performed in a loop. When using __xe_wait_ufence(), it returns an updated timeout value to reflect how much time was remaining. As side-effect, when calling in a loop without resetting the timeout, the timeout value will get progressively smaller over many iterations. We don't want a smaller timeout to be used on each subsequent call to __xe_wait_ufence(), so fix here is to reset the timeout inside the loop. This issue is visible in simulation runs due to the slower execution time, where later iterations of the wait are failing due to timeout being too small. Signed-off-by: Brian Welty <brian.welty@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
13 hourstests/xe_ccs: Update compression check based on flat-ccs enablementAkshata Jahagirdar1-7/+33
In Xe2+ platforms,we need to run this test regardless of the status of flat-ccs. Check if the platform supports compression and has flat ccs enabled, and if it doesn't, then update the checks accordingly and proceed with the test. Additionally, On Xe2 dGPU, compression is only supported with VRAM. When copying from VRAM -> sysmem the KMD uses mapping with uncompressed PAT so the copy in system memory is guaranteed to be uncompressed. When restoring such buffers from sysmem -> VRAM the KMD can't easily know which pages were originally compressed, so we always use uncompressed -> uncompressed here. so this means there's no need for extra CCS storage on such platforms. Thats why we shouldn't need to run suspend-resume on xe2 dgpu. Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Acked-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
13 hourslib/intel_blt: Add helper function to ensure platform has flat-ccs enabledAkshata Jahagirdar2-0/+15
Add helper function to check if platform has flat-ccs enabled by reading from debugfs entry. Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
15 hourslib/igt_kms: remove unused igt_force_and_check_bigjoiner_statusKunal Joshi2-29/+0
remove unused igt_force_and_check_bigjoiner_status Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
15 hourstests/intel/kms_big_joiner: use kmstest_force_connector_bigjoinerKunal Joshi1-10/+11
use kmstest_force_connector_bigjoiner instead of kmstest_force_connector_bigjoiner v2: use igt_reset_connectors (Bhanu) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
15 hourslib/igt_kms: add support for forcing bigjoiner on particular connectorKunal Joshi2-0/+74
add kmstest_force_connector_bigjoiner function which force bigjoiner on provided connector as well as resets on exit. v2: remove redundant function (Bhanu) v3: initialize idx (Bhanu) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
15 hourstests/intel/kms_big_joiner: add missing commit after resetKunal Joshi1-0/+1
add missing commit after reset Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
15 hourstests/intel/kms_big_joiner: fix crash in multi joiner testKunal Joshi1-2/+4
Fix test from crashing on out of bound. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
15 hourslib/igt_kms: don't run on unsupported platformKunal Joshi1-0/+8
dipslay <=12 needs dsc enabled for pipe joiner, add a check in IGT for the same v2: dsc is required for gen12, so test only for devid 13 and 13+ (Ankit) v3: update comment (Bhanu) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Suggested-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
18 hourstests/xe_evict|exec_threads: Use fd reopen to avoid corrupting global dataZbigniew Kempczyński2-19/+13
Device scanning and filtering was designed to work in multi-process environment. Due to that opening the device with drm_open_driver() in multiple threads lead to global device data corruption. At the moment there's no easy way to redesign this so simplest thing we may do is to just acquire device fd in main process and reopen it (this doesn't involve any device scanning) in spawned threads. Lets use drm_reopen_driver() to stop calling not thread-safe code. Cc: Matthew Brost <matthew.brost@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240422144713.76025-1-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
39 hourstools/intel_reg: Fix mchbar register writeVille Syrjälä1-0/+3
I somehow lost the write part of the mchbar register support. Add it back so that we can also write mchbar registers without having to remember the address of the mirror range. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
5 daystests/amdgpu/amd_deadlock: run only on GPUs supporting resetJesse Zhang1-0/+23
Only enable deadlock test for ASICs supporting GPU reset. The issue is reported by: GMP Vikram <vikram.gmp@amd.com> v2: - Improve commit message (Kamil) Cc: Vitaly Prosyak <vitaly.prosyak@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed by: Vitaly Prosyak <vitaly.prosyak@amd.com>
6 daystools/intel_vbt_decode: Decode the EFP indexVille Syrjälä1-0/+3
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>
6 daystools/intel_vbt_decode: Decode all the driver feature bitsVille Syrjälä1-0/+6
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>
6 daystools/intel_vbt_decode: Dump MIPI sequences in the order they appear in VBTVille Syrjälä1-5/+2
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>
6 daystools/intel_vbt_decode: Dump out the backlight entry sizeVille Syrjälä1-0/+2
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>
6 daystools/intel_vbt_decode: Add version checks for backlight decodingVille Syrjälä1-12/+23
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>
6 daystools/intel_vbt_decode: Check version before decoding ↵Ville Syrjälä1-0/+3
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>
6 daystools/intel_vbt_decode: Decode the obsolote DPST supported fieldVille Syrjälä1-0/+2
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>
6 daystools/intel_vbt_decode: Decode the backlight i2c stuffVille Syrjälä1-13/+32
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>
6 daystools/intel_vbt_decode: Dump AIM offsetsVille Syrjälä1-0/+2
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>
6 daystools/intel_vbt_decode: Print the block min sizeVille Syrjälä1-2/+2
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>
6 daystools/intel_vbt_decode: Allow blocks to be named without full decodingVille Syrjälä1-5/+4
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>
6 daystools/intel_vbt_decode: Extract default_algorithm()Ville Syrjälä1-1/+6
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>
6 daystools/intel_vbt_decode: update vbt defs from kernelVille Syrjälä1-17/+19
Sync intel_vbt_defs.h up to kernel commit 962601ac4c78 ("drm/i915/bios: Pimp the VBT backlight data BDB version comments") Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
6 daystests/intel/xe_pm: Tests vm-unbind all flag functionality with S&RSai Gowtham Ch1-6/+17
Test validates vm unbind all flag functionality with suspend and resume. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
6 daystests/intel/xe_pm: Validate vm-bind prefetch flag with suspend and resumeSai Gowtham Ch1-3/+15
Test functionality of vm_bind prefetch with S&R. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
6 daystests/intel/xe_pm: Test validates vm-bind userptr flag with suspend and resumeSai Gowtham Ch1-18/+62
Test validates vm bind usertpr functionality, by suspend and resuming the device after binding VM to a VA. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
6 dayslib/kunit: Read results from debugfsJanusz Krzysztofik1-36/+93
KUnit can provide KTAP reports from test modules via debugfs files, one per test suite. Using that source of test results instead of extracting them from dmesg, where they may be interleaved with other kernel messages, seems more easy to handle and less error prone. Switch to it. If KUnit debugfs support is found not configured then fall back to legacy processing path. v3: Try to open KUnit debugfs directory before applying KUnit filters we use for test case listing, otherwise those skip-all filters applied can break legacy path we may enter on missing KUnit debugfs support (detected by Kamil). v2: Check validity of debugfs argument before calling kunit_get_tests() (Kamil), - replace multiple openat() + fdopen/fdopendir(), each followed by an error check, with less expensive fopen/opendir() of file/dir pathname components concatenated to a local buffer, protected from buffer overflow or truncation with a single check for enough buffer space (Lucas), - avoid confusing 'if' statement condition (Lucas). Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
7 daystests/intel/xe_sysfs_defaults: Validate for all default valuesNakshtra Goyal1-3/+3
Change in igt_assert_f function parameters so that it also validate for property value equals to 0. v2: use uint64_t for property_value,use bool __igt_sysfs_get_u64 in igt_assert_f(Kamil) v3: correcting format type for property value in igt_debug in test_defaults function for uint64_t type(Kamil) Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Cc: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Cc: Priyanka Dandamudi <priyanka.dandamudi@intel.com> Cc: Kamil Konieczny <kamil.konieczny@intel.com> Signed-off-by: Nakshtra Goyal <nakshtra.goyal@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Reviewed-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
7 daystools/gputop: Fix engine columns with amdgpuTvrtko Ursulin1-1/+26
Amdgpu kernel driver skips output of fdinfo keys for unused engines. That is completely legal but corrupts the column formatting in the current code. Fix it by simply treating change in detected engines used by a client as trigger to re-emit a new header. This ensures columns are always correctly aligned, albeit with a cost of potentially duplicating the header for the same DRM minor. This is considered good enough for a reference implementation. The alternative would be to add some real per DRM minor state tracking which sounds like an overkill, at least until gputop gains a nicer (any) UI. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Acked-by: Christian König <christian.koenig@amd.com>
7 dayslib/kms: Clear connector_attrs[] upon setting the reset valueVille Syrjälä1-0/+3
When anyone manually sets the connector attr to the reset value we can stop tracking said attr. Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
7 dayslib/kms: Generalize forced_connectors[] to handle arbitrary attributesVille Syrjälä1-51/+92
We may want to poke at various other connector attributes via sysfs/debugfs. Generalize the existing the force_connectors mechamisn to handle arbitrary attributes. v2: Fix connector_attr_alloc() Set c->value before using it Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
7 dayslib/kms: Adjust forced_connectors[] traversalVille Syrjälä1-11/+16
Get rid of the sentinel in forced_comnectors[] and just use ARRAY_SIZE() to determine the limits. The sentinel stuff actually looks broken due to the use of ARRAY_SIZE() in forced_connector_free_index(), which was apparently my doing in commit ed6539ced33e ("lib/igt_kms: Rework forced connector handling") Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
7 dayslib/kms: Introduce struct igt_forced_connectorVille Syrjälä1-19/+31
Give the forced_connector[] struct a proper type name, and utilize it in various places to make the code less messy. Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
9 dayslib/igt_kmod: Fix sigaction write to uninitialized memoryZbigniew Kempczyński1-8/+8
I've noticed on running kunit subtest: ./xe_live_ktest --r xe_bo IGT-Version: 1.28-NO-GIT (x86_64) (Linux: 6.8.0-xeint+ x86_64) Using IGT_SRANDOM=1712922311 for randomisation Starting subtest: xe_bo Received signal SIGSEGV. Stack trace: #0 [fatal_sig_handler+0xda] #1 [__sigaction+0x50] #2 [__libc_sigaction+0x10f] #3 [kunit_get_tests+0x417] #4 [igt_kunit+0x35f] #5 [__igt_unique____real_main41+0x44] #6 [main+0x48] #7 [__libc_init_first+0x90] #8 [__libc_start_main+0x80] #9 [_start+0x25] Subtest xe_bo: CRASH (0.005s) Looks this is related to sigaction() write to memory referenced by uninitialized pointer located on the stack. Lets fix it. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
11 daystests/intel/xe_vm: Always have at least 2 pages bound in munmap hammer sectionsMatthew Brost1-4/+9
If the prefetch buffer is 2k or larger the munmap hammer sections will prefetch the next page, if the page is unbound a fault will occur. Account for larger prefetchs by always having at least 2 pages bound for the hammer thread. v2: - Missed table entry v3: - Don't modify mmap section (Jonathan) - Add assert to ensure no prefetch overrun (Matt Auld) Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Jagmeet Randhawa <jagmeet.randhawa@intel.com> Acked-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://lore.kernel.org/r/20240412041841.491326-2-matthew.brost@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
11 daysRevert "tests/intel/xe_vm: Do not error on -ECANCELED"Matthew Brost1-4/+2
The test should never unbind an address used by hammer thread nor should the exec queue in the hammer thread get banned. This reverts commit 81462e71323ae6764d7f509f4a1bbd3e41aab13e. Cc: Jonathan Cavitt <jonathan.cavitt@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Acked-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://lore.kernel.org/r/20240412041841.491326-1-matthew.brost@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
12 daystests: Remove collisions with Subcategory and FunctionalityKatarzyna Piecielska13-19/+19
Let's remove Sub-category/Functionality name collisions: - changes in Functionality: s/DRM/drm_mm/ s/dmabuf/dmabuf test/ s/compute/compute test/ s/synchronization/fences/ s/vma/virtual address/ s/kunit/kunit test/ s/mocs/mocs configuration/ s/intel-nouveau/intel-nouveau uapi/ Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
12 daystests/intel: Remove documentation collisions in i915_selftestKatarzyna Piecielska1-11/+11
Let's remove Category/Sub-category/Functionality name collisions. Also reorder documentation in those cases to follow pattern as in other tests: SUBTEST Description Category Sub-category Functionality Feature Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
12 daystests/intel: Remove documentation collision for Obsolete categoryKatarzyna Piecielska9-17/+17
Let's remove collision in Category and Feature. Once I am here let's order docs as in other places: SUBTEST Description Category Sub-category Funtionality Feature v2: s/obsolete/obsolete_test/ for 2 remaining kms tests. Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
12 daystests/intel: Remove name collision in Display tests visible in Core docsKatarzyna Piecielska2-2/+2
Display team is not using Subcategory field, but this test is visible in Core documentation. Let's remove name collision in Category, Subcategory and Functionality. Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
12 daystests/intel: Add missing Sub-category for xe_waitfenceKatarzyna Piecielska1-0/+1
Add missing Sub-category for xe_waitfence subtests. Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Cc: Priyanka Dandamudi <Priyanka.dandamudi@intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
12 daystests/gem|xe_ccs: Check surface ccs data instead of naive comparisonZbigniew Kempczyński2-11/+19
Start using function which extracts ccs data from the surface and determines its compression. Cc: Karolina Stolarek <karolina.stolarek@intel.com> Cc: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com> Reviewed-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Link: https://lore.kernel.org/r/20240410100915.48541-3-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
12 dayslib/intel_blt: Add functions which extract and check object ccs dataZbigniew Kempczyński2-0/+133
In tests which use compression we did very naive check in which we compare source and destination surface. For linear we could expect differences are related to compression, unfortunately for tiled data this attitude is not appropriate due to natural data layout difference. Lets add helpers to extract surface ccs data and check if such surface is compressed. Function which extracts ccs data is defined as public to dump such data to png in the future. Cc: Karolina Stolarek <karolina.stolarek@intel.com> Cc: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com> Reviewed-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Link: https://lore.kernel.org/r/20240410100915.48541-2-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
13 dayslib: fix calloc calls with inverted argumentsMauro Carvalho Chehab2-5/+5
The new gcc version 14 now complains when calloc is called with inverted arguments. use the script from: a0ee73a8f359 ("benchmarks: fix calloc calls with inverted arguments") To fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
13 daystests: fix calloc calls with inverted argumentsMauro Carvalho Chehab10-17/+17
The new gcc version 14 now complains when calloc is called with inverted arguments. use the script from: a0ee73a8f359 ("benchmarks: fix calloc calls with inverted arguments") To fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
13 daysassembler: fix calloc calls with inverted argumentsMauro Carvalho Chehab2-4/+4
The new gcc version 14 now complains when calloc is called with inverted arguments. use the script from: a0ee73a8f359 ("benchmarks: fix calloc calls with inverted arguments") To fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
13 daysbenchmarks: fix calloc calls with inverted argumentsMauro Carvalho Chehab2-4/+4
The new gcc version 14 now complains when calloc is called with inverted arguments: ../benchmarks/gem_exec_reloc.c:85:31: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 85 | target = calloc(sizeof(*target), num_relocs); | ^ ../benchmarks/gem_exec_reloc.c:85:31: note: earlier argument should specify number of elements, later size of each element Replace all occurrences of calloc that were warned on gcc 14 by placing the arguments at the right order. Logic fixed using this small python script, written specifically to catch gcc calloc warnings: #!/usr/bin/env python3 import re warnings = [ "lib/igt_kms.c:2781", "lib/igt_kms.c:2809", "lib/igt_kms.c:2858", "lib/igt_chamelium.c:156", "lib/igt_chamelium.c:1519", "tests/kms_atomic_transition.c:483", "tests/kms_atomic_transition.c:485", "tests/kms_atomic_transition.c:487", "tests/kms_flip.c:426", "tests/kms_flip.c:427", "tests/intel/gem_exec_alignment.c:204", "tests/intel/gem_exec_alignment.c:409", "tests/intel/gem_exec_fair.c:1121", "tests/intel/gem_exec_fair.c:1122", "tests/intel/gem_fence_thrash.c:153", "tests/intel/gem_fence_thrash.c:234", "tests/intel/gem_ppgtt.c:432", "tests/intel/gem_ppgtt.c:459", "tests/intel/gem_render_tiled_blits.c:152", "tests/intel/gem_userptr_blits.c:1433", "tests/chamelium/kms_chamelium_frames.c:943", "tests/amdgpu/amd_multidisplay_modeset.c:242", "benchmarks/gem_exec_reloc.c:83", "benchmarks/gem_exec_reloc.c:84", "benchmarks/gem_exec_reloc.c:85", "benchmarks/gem_latency.c:196", "assembler/main.c:400", "assembler/gram.y:219", "assembler/gram.y:231", "assembler/gram.y:242", ] split_file = re.compile(r"([^\:]+):(\d+)") calloc = re.compile(r"(calloc\s*\()(.*)\,\s*([\w\d\ \+\*\-\>]+)(\))") for f in warnings: match = split_file.match(f) if not match: continue fname = match.group(1) line_number = int(match.group(2)) new = "" with open(fname, 'r', encoding = 'utf8') as fp: for ln, line in enumerate(fp): if ln + 1 == line_number: new_line = calloc.sub(r"\1\3, \2\4", line) if new_line != line: line = new_line else: print(f"{fname}, line {line_number}: FAILED: {line.strip()}") new += line with open(fname, 'w', encoding = 'utf8') as fp: fp.write(new) Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
14 daystests/intel/xe_exec_store: fix sync usageMatthew Auld1-10/+12
If using async binds it looks like an in-fence for the exec is needed to ensure the exec happens after the out-fence from the binds are complete. Therefore we need to unset DRM_XE_SYNC_FLAG_SIGNAL after doing the binds, but before the exec, otherwise the sync is rather treated as an out-fence and the binds can then happen after the exec, leading to various failures. In addition it looks like async unbind should be waited on before tearing down the queue/vm which has the bind engine attached, since the scheduler timeout is immediately set to zero on destroy, which might then trigger job timeouts. However it looks like it's also fine to rather just destroy the object and leave KMD to unbind everything itself. Update the various subtests here to conform to this. In the case of the persistent subtest it looks simpler to use sync vm_bind since we don't have another sync for the in-fence at hand, plus we don't seem to need a dedicated bind engine. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1270 Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com>