summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2019-08-15lib/igt_kms: use struct edid instead of unsigned charSimon Ser
This has several advantages: * No more need to convert back and forth between these two (everybody should use struct edid, the exception being lib/tests/igt_edid which performs sanity checks) * Makes it clearer that users can call edid_get_size on a returned EDID blob * Improves type safety (it's more obvious is a random blob is used as an EDID) Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-08-14lib/igt_chamelium: add support for GetLastInfoFrameSimon Ser
This new call retrieves the last InfoFrame received by the Chamelium board. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-08-14lib/igt_infoframe: new librarySimon Ser
This commit introduces a new igt_infoframe library, used to parse InfoFrames. For now only audio InfoFrames are supported. Support for AVI and other types of InfoFrames is planned (and will come with the matching tests). Unlike igt_edid, InfoFrames are parsed into a higher-level user-friendly struct. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-08-14lib/display_require: reset hdcp on all connectorsRamalingam C
At the start of every test, reset HDCP state to UNDESIRED on all connectors, so that we will not have any hdcp related noises in the subsequent tests. v2: igt_output_set_prop_enum is used. Documentation of display_reset is updated. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111390 Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2019-08-12lib/sw_sync: Fix querying fence statusChris Wilson
To query the fence status, and only the fence status, you only need to pass .num_fences = 0. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2019-08-12lib/i915: Trim ring measurement by oneChris Wilson
Be a little more conservative in our ring measurement and exclude one batch to leave room in case our user needs to wrap (where a request will be expanded to cover the unused space at the end of the ring). References: https://bugs.freedesktop.org/show_bug.cgi?id=111374 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
2019-08-06kms_content_protection: Content type supportRamalingam C
Adds a connector property called "CP_Content_Type" Content Type takes two values which classifies the content stream: Type 0: Stream that can be transmitted on HDCP1.4/HDCP2.2 Type 1: Stream that needs HDCP2.2 encryption only. So when Type 1 is set KMD is forced to enable HDCP2.2 only. For Type 0 request, Kernel chooses the highest capable HDCP version (v2.2) first. If that fails, then it fall back to the next available version(v1.4) before abondoning HDCP authentication attempts. Please note content_type is allowed to be updated when "Content Protection" is in UNDESIRED state. v2: s/cp_content_type/content_protection_type [danvet] v3: s/content_protection_type/HDCP Content Type [Pekka] v4: Rebased v5: Typos in the commit msg is fixed [Uma] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/315467/?series=57756&rev=10
2019-08-01lib/i915: Remove discontinued i915 module parametersAshutosh Dixit
i915 module parameters "enable_guc_submission" and "enable_execlists" have been discontinued since 2017 so remove them from IGT too. Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-07-23i915/gem_mocs_settings: Identify CometlakeChris Wilson
Cometlake is yet another Skylake refresh and used the same MOCS registers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111137 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2019-07-22lib/tgl: Add TGL PCI IDs to match tableLucas De Marchi
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-22lib/tgl: Add Tigerlake platform definitionJavier Villavicencio
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Javier Villavicencio <javier.villavicencio@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-22lib: sync i915_pciids.h with kernelLucas De Marchi
Straight copy from the kernel file, aligned with drm-intel-next-queued commit cb823ed9915b ("drm/i915/gt: Use intel_gt as the primary object for handling resets") By Stuart: Add the mobile vs non-mobile pineview platforms to device info to match what is in the kernel. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Stuart Summers <stuart.summers@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_edid: assert data blocks fit in CEA extensionSimon Ser
This check could probably be more precise, but at least it checks we haven't written past the EDID block end. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-07-19lib/igt_chamelium: autodiscover Chamelium port mappingsSimon Ser
This removes the need for configuring Chamelium ports in .igtrc, making it both easier and less error-prone to setup Chamelium boards. A new function chamelium_autodiscover sets a different EDID on each Chamelium port and plugs them. We then walk the list of DRM connectors, read back the EDID and infer the mapping. The EDID serial number is used to tell each port apart. In case a mapping is already configured in the .igtrc file, we check that it's consistent. MST is not handled yet (requires refactoring existing tests since connector IDs aren't stable). Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: add chamelium_get_video_portsSimon Ser
This function queries the video port IDs supported by the Chamelium device. It'll be used to know on which ports we can perform auto-detection. An alternative would be to hardcode a list of port IDs. However port IDs are specific to each Chamelium board, and will change for a different implementation. Also it would be nice to have simulators implement the Chamelium API… Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: set EDID serialSimon Ser
Set a different EDID serial string for each Chamelium port, so that we can easily tell which DRM connector maps to a Chamelium port. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: upload one EDID per portSimon Ser
Instead of uploading the EDID in chamelium_new_edid, do it in chamelium_port_set_edid so that we can customize the EDID depending on the port. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: add CHAMELIUM_MAX_PORTSSimon Ser
We will always be able to find an upper bound for the number of connectors supported by a Chamelium board. Instead of using dynamic arrays, simplify the code by using static ones. More code will need to have arrays of ports in the future. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: split chamelium_new_edidSimon Ser
Split the part that uploads an EDID to the Chamelium board into a new chamelium_upload_edid function. The function will be called in chamelium_set_edid instead of chamelium_new_edid when automatic Chamelium port mapping is implemented. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: allow EDIDs to be mutated for each portSimon Ser
This adds the infrastructure necessary to change EDIDs provided to chamelium_new_edid, without actually doing it yet. This commit just updates the API to make it possible, documents expectations and updates callers accordingly. Mutating EDIDs is necessary to add an identifier to them (e.g. by adding a serial number) and to be able to map Chamelium ports to DRM connectors. A new function chamelium_edid_get_raw allows callers to retrieve the exact EDID used for a particular port. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-19lib/igt_chamelium: fix chamelium_port_set_edid docsSimon Ser
There were two issues: 1. The documentation was wrong, the EDID ID 0 doesn't disable EDIDs, it just resets the EDID to Chamelium's default one. 2. My previous patch updating these docs missed the second line of the argument description. The result was that only reading the first line was fine, but reading both lines felt weird. Signed-off-by: Simon Ser <simon.ser@intel.com> Fixes: 1f67ee0d09d6 ("lib/igt_chamelium: replace EDID IDs with opaque structs") Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-17lib/igt_chamelium: add chamelium_supports_get_video_paramsSimon Ser
This allows to skip video params tests on Chamelium boards which aren't recent enough. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-07-17lib/igt_chamelium: add chamelium_port_get_video_paramsSimon Ser
This new XML-RPC call allows to retrieve mode information from the Chamelium. We can use it to check the mode we've chosen has been applied correctly. The method has been added to the Chameleon API in commit [1]. [1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/1df012d6ac9429a58a5e0f9362a1ff98f1bff8a7 Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2019-07-16lib: Ditch "DRIVER_* for kms tests" cargo cultDaniel Vetter
KMS is meant to be a (at least somewhat) generic userspace API. We do not want nor need to add a special match function for every driver ever written, that doesn't make sense, defeats the point of having generic tests for a generic testsuite, and really doesn't scale. Also add a comment so people don't try to add ever more of these. Also, this means no autoloading for you, but really igt should reinvent udev, and mostly this was needed for 2 reasons: - CI configuration falling to pieces because tests unloaded a driver, and then died before cleaning up. - vgem, which is fake, and needs to be requested explictily. We might want to throw that all out again, except for vgem. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Deepak Rawat <drawat@vmware.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: "Ser, Simon" <simon.ser@intel.com> Cc: Oleg Vasilev <oleg.vasilev@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-07-15lib/igt_edid: add docsSimon Ser
Add a description of the library, and add misisng function docs. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-15lib/igt_kms: remove unused update_edid_csumSimon Ser
I missed it when removing the old EDID generation code. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-11lib/tests/igt_edid: check number of extensionsSimon Ser
Make sure we don't miss an extension by verifying the EDID field. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-11lib/igt_kms: add igt_kms_get_3d_edidSimon Ser
This replaces kmstest_edid_add_3d. The previous code for generating CEA extensions can be removed. The old and new generated EDIDs are byte-to-byte equal. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-11lib/igt_edid: add enum for HDMI VSDB video flagsSimon Ser
Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2019-07-08tests/i915/gem_spin_batch: Update with engine discoveryRamalingam C
Legacy execbuf abi tests are prefixed with legacy. New test are added to run on physical engines accessed through engine discovery. So legacy tests run on the unconfigured (with engine map) context and use a new helper gem_eb_flags_to_engine to look up the engine from the intel_execution_engines2 static list. This is only to enable the core test code to be shared. Places where new contexts are created had to be updated to either equally configure the contexts or not. v2: helper called gem_engine_is_equal is added [tvrtko] rebased to adopt the changte in eb_flag to engine [tvrtko] v3: returned the result of the expression itself [tvrtko] Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-07-08lib/igt_fb: Allow creating yuv fbs with different encodings/rangesVille Syrjälä
Pass the color encoding/range to igt_create_fb_with_bo_size() so that tests are able to generate fbs with various encodings/ranges. v2: Drop the _full() variants of th fb create funcs (Nicholas) Cc: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> #v1 Reviewed-by: Uma Shankar <uma.shankar@intel.com> #v1 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-08lib/igt_core: Add support for subtest descriptionsArkadiusz Hiler
This patch adds igt_description() which attaches a description to the following igt_subtest or igt_subtest_group block. Descriptions are accessible via './test --describe[=pattern]' Subtest description is its own igt_describe as well as igt_describes of all the parenting igt_subtest_groups, starting from the outermost scope. Examples of code and produced outputs are included in lib/test/igt_describe.c and as a documentation comment on igt_describe() macro. v2: address Simon's review Cc: Simon Ser <simon.ser@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com>
2019-07-05lib/igt_kms: use igt_edid to generate a 4K EDIDSimon Ser
The new EDID has been byte-by-byte checked to be exactly the same as before. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-05lib/igt_edid: add support for Short Video DescriptorsSimon Ser
Short Video Descriptors (SVDs, not to be confused with Vendor-Specific Data blocks) describe CEA video formats supported by the monitor. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-05lib/igt_edid: add support for native DTDs in CEA extension blocksSimon Ser
Native Detailed Timing Descriptors follow the Data Block Collection in the CEA extension. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-05lib/igt_edid: add hdmi_vsdbSimon Ser
The HDMI Vendor-Specific Data Block, defined as an opaque blob in the EDID spec, is described in the HDMI 1.4 spec. Most of the extension fields are optional, so it doesn't translate well to a C struct. For now callers need to manually fill the hdmi_vsdb.data field. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-05lib/igt_edid: s/vsd/vsdb/Simon Ser
"VSDB" (Vendor-Specific Data Block) is the wording used by CEA 861D. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-05lib/igt_kms: remove length parameter from kmstest_force_edidSimon Ser
Given an EDID, computing the size is trivial. Instead of having one size constant per EDID and hope the callers use the right one (ie. *not* EDID_LENGTH when there's an extension), we can make functions that take EDIDs compute the size if they need it. We have tests in lib/tests/igt_edid.c which assert the number of extensions present in the EDID anyway. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-04lib/intel_chipset: Move BIT macro to common placeLukasz Kalamarz
This macro is defined in two tests. We can move it to common place in ioctl_wrappers, which is included by all tests. v2: Missed intel_device_info lib. Moved BIT definition to intel_chipset, which is part of igt.h Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Michal Winiarski <michal.winiarski@intel.com> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
2019-07-03lib: Add --skip-crc-compare optionMatt Roper
When using --interactive-debug, it's sometimes desirable to ignore CRC mismatches and let the test proceed as if they passed so that the on-screen outcome can be inspected. Let's add a debug option to allow this. Cc: igt-dev@lists.freedesktop.org Signed-off-by: Matt Roper <matthew.d.roper@intel.com> [vsyrjala: pimp the debug message to indicate the skip] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-07-03lib/igt_eld: print debug message when no ELD is foundSimon Ser
When this happens, the logs were completely empty previously, which can be quite confusing. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-02i915: Fix gem_context_has_engine_map() for older kernelsChris Wilson
CI is currently breaking on linus/drm-intel-fixes due to the assert that the kernel supports context engine maps. Report the lack of maps on older kernels gracefully! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2019-07-02lib/igt_edid: add edid_get_mfgSimon Ser
This returns the 3-letter manufacturer identifier of an EDID. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-02lib/igt_edid: add edid_get_sizeSimon Ser
This is a simple helper to get the size in bytes of an arbitrary EDID. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2019-07-02tests/i915/gem_ctx_switch: Fix I915_EXEC_DEFAULT testingTvrtko Ursulin
Commit ad129d2a583689765eaef31ff57e8cdd219f1d05 ("tests/i915/gem_ctx_switch: Update with engine discovery") broke testing of I915_EXEC_DEFAULT. Bring it back. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
2019-07-02lib/i915_pciids: Add missing device ID for ICLMika Kahola
We are missing PCI device ID for SKU ICLLP U GT 1.5F (0x8A54) as per BSPec. Align with kernel commit 93d7a3b4be30 ("drm/i915/icl: Add missing device ID") BSpec: 21141 v2: Corresponding kernel commit added in commit message (Petri) v3: Fix error on BSPec index (Stuart) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com>
2019-06-28lib/i915: Use engine discovery in gem_test_enginesTvrtko Ursulin
If request is to verify all engines work, use the new engine discovery API so we can actually test all. There is a sporadic and mysterious, possibly memory corruption issue surronding this area so lets see if this changes the pattern. It is easy to do in this function due it re-opening the driver and throwing it away. So there are no concerns that the modified default context can affect any other test. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> References: https://bugzilla.freedesktop.org/show_bug.cgi?id=110667 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-06-28tests/i915/gem_ctx_switch: Update with engine discoveryTvrtko Ursulin
I converted this one as an example, or at least to drive the discussion, how more complex tests can be converted. I have kept the legacy execbuf abi testing prefixed with "legacy-". New tests were added to exercise physical engines via engine discovery and also "all" tests have been updated in the same way. To keep things simpler and avoid having to create separate contexts legacy tests have to be first since the __for_each_physical_engine iterator would otherwise configure the default context and confuse the test. So legacy tests run on the unconfigured (with engine map) context and use a new helper gem_eb_flags_to_engine to look up the engine from the intel_execution_engines2 static list. This is only to enable the core test code to be shared. Places where new contexts are created had to be updated to either equally configure the contexts or not. Another new helper, gem_context_has_engine_map was added to enable this. Also beware of drive-by formatting changes. v2: * Fix hyphen mess in subtest names. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ramalingam C <ramalingam.c@intel.com> Cc: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-06-27lib/igt_debugfs: add DPRX pipe crc source for AMDGPUDingchen Zhang
Need DPRX CRC source to validate AMDGPU 8bpc bypass mode. Added AMDGPU DPRX pipe crc source in igt_debugfs.h v2: dropped the CRTC and AUTO crc sources for AMDGPU (Nicholas) Cc: Harry Wentland <Harry.Wentland@amd.com> Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com> Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
2019-06-27lib/igt_fb: add functionality of getting framebuffer 16-bit CRC.Dingchen Zhang
Need framebuffer CRC to validate AMDGPU bypass mode. For each color component less than 16-bits, padding zero bits, loop to update CRC for each RGB compoment in the framebuffer. The algorithm is based on DP spec v1.4. Cc: Harry Wentland <Harry.Wentland@amd.com> Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com> Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>