)]}'
{
  "commit": "16c58081eb95e35f284421176f355eccfc773bbe",
  "tree": "5a631a0fb1f20a25201da6bd2e1862b28559a458",
  "parents": [
    "2f1f4d9b60396d2df4cff829bd5376ffc8ed9a2c"
  ],
  "author": {
    "name": "Simon Kitching",
    "email": "skitching@vonos.net",
    "time": "Thu Sep 20 12:59:16 2012 -0400"
  },
  "committer": {
    "name": "Alex Deucher",
    "email": "alexander.deucher@amd.com",
    "time": "Thu Sep 20 12:59:16 2012 -0400"
  },
  "message": "drm/radeon: Prevent leak of scratch register on resume from suspend\n\nCards typically have 5-7 scratch registers; one of these is reserved for\nrdev-\u003erptr_save_reg. Unfortunately the reservation is done in function\nr100_cp_init, which is called by all drivers except r600 - and this\nfunction is also invoked on resume from suspend. After several resumes,\nno scratch registers are free and graphics acceleration is disabled.\n\nDmesg then reports either:\n   *ERROR* radeon: cp failed to get scratch reg (-22).\n   *ERROR* radeon: cp isn\u0027t working(-22).\n   radeon 0000:01:00.0: failed initializing CP (-22).\nor:\n   *ERROR* radeon: failed to get scratch reg (-22).\n   *ERROR* radeon: failed testing IB on GFX ring (-22).\n   *ERROR* ib ring test failed (-22).\n\nThe chain of calls on boot for all except r600 is:\nradeon_init -\u003e ... -\u003e (rXXX_init) -\u003e rXXX_startup -\u003e r100_cp_init\n\nThe chain of calls on resume for all except r600 is:\nrXXX_resume -\u003e rXXX_startup -\u003e r100_cp_init.\n\nR600 correctly allocates rptr_save_reg in r600_init (ie once only, not\nin resume). However moving the code into the init functions for all\ndrivers means touching 4 drivers. So instead, this patch just adds a\ntest in r100_cp_init to avoid reallocating on resume. As the rdev\nstructure is allocated via kzalloc in radeon_driver_load_kms, and zero\nis not a valid registerid, zero safely implies not-yet-allocated.\n\nThis issue appears to have been introduced in c7eff978 (3.6.0-rcN)\n\nSigned-off-by: Simon Kitching \u003cskitching@vonos.net\u003e\nSigned-off-by: Alex Deucher \u003calexander.deucher@amd.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8acb34fd3fd548aa6e34d999682d0f8fafac95fd",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/radeon/r100.c",
      "new_id": "8d7e33a0b243585100839905205a5f11ccab5f06",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/radeon/r100.c"
    }
  ]
}
