projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e86f9ce
)
drm/amdgpu: Don't crash system if we can't get crtc
author
Harry Wentland
<
[email protected]
>
Wed, 25 Nov 2015 20:42:09 +0000
(15:42 -0500)
committer
Alex Deucher
<
[email protected]
>
Wed, 10 Feb 2016 21:08:40 +0000
(16:08 -0500)
Signed-off-by: Harry Wentland <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index e23843f4d877be7813a1574db0f855847f9aa591..56f771e6dfa5a4e7f2fa10fa64a7244be012115b 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@
-727,6
+727,12
@@
int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int pipe,
/* Get associated drm_crtc: */
crtc = &adev->mode_info.crtcs[pipe]->base;
+ if (!crtc) {
+ /* This can occur on driver load if some component fails to
+ * initialize completely and driver is unloaded */
+ DRM_ERROR("Uninitialized crtc %d\n", pipe);
+ return -EINVAL;
+ }
/* Helper routine in DRM core does all the work: */
return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error,