This new test 'flip-vs-bad-tiling' will trigger the pin_count underflow BUG in the kernel due to page flip clobbering the crtc->fb pointer when queue_flip fails. With the kernel fix applied the test completes succesfully. I also included a small fix for a use-after-free bug I spotted.