Re: [PATCH] drm/i915: Implement read-only support in whitelist selftest

Tvrtko Ursulin
2019-06-19T06:41:09Z

On 18/06/2019 21:08, John Harrison wrote:
> Tvrtko, does this look plausible?
>
> It seems to work for me in that it passes on ICL with the new read-only
> registers. I'm not sure if there is a valid way to detect whether the
> registers are actually readable though. How would the test know what is
> a valid value? If one assumes that one gets back zero from an invalid
> read, how does one know that the read-only register is not supposed to
> return zero at this point anyway?
>
> Or is it worth just putting in a test for non-zero and if we do find a
> register that can validly return zero then we special case that one and
> ignore it?

I was thinking we just read the register and then verify it is unchanged
after every existing write to it.

Regards,

Tvrtko