public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	"Wentland, Harry" <Harry.Wentland@amd.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/3] lib/debugfs: Don't do CRC sanity checks on amdgpu
Date: Wed, 27 Mar 2019 17:17:21 +0000	[thread overview]
Message-ID: <70caeba3-f023-bb42-860d-535f50fc44ae@amd.com> (raw)
In-Reply-To: <CAKMK7uG=hBzyzu93MMbERopYyM5jxK5P0f+2AoOMdt6L7cdx0g@mail.gmail.com>

On 3/27/19 1:09 PM, Daniel Vetter wrote:
> On Wed, Mar 27, 2019 at 4:11 PM Wentland, Harry <Harry.Wentland@amd.com> wrote:
>>
>>
>>
>> On 2019-03-15 11:04 a.m., Nicholas Kazlauskas wrote:
>>> A black FB on amdgpu returns a CRC of (0, 0, 0), which IGT considers
>>> suspicious. All our CRC values are also 16-bit so a value of 0xffffffff
>>> can't be obtained.
>>>
>>> Drop the suspicious CRC checks on amdgpu by checking the device in
>>> crc_sanity_checks. We need the drm_fd for this so pass in pipe_crc
>>> to the function to get it. It makes more sense to me to do it this
>>> way than to duplicate code and the explanation on both calls to
>>> crc_sanity_checks.
>>>
>>> v2: rebase
>>>
>>> Cc: Leo Li <sunpeng.li@amd.com>
>>> Cc: Harry Wentland <harry.wentland@amd.com>
>>> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>>
>> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> 
> Hm, I think simpler to just drop this test entirely. It's kinda bogus.
> Or at least have the sanity check only for the kms_pipe_crc_basic
> testcases. But I guess this works too.
> -Daniel
Isn't it still useful to keep this around for other tests on i915? Since 
those special codes could happen anywhere from my understanding.

Not sure if these are really useful for any other drivers, but I figured 
it was easier to just make an exception in this case for amdgpu since 
the tests are explicitly bogus on it.

Nicholas Kazlauskas

> 
>>
>> Harry
>>
>>> ---
>>>   lib/igt_debugfs.c | 10 +++++++---
>>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
>>> index 7849faad..dd229c09 100644
>>> --- a/lib/igt_debugfs.c
>>> +++ b/lib/igt_debugfs.c
>>> @@ -872,11 +872,15 @@ igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
>>>        return n;
>>>   }
>>>
>>> -static void crc_sanity_checks(igt_crc_t *crc)
>>> +static void crc_sanity_checks(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
>>>   {
>>>        int i;
>>>        bool all_zero = true;
>>>
>>> +     /* Any CRC value can be considered valid on amdgpu hardware. */
>>> +     if (is_amdgpu_device(pipe_crc->fd))
>>> +             return;
>>> +
>>>        for (i = 0; i < crc->n_words; i++) {
>>>                igt_warn_on_f(crc->crc[i] == 0xffffffff,
>>>                              "Suspicious CRC: it looks like the CRC "
>>> @@ -930,7 +934,7 @@ void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
>>>   {
>>>        read_one_crc(pipe_crc, crc);
>>>
>>> -     crc_sanity_checks(crc);
>>> +     crc_sanity_checks(pipe_crc, crc);
>>>   }
>>>
>>>   /**
>>> @@ -959,7 +963,7 @@ igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc)
>>>                }
>>>        } while (igt_vblank_before_eq(crc->frame, vblank));
>>>
>>> -     crc_sanity_checks(crc);
>>> +     crc_sanity_checks(pipe_crc, crc);
>>>   }
>>>
>>>   /**
>>>
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
> 
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-27 17:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 15:04 [igt-dev] [PATCH i-g-t v2 1/3] lib/drmtest: Add helpers to check and require amdgpu Nicholas Kazlauskas
2019-03-15 15:04 ` [igt-dev] [PATCH i-g-t v2 2/3] lib/debugfs: Don't do CRC sanity checks on amdgpu Nicholas Kazlauskas
2019-03-27 15:10   ` Wentland, Harry
2019-03-27 17:09     ` Daniel Vetter
2019-03-27 17:17       ` Kazlauskas, Nicholas [this message]
2019-03-28  9:11         ` Daniel Vetter
2019-03-15 15:04 ` [igt-dev] [PATCH i-g-t v2 3/3] lib/igt_fb: Align min_stride to 256 bytes for YUV buffers " Nicholas Kazlauskas
2019-03-27 15:15   ` Wentland, Harry
2019-03-18 10:13 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] lib/drmtest: Add helpers to check and require amdgpu (rev2) Patchwork
2019-03-18 11:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-27 15:09 ` [igt-dev] [PATCH i-g-t v2 1/3] lib/drmtest: Add helpers to check and require amdgpu Wentland, Harry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70caeba3-f023-bb42-860d-535f50fc44ae@amd.com \
    --to=nicholas.kazlauskas@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox