diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 96c341670782..dca4be970d13 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -945,47 +945,6 @@ void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe) | |||
945 | amdgpu_irq_put(adev, &adev->crtc_irq, idx); | 945 | amdgpu_irq_put(adev, &adev->crtc_irq, idx); |
946 | } | 946 | } |
947 | 947 | ||
948 | /** | ||
949 | * amdgpu_get_vblank_timestamp_kms - get vblank timestamp | ||
950 | * | ||
951 | * @dev: drm dev pointer | ||
952 | * @crtc: crtc to get the timestamp for | ||
953 | * @max_error: max error | ||
954 | * @vblank_time: time value | ||
955 | * @flags: flags passed to the driver | ||
956 | * | ||
957 | * Gets the timestamp on the requested crtc based on the | ||
958 | * scanout position. (all asics). | ||
959 | * Returns postive status flags on success, negative error on failure. | ||
960 | */ | ||
961 | int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int pipe, | ||
962 | int *max_error, | ||
963 | struct timeval *vblank_time, | ||
964 | unsigned flags) | ||
965 | { | ||
966 | struct drm_crtc *crtc; | ||
967 | struct amdgpu_device *adev = dev->dev_private; | ||
968 | |||
969 | if (pipe >= dev->num_crtcs) { | ||
970 | DRM_ERROR("Invalid crtc %u\n", pipe); | ||
971 | return -EINVAL; | ||
972 | } | ||
973 | |||
974 | /* Get associated drm_crtc: */ | ||
975 | crtc = &adev->mode_info.crtcs[pipe]->base; | ||
976 | if (!crtc) { | ||
977 | /* This can occur on driver load if some component fails to | ||
978 | * initialize completely and driver is unloaded */ | ||
979 | DRM_ERROR("Uninitialized crtc %d\n", pipe); | ||
980 | return -EINVAL; | ||
981 | } | ||
982 | |||
983 | /* Helper routine in DRM core does all the work: */ | ||
984 | return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error, | ||
985 | vblank_time, flags, | ||
986 | &crtc->hwmode); | ||
987 | } | ||
988 | |||
989 | const struct drm_ioctl_desc amdgpu_ioctls_kms[] = { | 948 | const struct drm_ioctl_desc amdgpu_ioctls_kms[] = { |
990 | DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), | 949 | DRM_IOCTL_DEF_DRV(AMDGPU_GEM_CREATE, amdgpu_gem_create_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), |
991 | DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), | 950 | DRM_IOCTL_DEF_DRV(AMDGPU_CTX, amdgpu_ctx_ioctl, DRM_AUTH|DRM_RENDER_ALLOW), |