Sync with upstream GPU/video related commits from CM.
Also, fix a few things missed previously.