Re: [PATCH i-g-t] tests/kms_rotation_crc: Add bad-rotation subtest

Ville Syrjälä
2016-07-22T13:23:24Z

On Fri, Jul 22, 2016 at 01:52:32PM +0100, Matthew Auld wrote:
> I believe you're thinking of:
> https://patchwork.freedesktop.org/patch/77191/
> https://patchwork.freedesktop.org/patch/77192/
>
> Although they don't test for multiple rotation values...

I guess you could just

for (rotation = 0; rotation < 0x40; rotation++)
if (!is_power_of_2(rotation & 0xf) ||
(rotation & ~supported) != 0)
// expect failure
}

if you want to be really sure invalid crap won't get through.

--
Ville Syrjälä
Intel OTC