Allocate backing bo in CreatePixmap2 where it can safely fail

Previously we waited until ModifyPixmapHeader to
allocate the backing dumb_bo for the pixmap. If
this allocation failed, X would ignore it and end
up dereferencing a NULL pointer later on.

As CreatePixmap2 gives us all the info needed to
calculate the backing dumb_bo size, we can just
allocate it here. If this entrypoint fails, X will
report the error back to the client and carry on
normally.

Change-Id: I3de512c3e8981af4b4455796c8180101b6996512
4 files changed