aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-09-24 12:35:31 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-10-06 06:57:47 -0400
commit88e72717c2de4181d8a6de1b04315953ad2bebdf (patch)
tree3390bb603c0bb14ed0233362dba616af2fb60c96 /drivers/gpu/drm/amd/amdgpu
parent14152c8d30bbe5155d0438feb0a1931aee0e5bce (diff)
drm/irq: Use unsigned int pipe in public API
This continues the pattern started in commit cc1ef118fc09 ("drm/irq: Make pipe unsigned and name consistent"). This is applied to the public APIs and driver callbacks, so pretty much all drivers need to be updated to match the new prototypes. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Inki Dae <inki.dae@samsung.com> Cc: Jianwei Wang <jianwei.wang.chn@gmail.com> Cc: Alison Wang <alison.wang@freescale.com> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Rob Clark <robdclark@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c36
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h9
4 files changed, 31 insertions, 31 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 6647fb26ef25..5e43178d07d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -2349,10 +2349,10 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev,
2349 struct drm_file *file_priv); 2349 struct drm_file *file_priv);
2350int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon); 2350int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon);
2351int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon); 2351int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
2352u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, int crtc); 2352u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
2353int amdgpu_enable_vblank_kms(struct drm_device *dev, int crtc); 2353int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
2354void amdgpu_disable_vblank_kms(struct drm_device *dev, int crtc); 2354void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
2355int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, int crtc, 2355int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int pipe,
2356 int *max_error, 2356 int *max_error,
2357 struct timeval *vblank_time, 2357 struct timeval *vblank_time,
2358 unsigned flags); 2358 unsigned flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 9b34a3410c32..de116398fa49 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -721,7 +721,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
721 * an optional accurate timestamp of when query happened. 721 * an optional accurate timestamp of when query happened.
722 * 722 *
723 * \param dev Device to query. 723 * \param dev Device to query.
724 * \param crtc Crtc to query. 724 * \param pipe Crtc to query.
725 * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0). 725 * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0).
726 * \param *vpos Location where vertical scanout position should be stored. 726 * \param *vpos Location where vertical scanout position should be stored.
727 * \param *hpos Location where horizontal scanout position should go. 727 * \param *hpos Location where horizontal scanout position should go.
@@ -744,8 +744,9 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
744 * unknown small number of scanlines wrt. real scanout position. 744 * unknown small number of scanlines wrt. real scanout position.
745 * 745 *
746 */ 746 */
747int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int flags, 747int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
748 int *vpos, int *hpos, ktime_t *stime, ktime_t *etime, 748 unsigned int flags, int *vpos, int *hpos,
749 ktime_t *stime, ktime_t *etime,
749 const struct drm_display_mode *mode) 750 const struct drm_display_mode *mode)
750{ 751{
751 u32 vbl = 0, position = 0; 752 u32 vbl = 0, position = 0;
@@ -760,7 +761,7 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl
760 if (stime) 761 if (stime)
761 *stime = ktime_get(); 762 *stime = ktime_get();
762 763
763 if (amdgpu_display_page_flip_get_scanoutpos(adev, crtc, &vbl, &position) == 0) 764 if (amdgpu_display_page_flip_get_scanoutpos(adev, pipe, &vbl, &position) == 0)
764 ret |= DRM_SCANOUTPOS_VALID; 765 ret |= DRM_SCANOUTPOS_VALID;
765 766
766 /* Get optional system timestamp after query. */ 767 /* Get optional system timestamp after query. */
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 275f1c3dbba0..b9faaf800ae1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -600,36 +600,36 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev,
600 * amdgpu_get_vblank_counter_kms - get frame count 600 * amdgpu_get_vblank_counter_kms - get frame count
601 * 601 *
602 * @dev: drm dev pointer 602 * @dev: drm dev pointer
603 * @crtc: crtc to get the frame count from 603 * @pipe: crtc to get the frame count from
604 * 604 *
605 * Gets the frame count on the requested crtc (all asics). 605 * Gets the frame count on the requested crtc (all asics).
606 * Returns frame count on success, -EINVAL on failure. 606 * Returns frame count on success, -EINVAL on failure.
607 */ 607 */
608u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, int crtc) 608u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
609{ 609{
610 struct amdgpu_device *adev = dev->dev_private; 610 struct amdgpu_device *adev = dev->dev_private;
611 611
612 if (crtc < 0 || crtc >= adev->mode_info.num_crtc) { 612 if (pipe >= adev->mode_info.num_crtc) {
613 DRM_ERROR("Invalid crtc %d\n", crtc); 613 DRM_ERROR("Invalid crtc %u\n", pipe);
614 return -EINVAL; 614 return -EINVAL;
615 } 615 }
616 616
617 return amdgpu_display_vblank_get_counter(adev, crtc); 617 return amdgpu_display_vblank_get_counter(adev, pipe);
618} 618}
619 619
620/** 620/**
621 * amdgpu_enable_vblank_kms - enable vblank interrupt 621 * amdgpu_enable_vblank_kms - enable vblank interrupt
622 * 622 *
623 * @dev: drm dev pointer 623 * @dev: drm dev pointer
624 * @crtc: crtc to enable vblank interrupt for 624 * @pipe: crtc to enable vblank interrupt for
625 * 625 *
626 * Enable the interrupt on the requested crtc (all asics). 626 * Enable the interrupt on the requested crtc (all asics).
627 * Returns 0 on success, -EINVAL on failure. 627 * Returns 0 on success, -EINVAL on failure.
628 */ 628 */
629int amdgpu_enable_vblank_kms(struct drm_device *dev, int crtc) 629int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
630{ 630{
631 struct amdgpu_device *adev = dev->dev_private; 631 struct amdgpu_device *adev = dev->dev_private;
632 int idx = amdgpu_crtc_idx_to_irq_type(adev, crtc); 632 int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
633 633
634 return amdgpu_irq_get(adev, &adev->crtc_irq, idx); 634 return amdgpu_irq_get(adev, &adev->crtc_irq, idx);
635} 635}
@@ -638,14 +638,14 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, int crtc)
638 * amdgpu_disable_vblank_kms - disable vblank interrupt 638 * amdgpu_disable_vblank_kms - disable vblank interrupt
639 * 639 *
640 * @dev: drm dev pointer 640 * @dev: drm dev pointer
641 * @crtc: crtc to disable vblank interrupt for 641 * @pipe: crtc to disable vblank interrupt for
642 * 642 *
643 * Disable the interrupt on the requested crtc (all asics). 643 * Disable the interrupt on the requested crtc (all asics).
644 */ 644 */
645void amdgpu_disable_vblank_kms(struct drm_device *dev, int crtc) 645void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe)
646{ 646{
647 struct amdgpu_device *adev = dev->dev_private; 647 struct amdgpu_device *adev = dev->dev_private;
648 int idx = amdgpu_crtc_idx_to_irq_type(adev, crtc); 648 int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
649 649
650 amdgpu_irq_put(adev, &adev->crtc_irq, idx); 650 amdgpu_irq_put(adev, &adev->crtc_irq, idx);
651} 651}
@@ -663,26 +663,26 @@ void amdgpu_disable_vblank_kms(struct drm_device *dev, int crtc)
663 * scanout position. (all asics). 663 * scanout position. (all asics).
664 * Returns postive status flags on success, negative error on failure. 664 * Returns postive status flags on success, negative error on failure.
665 */ 665 */
666int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, int crtc, 666int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int pipe,
667 int *max_error, 667 int *max_error,
668 struct timeval *vblank_time, 668 struct timeval *vblank_time,
669 unsigned flags) 669 unsigned flags)
670{ 670{
671 struct drm_crtc *drmcrtc; 671 struct drm_crtc *crtc;
672 struct amdgpu_device *adev = dev->dev_private; 672 struct amdgpu_device *adev = dev->dev_private;
673 673
674 if (crtc < 0 || crtc >= dev->num_crtcs) { 674 if (pipe >= dev->num_crtcs) {
675 DRM_ERROR("Invalid crtc %d\n", crtc); 675 DRM_ERROR("Invalid crtc %u\n", pipe);
676 return -EINVAL; 676 return -EINVAL;
677 } 677 }
678 678
679 /* Get associated drm_crtc: */ 679 /* Get associated drm_crtc: */
680 drmcrtc = &adev->mode_info.crtcs[crtc]->base; 680 crtc = &adev->mode_info.crtcs[pipe]->base;
681 681
682 /* Helper routine in DRM core does all the work: */ 682 /* Helper routine in DRM core does all the work: */
683 return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error, 683 return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error,
684 vblank_time, flags, 684 vblank_time, flags,
685 &drmcrtc->hwmode); 685 &crtc->hwmode);
686} 686}
687 687
688const struct drm_ioctl_desc amdgpu_ioctls_kms[] = { 688const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
index 2b03425f9740..f6b02994442b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
@@ -540,11 +540,10 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, bool use_aux);
540 540
541void amdgpu_encoder_set_active_device(struct drm_encoder *encoder); 541void amdgpu_encoder_set_active_device(struct drm_encoder *encoder);
542 542
543int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, int crtc, 543int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
544 unsigned int flags, 544 unsigned int flags, int *vpos, int *hpos,
545 int *vpos, int *hpos, ktime_t *stime, 545 ktime_t *stime, ktime_t *etime,
546 ktime_t *etime, 546 const struct drm_display_mode *mode);
547 const struct drm_display_mode *mode);
548 547
549int amdgpu_framebuffer_init(struct drm_device *dev, 548int amdgpu_framebuffer_init(struct drm_device *dev,
550 struct amdgpu_framebuffer *rfb, 549 struct amdgpu_framebuffer *rfb,