How to get the GPU error state
For all GPU-hang bugs, the most usefull information is on error state.
After a hang is detected all related and helpful information gets recorded in a error state that can be grab as instructed below.
It must be done after the hang, but before rebooting the machine.
Recent kernel version
On recent kernel you can grab this information from your sysfs:
$ cat /sys/class/drm/card0/error | gzip > error.gz
# Please note that depending you your environment it can be a different card number. But it is probably 0.
On old kernel but not older than 2.6.34 you need to get it from debugfs:
Anything from that file, other than "no error state collected", is very interesting and very helpful for bug reports.
 If you don't have a /sys/kernel/debug/dri directory, then make sure that debugfs is mounted like this:
sudo mount -t debugfs debugfs /sys/kernel/debug
 If you have n gpus, the directory could be also be:
Compress instead of Crop
All information on this file is useful, so please never crop the file when attatching it to a bug report, please compress it instead.