drm/gma500: Sanity-check pipe index
Subsystems (24)
PATCH 1/16 drm/gma500: Sanity-check pipe index
From: Thierry Reding <[email protected]>
If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe() will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly check for this condition and causes the following compiler warnings:
CC drivers/gpu/drm/gma500/mdfld_dsi_dpi.o drivers/gpu/drm/gma500/mdfld_dsi_dpi.c: In function ‘mdfld_dsi_dpi_mode_set’: drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:828:35: warning: array subscript is below array bounds [-Warray-bounds] u32 pipeconf = dev_priv->pipeconf[pipe]; ^ drivers/gpu/drm/gma500/mdfld_dsi_dpi.c:829:33: warning: array subscript is below array bounds [-Warray-bounds] u32 dspcntr = dev_priv->dspcntr[pipe]; ^
Fix this by checking for a valid pipe before indexing the pipeconf and dspcntr arrays.
--- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/gma500/mdfld_dsi_dpi.c +7 -3
@@ -821,14 +821,18 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,struct drm_device *dev = dsi_config->dev;struct drm_psb_private *dev_priv = dev->dev_private;int pipe =mdfld_dsi_encoder_get_pipe (dsi_encoder); -u32 pipeconf_reg =PIPEACONF ;u32 dspcntr_reg =DSPACNTR ; +u32 pipeconf, dspcntr; -u32 pipeconf = dev_priv->pipeconf[pipe]; -u32 dspcntr = dev_priv->dspcntr[pipe];u32 mipi =MIPI_PORT_EN |PASS_FROM_SPHY_TO_AFE |SEL_FLOPPED_HSTX ; +if (WARN_ON (pipe <0 )) +return ; + + pipeconf = dev_priv->pipeconf[pipe]; + dspcntr = dev_priv->dspcntr[pipe]; +if (pipe) { pipeconf_reg =PIPECCONF ; dspcntr_reg =DSPCCNTR ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/16 drm/bochs: Store correct CRTC index in events
From: Thierry Reding <[email protected]>
Previously a negative pipe caused a special case to be triggered for drivers that didn't have proper VBLANK support. The trigger for this special case is now independent of the pipe, so the correct CRTC index can now be stored in events.
v2: convert to use drm_crtc_send_vblank_event()
--- drivers/gpu/drm/bochs/bochs_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bochs/bochs_kms.c +1 -1
@@ -119,7 +119,7 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc,bochs_crtc_mode_set_base (crtc,0 ,0 , old_fb);if (event) {spin_lock_irqsave (&bochs->dev->event_lock, irqflags); -drm_send_vblank_event (bochs->dev,-1 , event); +drm_crtc_send_vblank_event (crtc, event);spin_unlock_irqrestore (&bochs->dev->event_lock, irqflags); }return 0 ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/16 drm/imx: Make pipe number unsigned
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
There's no reason whatsoever why this should ever be negative. The same goes for the number of pipes added to the DRM device.
--- drivers/gpu/drm/imx/imx-drm-core.c | 6 +++--- drivers/gpu/drm/imx/imx-drm.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/imx/imx-drm-core.c +3 -3
@@ -39,20 +39,20 @@ struct imx_drm_component {struct imx_drm_device {struct drm_device *drm;struct imx_drm_crtc *crtc[MAX_CRTC ]; -int pipes; +unsigned int pipes;struct drm_fbdev_cma *fbhelper; };struct imx_drm_crtc {struct drm_crtc *crtc; -int pipe; +unsigned int pipe;struct imx_drm_crtc_helper_funcs imx_drm_helper_funcs; };static int legacyfb_depth =16 ;module_param (legacyfb_depth, int,0444 ); -int imx_drm_crtc_id (struct imx_drm_crtc *crtc) +unsigned int imx_drm_crtc_id (struct imx_drm_crtc *crtc) {return crtc->pipe; }
drivers/gpu/drm/imx/imx-drm.h +1 -1
@@ -12,7 +12,7 @@ struct drm_framebuffer;struct imx_drm_crtc ;struct platform_device ; -int imx_drm_crtc_id (struct imx_drm_crtc *crtc); +unsigned int imx_drm_crtc_id (struct imx_drm_crtc *crtc);struct imx_drm_crtc_helper_funcs {int (*enable_vblank)(struct drm_crtc *crtc);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/16 drm/imx: Drop pipe field from struct imx_drm_crtc
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Use the drm_crtc_index() helper to determine the pipe number of the CRTC instead.
--- drivers/gpu/drm/imx/imx-drm-core.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/gpu/drm/imx/imx-drm-core.c +8 -9
@@ -45,7 +45,6 @@ struct imx_drm_device {struct imx_drm_crtc {struct drm_crtc *crtc; -unsigned int pipe;struct imx_drm_crtc_helper_funcs imx_drm_helper_funcs; };
@@ -54,7 +53,7 @@ module_param(legacyfb_depth, int, 0444);unsigned int imx_drm_crtc_id (struct imx_drm_crtc *crtc) { -return crtc->pipe; +return drm_crtc_index (crtc->crtc); }EXPORT_SYMBOL_GPL (imx_drm_crtc_id);
@@ -129,19 +128,19 @@ EXPORT_SYMBOL_GPL(imx_drm_set_bus_format);int imx_drm_crtc_vblank_get (struct imx_drm_crtc *imx_drm_crtc) { -return drm_vblank_get (imx_drm_crtc->crtc->dev, imx_drm_crtc->pipe); +return drm_crtc_vblank_get (imx_drm_crtc->crtc); }EXPORT_SYMBOL_GPL (imx_drm_crtc_vblank_get);void imx_drm_crtc_vblank_put (struct imx_drm_crtc *imx_drm_crtc) { -drm_vblank_put (imx_drm_crtc->crtc->dev, imx_drm_crtc->pipe); +drm_crtc_vblank_put (imx_drm_crtc->crtc); }EXPORT_SYMBOL_GPL (imx_drm_crtc_vblank_put);void imx_drm_handle_vblank (struct imx_drm_crtc *imx_drm_crtc) { -drm_handle_vblank (imx_drm_crtc->crtc->dev, imx_drm_crtc->pipe); +drm_crtc_handle_vblank (imx_drm_crtc->crtc); }EXPORT_SYMBOL_GPL (imx_drm_handle_vblank);
@@ -363,12 +362,11 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,return -ENOMEM ; imx_drm_crtc->imx_drm_helper_funcs = *imx_drm_helper_funcs; - imx_drm_crtc->pipe = imxdrm->pipes++; imx_drm_crtc->crtc = crtc; crtc->port = port; - imxdrm->crtc[imx_drm_crtc->pipe] = imx_drm_crtc; + imxdrm->crtc[imxdrm->pipes++] = imx_drm_crtc; *new_crtc = imx_drm_crtc;
@@ -385,7 +383,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,return 0 ; err_register: - imxdrm->crtc[imx_drm_crtc->pipe] =NULL ; + imxdrm->crtc[--imxdrm->pipes] =NULL ;kfree (imx_drm_crtc);return ret; }
@@ -397,10 +395,11 @@ EXPORT_SYMBOL_GPL(imx_drm_add_crtc);int imx_drm_remove_crtc (struct imx_drm_crtc *imx_drm_crtc) {struct imx_drm_device *imxdrm = imx_drm_crtc->crtc->dev->dev_private; +unsigned int pipe =drm_crtc_index (imx_drm_crtc->crtc);drm_crtc_cleanup (imx_drm_crtc->crtc); - imxdrm->crtc[imx_drm_crtc->pipe] =NULL ; + imxdrm->crtc[pipe] =NULL ;kfree (imx_drm_crtc);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 04/16] drm/imx: Drop pipe field from struct imx_drm_crtc
Am Donnerstag, den 24.09.2015, 18:35 +0200 schrieb Thierry Reding:
Quoted 7 lines
From: Thierry Reding <[email protected]>
Use the
drm_crtc_index()helper to determine the pipe number of the CRTC instead.Cc Philipp Zabel <[email protected]>Signed-off-by Thierry Reding <[email protected]>
regards
Philipp
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/16 drm/imx: Store correct CRTC index in events
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. i.MX does support VBLANKs, so there is no need for the fallback code.
--- drivers/gpu/drm/imx/ipuv3-crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/imx/ipuv3-crtc.c +2 -1
@@ -212,7 +212,8 @@ static void ipu_crtc_handle_pageflip(struct ipu_crtc *ipu_crtc)spin_lock_irqsave (&drm->event_lock, flags);if (ipu_crtc->page_flip_event) -drm_send_vblank_event (drm,-1 , ipu_crtc->page_flip_event); +drm_send_vblank_event (drm,imx_drm_crtc_id (ipu_crtc->imx_crtc), + ipu_crtc->page_flip_event); ipu_crtc->page_flip_event =NULL ;imx_drm_crtc_vblank_put (ipu_crtc->imx_crtc);spin_unlock_irqrestore (&drm->event_lock, flags);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/16 drm/rockchip: Store correct CRTC index in events
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. Rockchip does support VBLANKs, so there is no need for the fallback code.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +1 -1
@@ -1289,7 +1289,7 @@ static void vop_win_state_complete(struct vop_win *vop_win,if (state->event) {spin_lock_irqsave (&drm->event_lock, flags); -drm_send_vblank_event (drm,-1 , state->event); +drm_send_vblank_event (drm, vop->pipe, state->event);spin_unlock_irqrestore (&drm->event_lock, flags); }
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/16 drm/sti: Store correct CRTC index in events
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. STi does support VBLANKs, so there is no need for the fallback code.
--- drivers/gpu/drm/sti/sti_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sti/sti_crtc.c +1 -1
@@ -274,7 +274,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,spin_lock_irqsave (&drm_dev->event_lock, flags);if (compo->mixer[*crtc]->pending_event) { -drm_send_vblank_event (drm_dev,-1 , +drm_send_vblank_event (drm_dev, *crtc, compo->mixer[*crtc]->pending_event);drm_vblank_put (drm_dev, *crtc); compo->mixer[*crtc]->pending_event =NULL ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 07/16] drm/sti: Store correct CRTC index in events
Quoted 19 lines · Thierry Reding
From: Thierry Reding <[email protected]>
A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. STi does support VBLANKs, so there is no need for the fallback code.
Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/sti/sti_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/sti/sti_crtc.c +0
-0
drivers/gpu/drm/sti/sti_crtc.c int sti_crtc_vblank_cb(struct notifier_block *nb, · line 280
Quoted 8 lines
drivers/gpu/drm/sti/sti_crtc.c +1
-1@@ -274,7 +274,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,spin_lock_irqsave (&drm_dev->event_lock, flags);if (compo->mixer[*crtc]->pending_event) { -drm_send_vblank_event (drm_dev,-1 , +drm_send_vblank_event (drm_dev, *crtc, compo->mixer[*crtc]->pending_event);drm_vblank_put (drm_dev, *crtc); compo->mixer[*crtc]->pending_event =NULL ;
Successfully tested on next-20151001
Vincent
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 8/16 drm/irq: Rename drm_crtc -> crtc
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Since the original crtc parameter was renamed to pipe, there is no longer a need to artificially prefix the CRTC parameter.
--- drivers/gpu/drm/drm_irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_irq.c +4 -4
@@ -1280,7 +1280,7 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);/** * drm_crtc_vblank_reset - reset vblank state to off on a CRTC -* @drm_crtc: CRTC in question +* @crtc: CRTC in question * * Drivers can use this function to reset the vblank state to off at load time. * Drivers should use this together with the drm_crtc_vblank_off() and
@@ -1288,11 +1288,11 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);* drm_crtc_vblank_off() is that this function doesn't save the vblank counter * and hence doesn't need to call any driver hooks. */ -void drm_crtc_vblank_reset (struct drm_crtc *drm_crtc) +void drm_crtc_vblank_reset (struct drm_crtc *crtc) { -struct drm_device *dev = drm_crtc->dev; +struct drm_device *dev = crtc->dev;unsigned long irqflags; -unsigned int pipe =drm_crtc_index (drm_crtc); +unsigned int pipe =drm_crtc_index (crtc);struct drm_vblank_crtc *vblank = &dev->vblank[pipe];spin_lock_irqsave (&dev->vbl_lock, irqflags);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedRe: [PATCH 08/16] drm/irq: Rename drm_crtc -> crtc
Quoted 6 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Since the original crtc parameter was renamed to pipe, there is no longer a need to artificially prefix the CRTC parameter.
Signed-off-by Thierry Reding <[email protected]>
Applied to drm-misc, thanks.
-Daniel
Quoted 39 lines
--- drivers/gpu/drm/drm_irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/drm_irq.c +4
-4@@ -1280,7 +1280,7 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);/** * drm_crtc_vblank_reset - reset vblank state to off on a CRTC -* @drm_crtc: CRTC in question +* @crtc: CRTC in question * * Drivers can use this function to reset the vblank state to off at load time. * Drivers should use this together with the drm_crtc_vblank_off() and @@ -1288,11 +1288,11 @@ EXPORT_SYMBOL(drm_crtc_vblank_off);* drm_crtc_vblank_off() is that this function doesn't save the vblank counter * and hence doesn't need to call any driver hooks. */ -void drm_crtc_vblank_reset (struct drm_crtc *drm_crtc) +void drm_crtc_vblank_reset (struct drm_crtc *crtc) { -struct drm_device *dev = drm_crtc->dev; +struct drm_device *dev = crtc->dev;unsigned long irqflags; -unsigned int pipe =drm_crtc_index (drm_crtc); +unsigned int pipe =drm_crtc_index (crtc);struct drm_vblank_crtc *vblank = &dev->vblank[pipe];spin_lock_irqsave (&dev->vbl_lock, irqflags);Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 9/16 drm/irq: Use unsigned int pipe in public API
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 36 +++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 9 +++---- drivers/gpu/drm/armada/armada_drv.c | 8 +++--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 6 +++-- drivers/gpu/drm/drm_irq.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 +-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 5 ++-- drivers/gpu/drm/gma500/psb_drv.h | 6 ++--- drivers/gpu/drm/gma500/psb_irq.c | 8 +++--- drivers/gpu/drm/gma500/psb_irq.h | 6 ++--- drivers/gpu/drm/i915/i915_irq.c | 34 ++++++++++++------------- drivers/gpu/drm/imx/imx-drm-core.c | 8 +++--- drivers/gpu/drm/mga/mga_drv.h | 6 ++--- drivers/gpu/drm/mga/mga_irq.c | 20 +++++++-------- drivers/gpu/drm/msm/msm_drv.c | 12 ++++----- drivers/gpu/drm/nouveau/nouveau_display.c | 23 +++++++++-------- drivers/gpu/drm/nouveau/nouveau_display.h | 12 ++++----- drivers/gpu/drm/omapdrm/omap_drv.h | 4 +-- drivers/gpu/drm/omapdrm/omap_irq.c | 16 ++++++------ drivers/gpu/drm/qxl/qxl_drv.c | 7 ++--- drivers/gpu/drm/r128/r128_drv.h | 6 ++--- drivers/gpu/drm/r128/r128_irq.c | 16 ++++++------ drivers/gpu/drm/radeon/radeon_display.c | 25 +++++++++--------- drivers/gpu/drm/radeon/radeon_drv.c | 13 +++++----- drivers/gpu/drm/radeon/radeon_drv.h | 6 ++--- drivers/gpu/drm/radeon/radeon_irq.c | 38 ++++++++++++++-------------- drivers/gpu/drm/radeon/radeon_mode.h | 5 ++-- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 8 +++--- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 +++-- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +-- drivers/gpu/drm/sti/sti_crtc.c | 16 ++++++------ drivers/gpu/drm/sti/sti_crtc.h | 4 +-- drivers/gpu/drm/tegra/drm.c | 7 ++--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +-- drivers/gpu/drm/via/via_drv.h | 6 ++--- drivers/gpu/drm/via/via_irq.c | 17 +++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ++--- include/drm/drmP.h | 25 +++++++++--------- 42 files changed, 239 insertions(+), 232 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +4 -4
@@ -2348,10 +2348,10 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev, struct drm_file *file_priv);int amdgpu_suspend_kms (struct drm_device *dev,bool suspend,bool fbcon);int amdgpu_resume_kms (struct drm_device *dev,bool resume,bool fbcon); -u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,int crtc); -int amdgpu_enable_vblank_kms (struct drm_device *dev,int crtc); -void amdgpu_disable_vblank_kms (struct drm_device *dev,int crtc); -int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe); +int amdgpu_enable_vblank_kms (struct drm_device *dev,unsigned int pipe); +void amdgpu_disable_vblank_kms (struct drm_device *dev,unsigned int pipe); +int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +5 -4
@@ -721,7 +721,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* an optional accurate timestamp of when query happened. * * \param dev Device to query. -* \param crtc Crtc to query. +* \param pipe Crtc to query. * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Location where vertical scanout position should be stored. * \param *hpos Location where horizontal scanout position should go.
@@ -744,8 +744,9 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,int crtc,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {u32 vbl =0 , position =0 ;
@@ -760,7 +761,7 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int flif (stime) *stime =ktime_get (); -if (amdgpu_display_page_flip_get_scanoutpos (adev, crtc, &vbl, &position) ==0 ) +if (amdgpu_display_page_flip_get_scanoutpos (adev, pipe, &vbl, &position) ==0 ) ret |=DRM_SCANOUTPOS_VALID ;/* Get optional system timestamp after query. */
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +18 -18
@@ -599,36 +599,36 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev,* amdgpu_get_vblank_counter_kms - get frame count * * @dev: drm dev pointer -* @crtc: crtc to get the frame count from +* @pipe: crtc to get the frame count from * * Gets the frame count on the requested crtc (all asics). * Returns frame count on success, -EINVAL on failure. */ -u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,int crtc) +u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -if (crtc <0 || crtc >= adev->mode_info.num_crtc) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >= adev->mode_info.num_crtc) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; } -return amdgpu_display_vblank_get_counter (adev, crtc); +return amdgpu_display_vblank_get_counter (adev, pipe); }/** * amdgpu_enable_vblank_kms - enable vblank interrupt * * @dev: drm dev pointer -* @crtc: crtc to enable vblank interrupt for +* @pipe: crtc to enable vblank interrupt for * * Enable the interrupt on the requested crtc (all asics). * Returns 0 on success, -EINVAL on failure. */ -int amdgpu_enable_vblank_kms (struct drm_device *dev,int crtc) +int amdgpu_enable_vblank_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -int idx =amdgpu_crtc_idx_to_irq_type (adev, crtc); +int idx =amdgpu_crtc_idx_to_irq_type (adev, pipe);return amdgpu_irq_get (adev, &adev->crtc_irq, idx); }
@@ -637,14 +637,14 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, int crtc)* amdgpu_disable_vblank_kms - disable vblank interrupt * * @dev: drm dev pointer -* @crtc: crtc to disable vblank interrupt for +* @pipe: crtc to disable vblank interrupt for * * Disable the interrupt on the requested crtc (all asics). */ -void amdgpu_disable_vblank_kms (struct drm_device *dev,int crtc) +void amdgpu_disable_vblank_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -int idx =amdgpu_crtc_idx_to_irq_type (adev, crtc); +int idx =amdgpu_crtc_idx_to_irq_type (adev, pipe);amdgpu_irq_put (adev, &adev->crtc_irq, idx); }
@@ -662,26 +662,26 @@ void amdgpu_disable_vblank_kms(struct drm_device *dev, int crtc)* scanout position. (all asics). * Returns postive status flags on success, negative error on failure. */ -int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags) { -struct drm_crtc *drmcrtc; +struct drm_crtc *crtc;struct amdgpu_device *adev = dev->dev_private; -if (crtc <0 || crtc >= dev->num_crtcs) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >= dev->num_crtcs) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }/* Get associated drm_crtc: */ - drmcrtc = &adev->mode_info.crtcs[crtc]->base; + crtc = &adev->mode_info.crtcs[pipe]->base;/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, crtc, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (dev, pipe, max_error, vblank_time, flags, - &drmcrtc->hwmode); + &crtc->hwmode); }const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +4 -5
@@ -540,11 +540,10 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, bool use_aux);void amdgpu_encoder_set_active_device (struct drm_encoder *encoder); -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos,ktime_t *stime, -ktime_t *etime, -const struct drm_display_mode *mode); +int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime, +const struct drm_display_mode *mode); int amdgpu_framebuffer_init(struct drm_device *dev, struct amdgpu_framebuffer *rfb,
drivers/gpu/drm/armada/armada_drv.c +4 -4
@@ -254,17 +254,17 @@ void armada_drm_vbl_event_remove(struct armada_crtc *dcrtc, }/* These are called under the vbl_lock. */ -static int armada_drm_enable_vblank (struct drm_device *dev,int crtc) +static int armada_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct armada_private *priv = dev->dev_private; -armada_drm_crtc_enable_irq (priv->dcrtc[crtc],VSYNC_IRQ_ENA ); +armada_drm_crtc_enable_irq (priv->dcrtc[pipe],VSYNC_IRQ_ENA );return 0 ; } -static void armada_drm_disable_vblank (struct drm_device *dev,int crtc) +static void armada_drm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct armada_private *priv = dev->dev_private; -armada_drm_crtc_disable_irq (priv->dcrtc[crtc],VSYNC_IRQ_ENA ); +armada_drm_crtc_disable_irq (priv->dcrtc[pipe],VSYNC_IRQ_ENA ); }static struct drm_ioctl_desc armada_ioctls[] = {
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +4 -2
@@ -656,7 +656,8 @@ static void atmel_hlcdc_dc_irq_uninstall(struct drm_device *dev)regmap_read (dc->hlcdc->regmap,ATMEL_HLCDC_ISR , &isr); } -static int atmel_hlcdc_dc_enable_vblank (struct drm_device *dev,int crtc) +static int atmel_hlcdc_dc_enable_vblank (struct drm_device *dev, +unsigned int pipe) {struct atmel_hlcdc_dc *dc = dev->dev_private;
@@ -666,7 +667,8 @@ static int atmel_hlcdc_dc_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void atmel_hlcdc_dc_disable_vblank (struct drm_device *dev,int crtc) +static void atmel_hlcdc_dc_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct atmel_hlcdc_dc *dc = dev->dev_private;
drivers/gpu/drm/drm_irq.c +1 -1
@@ -876,7 +876,7 @@ drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe,* Returns: * The software vblank counter. */ -u32 drm_vblank_count (struct drm_device *dev,int pipe) +u32 drm_vblank_count (struct drm_device *dev,unsigned int pipe) {struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -2
@@ -167,7 +167,7 @@ err_crtc:return ERR_PTR (ret); } -int exynos_drm_crtc_enable_vblank (struct drm_device *dev,int pipe) +int exynos_drm_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct exynos_drm_private *private = dev->dev_private; struct exynos_drm_crtc *exynos_crtc =
@@ -179,7 +179,7 @@ int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -void exynos_drm_crtc_disable_vblank (struct drm_device *dev,int pipe) +void exynos_drm_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct exynos_drm_private *private = dev->dev_private; struct exynos_drm_crtc *exynos_crtc =
drivers/gpu/drm/exynos/exynos_drm_crtc.h +2 -2
@@ -23,8 +23,8 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,enum exynos_drm_output_type type, const struct exynos_drm_crtc_ops *ops, void *context); -int exynos_drm_crtc_enable_vblank (struct drm_device *dev,int pipe); -void exynos_drm_crtc_disable_vblank (struct drm_device *dev,int pipe); +int exynos_drm_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe); +void exynos_drm_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe);void exynos_drm_crtc_wait_pending_update (struct exynos_drm_crtc *exynos_crtc);void exynos_drm_crtc_finish_update (struct exynos_drm_crtc *exynos_crtc,struct exynos_drm_plane *exynos_plane);
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +3 -2
@@ -140,7 +140,7 @@ static irqreturn_t fsl_dcu_drm_irq(int irq, void *arg)return IRQ_HANDLED ; } -static int fsl_dcu_drm_enable_vblank (struct drm_device *dev,int crtc) +static int fsl_dcu_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;unsigned int value;
@@ -156,7 +156,8 @@ static int fsl_dcu_drm_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void fsl_dcu_drm_disable_vblank (struct drm_device *dev,int crtc) +static void fsl_dcu_drm_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;unsigned int value;
drivers/gpu/drm/gma500/psb_drv.h +3 -3
@@ -687,15 +687,15 @@ extern void psb_irq_turn_off_dpst(struct drm_device *dev);extern void psb_irq_uninstall_islands (struct drm_device *dev,int hw_islands);extern int psb_vblank_wait2 (struct drm_device *dev,unsigned int *sequence);extern int psb_vblank_wait (struct drm_device *dev,unsigned int *sequence); -extern int psb_enable_vblank (struct drm_device *dev,int crtc); -extern void psb_disable_vblank (struct drm_device *dev,int crtc); +extern int psb_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void psb_disable_vblank (struct drm_device *dev,unsigned int pipe);void psb_enable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask);void psb_disable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask); -extern u32 psb_get_vblank_counter (struct drm_device *dev,int crtc); +extern u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe);/* framebuffer.c */ extern int psbfb_probed (struct drm_device *dev);
drivers/gpu/drm/gma500/psb_irq.c +4 -4
@@ -510,7 +510,7 @@ int psb_irq_disable_dpst(struct drm_device *dev)/* * It is used to enable VBLANK interrupt */ -int psb_enable_vblank (struct drm_device *dev,int pipe) +int psb_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -549,7 +549,7 @@ int psb_enable_vblank(struct drm_device *dev, int pipe)/* * It is used to disable VBLANK interrupt */ -void psb_disable_vblank (struct drm_device *dev,int pipe) +void psb_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -622,7 +622,7 @@ void mdfld_disable_te(struct drm_device *dev, int pipe)/* Called from drm generic code, passed a 'crtc', which * we use as a pipe index */ -u32 psb_get_vblank_counter (struct drm_device *dev,int pipe) +u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {uint32_t high_frame =PIPEAFRAMEHIGH ;uint32_t low_frame =PIPEAFRAMEPIXEL ;
@@ -654,7 +654,7 @@ u32 psb_get_vblank_counter(struct drm_device *dev, int pipe) reg_val =REG_READ (pipeconf_reg);if (!(reg_val &PIPEACONF_ENABLE )) { -dev_err (dev->dev,"trying to get vblank count for disabled pipe %d\n" , +dev_err (dev->dev,"trying to get vblank count for disabled pipe %u\n" , pipe); goto psb_get_vblank_counter_exit; }
drivers/gpu/drm/gma500/psb_irq.h +3 -3
@@ -38,9 +38,9 @@ int psb_irq_enable_dpst(struct drm_device *dev);int psb_irq_disable_dpst (struct drm_device *dev);void psb_irq_turn_on_dpst (struct drm_device *dev);void psb_irq_turn_off_dpst (struct drm_device *dev); -int psb_enable_vblank (struct drm_device *dev,int pipe); -void psb_disable_vblank (struct drm_device *dev,int pipe); -u32 psb_get_vblank_counter (struct drm_device *dev,int pipe); +int psb_enable_vblank (struct drm_device *dev,unsigned int pipe); +void psb_disable_vblank (struct drm_device *dev,unsigned int pipe); +u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe);int mdfld_enable_te (struct drm_device *dev,int pipe);void mdfld_disable_te (struct drm_device *dev,int pipe);
drivers/gpu/drm/i915/i915_irq.c +17 -17
@@ -649,7 +649,7 @@ static void i915_enable_asle_pipestat(struct drm_device *dev)* of horizontal active on the first line of vertical active */ -static u32 i8xx_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 i8xx_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {/* Gen2 doesn't have a hardware frame counter */ return 0 ;
@@ -658,7 +658,7 @@ static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe)/* Called from drm generic code, passed a 'crtc', which * we use as a pipe index */ -static u32 i915_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 i915_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long high_frame;
@@ -706,7 +706,7 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)return (((high1 <<8 ) | low) + (pixel >= vbl_start)) &0xffffff ; } -static u32 gm45_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 gm45_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;int reg =PIPE_FRMCOUNT_GM45 (pipe);
@@ -767,7 +767,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc)return (position + crtc->scanline_offset) % vtotal; } -static int i915_get_crtc_scanoutpos (struct drm_device *dev,int pipe, +static int i915_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe,unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode)
@@ -904,27 +904,27 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } -static int i915_get_vblank_timestamp (struct drm_device *dev,int pipe, +static int i915_get_vblank_timestamp (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags) {struct drm_crtc *crtc; -if (pipe <0 || pipe >=INTEL_INFO (dev)->num_pipes) { -DRM_ERROR ("Invalid crtc %d\n" , pipe); +if (pipe >=INTEL_INFO (dev)->num_pipes) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }/* Get drm_crtc to timestamp: */ crtc =intel_get_crtc_for_pipe (dev, pipe);if (crtc ==NULL ) { -DRM_ERROR ("Invalid crtc %d\n" , pipe); +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }if (!crtc->hwmode.crtc_clock) { -DRM_DEBUG_KMS ("crtc %d is disabled\n" , pipe); +DRM_DEBUG_KMS ("crtc %u is disabled\n" , pipe);return -EBUSY ; }
@@ -2612,7 +2612,7 @@ void i915_handle_error(struct drm_device *dev, bool wedged,/* Called from drm generic code, passed 'crtc' which * we use as a pipe index */ -static int i915_enable_vblank (struct drm_device *dev,int pipe) +static int i915_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2629,7 +2629,7 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int ironlake_enable_vblank (struct drm_device *dev,int pipe) +static int ironlake_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2643,7 +2643,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int valleyview_enable_vblank (struct drm_device *dev,int pipe) +static int valleyview_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2656,7 +2656,7 @@ static int valleyview_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int gen8_enable_vblank (struct drm_device *dev,int pipe) +static int gen8_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2672,7 +2672,7 @@ static int gen8_enable_vblank(struct drm_device *dev, int pipe)/* Called from drm generic code, passed 'crtc' which * we use as a pipe index */ -static void i915_disable_vblank (struct drm_device *dev,int pipe) +static void i915_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2684,7 +2684,7 @@ static void i915_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void ironlake_disable_vblank (struct drm_device *dev,int pipe) +static void ironlake_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2696,7 +2696,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void valleyview_disable_vblank (struct drm_device *dev,int pipe) +static void valleyview_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
@@ -2707,7 +2707,7 @@ static void valleyview_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void gen8_disable_vblank (struct drm_device *dev,int pipe) +static void gen8_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;
drivers/gpu/drm/imx/imx-drm-core.c +4 -4
@@ -144,10 +144,10 @@ void imx_drm_handle_vblank(struct imx_drm_crtc *imx_drm_crtc) }EXPORT_SYMBOL_GPL (imx_drm_handle_vblank); -static int imx_drm_enable_vblank (struct drm_device *drm,int crtc) +static int imx_drm_enable_vblank (struct drm_device *drm,unsigned int pipe) {struct imx_drm_device *imxdrm = drm->dev_private; -struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[crtc]; +struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[pipe];int ret;if (!imx_drm_crtc)
@@ -162,10 +162,10 @@ static int imx_drm_enable_vblank(struct drm_device *drm, int crtc)return ret; } -static void imx_drm_disable_vblank (struct drm_device *drm,int crtc) +static void imx_drm_disable_vblank (struct drm_device *drm,unsigned int pipe) {struct imx_drm_device *imxdrm = drm->dev_private; -struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[crtc]; +struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[pipe];if (!imx_drm_crtc)return ;
drivers/gpu/drm/mga/mga_drv.h +3 -3
@@ -183,9 +183,9 @@ extern int mga_warp_install_microcode(drm_mga_private_t *dev_priv);extern int mga_warp_init (drm_mga_private_t *dev_priv);/* mga_irq.c */ -extern int mga_enable_vblank (struct drm_device *dev,int crtc); -extern void mga_disable_vblank (struct drm_device *dev,int crtc); -extern u32 mga_get_vblank_counter (struct drm_device *dev,int crtc); +extern int mga_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void mga_disable_vblank (struct drm_device *dev,unsigned int pipe); +extern u32 mga_get_vblank_counter (struct drm_device *dev,unsigned int pipe);extern int mga_driver_fence_wait (struct drm_device *dev,unsigned int *sequence);extern int mga_driver_vblank_wait (struct drm_device *dev,unsigned int *sequence);extern irqreturn_t mga_driver_irq_handler (int irq,void *arg);
drivers/gpu/drm/mga/mga_irq.c +10 -10
@@ -35,12 +35,12 @@#include <drm/mga_drm.h> #include "mga_drv.h" -u32 mga_get_vblank_counter (struct drm_device *dev,int crtc) +u32 mga_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {const drm_mga_private_t *const dev_priv = (drm_mga_private_t *) dev->dev_private; -if (crtc !=0 ) +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);
@@ -88,13 +88,13 @@ irqreturn_t mga_driver_irq_handler(int irq, void *arg)return IRQ_NONE ; } -int mga_enable_vblank (struct drm_device *dev,int crtc) +int mga_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; -if (crtc !=0 ) { -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +if (pipe !=0 ) { +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return 0 ; }
@@ -103,11 +103,11 @@ int mga_enable_vblank(struct drm_device *dev, int crtc) } -void mga_disable_vblank (struct drm_device *dev,int crtc) +void mga_disable_vblank (struct drm_device *dev,unsigned int pipe) { -if (crtc !=0 ) { -DRM_ERROR ("tried to disable vblank on non-existent crtc %d\n" , - crtc); +if (pipe !=0 ) { +DRM_ERROR ("tried to disable vblank on non-existent crtc %u\n" , + pipe); }/* Do *NOT* disable the vertical refresh interrupt. MGA doesn't have
drivers/gpu/drm/msm/msm_drv.c +6 -6
@@ -531,24 +531,24 @@ static void msm_irq_uninstall(struct drm_device *dev) kms->funcs->irq_uninstall (kms); } -static int msm_enable_vblank (struct drm_device *dev,int crtc_id) +static int msm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct msm_drm_private *priv = dev->dev_private;struct msm_kms *kms = priv->kms;if (!kms)return -ENXIO ; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); -return vblank_ctrl_queue_work (priv, crtc_id, true); +DBG ("dev=%p, crtc=%u" , dev, pipe); +return vblank_ctrl_queue_work (priv, pipe, true); } -static void msm_disable_vblank (struct drm_device *dev,int crtc_id) +static void msm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct msm_drm_private *priv = dev->dev_private;struct msm_kms *kms = priv->kms;if (!kms)return ; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); -vblank_ctrl_queue_work (priv, crtc_id, false); +DBG ("dev=%p, crtc=%u" , dev, pipe); +vblank_ctrl_queue_work (priv, pipe, false); }/*
drivers/gpu/drm/nouveau/nouveau_display.c +12 -11
@@ -51,12 +51,12 @@ nouveau_display_vblank_handler(struct nvif_notify *notify) }int -nouveau_display_vblank_enable (struct drm_device *dev,int head) +nouveau_display_vblank_enable (struct drm_device *dev,unsigned int pipe) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {struct nouveau_crtc *nv_crtc =nouveau_crtc (crtc); -if (nv_crtc->index == head) { +if (nv_crtc->index == pipe) {nvif_notify_get (&nv_crtc->vblank);return 0 ; }
@@ -65,12 +65,12 @@ nouveau_display_vblank_enable(struct drm_device *dev, int head) }void -nouveau_display_vblank_disable (struct drm_device *dev,int head) +nouveau_display_vblank_disable (struct drm_device *dev,unsigned int pipe) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {struct nouveau_crtc *nv_crtc =nouveau_crtc (crtc); -if (nv_crtc->index == head) { +if (nv_crtc->index == pipe) {nvif_notify_put (&nv_crtc->vblank);return ; }
@@ -132,14 +132,15 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, }int -nouveau_display_scanoutpos (struct drm_device *dev,int head,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +nouveau_display_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { -if (nouveau_crtc (crtc)->index == head) { +if (nouveau_crtc (crtc)->index == pipe) {return nouveau_display_scanoutpos_head (crtc, vpos, hpos, stime, etime); }
@@ -149,15 +150,15 @@ nouveau_display_scanoutpos(struct drm_device *dev, int head, unsigned int flags, }int -nouveau_display_vblstamp (struct drm_device *dev,int head,int *max_error, -struct timeval *time,unsigned flags) +nouveau_display_vblstamp (struct drm_device *dev,unsigned int pipe, +int *max_error,struct timeval *time,unsigned flags) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { -if (nouveau_crtc (crtc)->index == head) { +if (nouveau_crtc (crtc)->index == pipe) {return drm_calc_vbltimestamp_from_scanoutpos (dev, - head, max_error, time, flags, + pipe, max_error, time, flags, &crtc->hwmode); } }
drivers/gpu/drm/nouveau/nouveau_display.h +6 -6
@@ -65,12 +65,12 @@ int nouveau_display_init(struct drm_device *dev);void nouveau_display_fini (struct drm_device *dev);int nouveau_display_suspend (struct drm_device *dev,bool runtime);void nouveau_display_resume (struct drm_device *dev,bool runtime); -int nouveau_display_vblank_enable (struct drm_device *,int ); -void nouveau_display_vblank_disable (struct drm_device *,int ); -int nouveau_display_scanoutpos (struct drm_device *,int ,unsigned int , -int *,int *,ktime_t *,ktime_t *, -const struct drm_display_mode *); -int nouveau_display_vblstamp (struct drm_device *,int ,int *, +int nouveau_display_vblank_enable (struct drm_device *,unsigned int ); +void nouveau_display_vblank_disable (struct drm_device *,unsigned int ); +int nouveau_display_scanoutpos (struct drm_device *,unsigned int , +unsigned int ,int *,int *,ktime_t *, +ktime_t *,const struct drm_display_mode *); +int nouveau_display_vblstamp (struct drm_device *,unsigned int ,int *,struct timeval *,unsigned ); int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
drivers/gpu/drm/omapdrm/omap_drv.h +2 -2
@@ -129,8 +129,8 @@ void omap_gem_describe_objects(struct list_head *list, struct seq_file *m);int omap_gem_resume (struct device *dev);#endif -int omap_irq_enable_vblank (struct drm_device *dev,int crtc_id); -void omap_irq_disable_vblank (struct drm_device *dev,int crtc_id); +int omap_irq_enable_vblank (struct drm_device *dev,unsigned int pipe); +void omap_irq_disable_vblank (struct drm_device *dev,unsigned int pipe);void __omap_irq_register (struct drm_device *dev,struct omap_drm_irq *irq);void __omap_irq_unregister (struct drm_device *dev,struct omap_drm_irq *irq);void omap_irq_register (struct drm_device *dev,struct omap_drm_irq *irq);
drivers/gpu/drm/omapdrm/omap_irq.c +8 -8
@@ -134,7 +134,7 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait,/** * enable_vblank - enable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Enable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since
@@ -144,13 +144,13 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait,* Zero on success, appropriate errno if the given @crtc's vblank * interrupt cannot be enabled. */ -int omap_irq_enable_vblank (struct drm_device *dev,int crtc_id) +int omap_irq_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct omap_drm_private *priv = dev->dev_private; -struct drm_crtc *crtc = priv->crtcs[crtc_id]; +struct drm_crtc *crtc = priv->crtcs[pipe];unsigned long flags; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); +DBG ("dev=%p, crtc=%u" , dev, pipe);spin_lock_irqsave (&list_lock, flags); priv->vblank_mask |=pipe2vbl (crtc);
@@ -163,19 +163,19 @@ int omap_irq_enable_vblank(struct drm_device *dev, int crtc_id)/** * disable_vblank - disable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Disable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since * interrupts will have to stay on to keep the count accurate. */ -void omap_irq_disable_vblank (struct drm_device *dev,int crtc_id) +void omap_irq_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct omap_drm_private *priv = dev->dev_private; -struct drm_crtc *crtc = priv->crtcs[crtc_id]; +struct drm_crtc *crtc = priv->crtcs[pipe];unsigned long flags; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); +DBG ("dev=%p, crtc=%u" , dev, pipe);spin_lock_irqsave (&list_lock, flags); priv->vblank_mask &= ~pipe2vbl (crtc);
drivers/gpu/drm/qxl/qxl_drv.c +4 -3
@@ -196,17 +196,18 @@ static int qxl_pm_restore(struct device *dev)return qxl_drm_resume (drm_dev, false); } -static u32 qxl_noop_get_vblank_counter (struct drm_device *dev,int crtc) +static u32 qxl_noop_get_vblank_counter (struct drm_device *dev, +unsigned int pipe) {return 0 ; } -static int qxl_noop_enable_vblank (struct drm_device *dev,int crtc) +static int qxl_noop_enable_vblank (struct drm_device *dev,unsigned int pipe) {return 0 ; } -static void qxl_noop_disable_vblank (struct drm_device *dev,int crtc) +static void qxl_noop_disable_vblank (struct drm_device *dev,unsigned int pipe) { }
drivers/gpu/drm/r128/r128_drv.h +3 -3
@@ -154,9 +154,9 @@ extern int r128_wait_ring(drm_r128_private_t *dev_priv, int n);extern int r128_do_cce_idle (drm_r128_private_t *dev_priv);extern int r128_do_cleanup_cce (struct drm_device *dev); -extern int r128_enable_vblank (struct drm_device *dev,int crtc); -extern void r128_disable_vblank (struct drm_device *dev,int crtc); -extern u32 r128_get_vblank_counter (struct drm_device *dev,int crtc); +extern int r128_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void r128_disable_vblank (struct drm_device *dev,unsigned int pipe); +extern u32 r128_get_vblank_counter (struct drm_device *dev,unsigned int pipe);extern irqreturn_t r128_driver_irq_handler (int irq,void *arg);extern void r128_driver_irq_preinstall (struct drm_device *dev);extern int r128_driver_irq_postinstall (struct drm_device *dev);
drivers/gpu/drm/r128/r128_irq.c +8 -8
@@ -34,11 +34,11 @@#include <drm/r128_drm.h> #include "r128_drv.h" -u32 r128_get_vblank_counter (struct drm_device *dev,int crtc) +u32 r128_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {const drm_r128_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);
@@ -62,12 +62,12 @@ irqreturn_t r128_driver_irq_handler(int irq, void *arg)return IRQ_NONE ; } -int r128_enable_vblank (struct drm_device *dev,int crtc) +int r128_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_r128_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) { -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) { +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);return -EINVAL ; }
@@ -75,10 +75,10 @@ int r128_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void r128_disable_vblank (struct drm_device *dev,int crtc) +void r128_disable_vblank (struct drm_device *dev,unsigned int pipe) { -if (crtc !=0 ) -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);/* * FIXME: implement proper interrupt disable by using the vblank
drivers/gpu/drm/radeon/radeon_display.c +13 -12
@@ -1799,8 +1799,9 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {u32 stat_crtc =0 , vbl =0 , position =0 ;
@@ -1816,42 +1817,42 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl *stime =ktime_get ();if (ASIC_IS_DCE4 (rdev)) { -if (crtc ==0 ) { +if (pipe ==0 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC0_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC0_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC1_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC1_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==2 ) { +if (pipe ==2 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC2_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC2_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==3 ) { +if (pipe ==3 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC3_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC3_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==4 ) { +if (pipe ==4 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC4_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC4_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==5 ) { +if (pipe ==5 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC5_REGISTER_OFFSET ); position = RREG32(EVERGREEN_CRTC_STATUS_POSITION +
@@ -1859,19 +1860,19 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl ret |=DRM_SCANOUTPOS_VALID ; } }else if (ASIC_IS_AVIVO (rdev)) { -if (crtc ==0 ) { +if (pipe ==0 ) { vbl =RREG32 (AVIVO_D1CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D1CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl =RREG32 (AVIVO_D2CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D2CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } }else {/* Pre-AVIVO: Different encoding of scanout pos and vblank interval. */ -if (crtc ==0 ) { +if (pipe ==0 ) {/* Assume vbl_end == 0, get vbl_start from * upper 16 bits. */
@@ -1885,7 +1886,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl = (RREG32 (RADEON_CRTC2_V_TOTAL_DISP ) &RADEON_CRTC_V_DISP ) >>RADEON_CRTC_V_DISP_SHIFT ; position = (RREG32 (RADEON_CRTC2_VLINE_CRNT_VLINE ) >>16 ) &RADEON_CRTC_V_TOTAL ;
drivers/gpu/drm/radeon/radeon_drv.c +6 -7
@@ -105,10 +105,10 @@ void radeon_driver_preclose_kms(struct drm_device *dev, struct drm_file *file_priv);int radeon_suspend_kms (struct drm_device *dev,bool suspend,bool fbcon);int radeon_resume_kms (struct drm_device *dev,bool resume,bool fbcon); -u32 radeon_get_vblank_counter_kms (struct drm_device *dev,int crtc); -int radeon_enable_vblank_kms (struct drm_device *dev,int crtc); -void radeon_disable_vblank_kms (struct drm_device *dev,int crtc); -int radeon_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +u32 radeon_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe); +int radeon_enable_vblank_kms (struct drm_device *dev,unsigned int pipe); +void radeon_disable_vblank_kms (struct drm_device *dev,unsigned int pipe); +int radeon_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);
@@ -124,9 +124,8 @@ void radeon_gem_object_close(struct drm_gem_object *obj,struct dma_buf *radeon_gem_prime_export (struct drm_device *dev,struct drm_gem_object *gobj,int flags); -extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int crtc, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);extern bool radeon_is_px (struct drm_device *dev);
drivers/gpu/drm/radeon/radeon_drv.h +3 -3
@@ -404,9 +404,9 @@ extern int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *extern int radeon_irq_wait (struct drm_device *dev,void *data,struct drm_file *file_priv);extern void radeon_do_release (struct drm_device * dev); -extern u32 radeon_get_vblank_counter (struct drm_device *dev,int crtc); -extern int radeon_enable_vblank (struct drm_device *dev,int crtc); -extern void radeon_disable_vblank (struct drm_device *dev,int crtc); +extern u32 radeon_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +extern int radeon_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void radeon_disable_vblank (struct drm_device *dev,unsigned int pipe);extern irqreturn_t radeon_driver_irq_handler (int irq,void *arg);extern void radeon_driver_irq_preinstall (struct drm_device * dev);extern int radeon_driver_irq_postinstall (struct drm_device *dev);
drivers/gpu/drm/radeon/radeon_irq.c +19 -19
@@ -62,12 +62,12 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)RADEON_WRITE (R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } -int radeon_enable_vblank (struct drm_device *dev,int crtc) +int radeon_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -switch (crtc) { +switch (pipe) {case 0 :r500_vbl_irq_set_state (dev,R500_D1MODE_INT_MASK ,1 );break ;
@@ -75,12 +75,12 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)r500_vbl_irq_set_state (dev,R500_D2MODE_INT_MASK ,1 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return -EINVAL ; } }else { -switch (crtc) { +switch (pipe) {case 0 :radeon_irq_set_state (dev,RADEON_CRTC_VBLANK_MASK ,1 );break ;
@@ -88,8 +88,8 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)radeon_irq_set_state (dev,RADEON_CRTC2_VBLANK_MASK ,1 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return -EINVAL ; } }
@@ -97,12 +97,12 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void radeon_disable_vblank (struct drm_device *dev,int crtc) +void radeon_disable_vblank (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -switch (crtc) { +switch (pipe) {case 0 :r500_vbl_irq_set_state (dev,R500_D1MODE_INT_MASK ,0 );break ;
@@ -110,12 +110,12 @@ void radeon_disable_vblank(struct drm_device *dev, int crtc)r500_vbl_irq_set_state (dev,R500_D2MODE_INT_MASK ,0 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);break ; } }else { -switch (crtc) { +switch (pipe) {case 0 :radeon_irq_set_state (dev,RADEON_CRTC_VBLANK_MASK ,0 );break ;
@@ -123,8 +123,8 @@ void radeon_disable_vblank(struct drm_device *dev, int crtc)radeon_irq_set_state (dev,RADEON_CRTC2_VBLANK_MASK ,0 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);break ; } }
@@ -255,7 +255,7 @@ static int radeon_wait_irq(struct drm_device * dev, int swi_nr)return ret; } -u32 radeon_get_vblank_counter (struct drm_device *dev,int crtc) +u32 radeon_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -264,18 +264,18 @@ u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc)return -EINVAL ; } -if (crtc <0 || crtc >1 ) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >1 ) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -if (crtc ==0 ) +if (pipe ==0 )return RADEON_READ (R500_D1CRTC_FRAME_COUNT );else return RADEON_READ (R500_D2CRTC_FRAME_COUNT ); }else { -if (crtc ==0 ) +if (pipe ==0 )return RADEON_READ (RADEON_CRTC_CRNT_FRAME );else return RADEON_READ (RADEON_CRTC2_CRNT_FRAME );
drivers/gpu/drm/radeon/radeon_mode.h +2 -3
@@ -874,9 +874,8 @@ extern int radeon_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);extern void radeon_cursor_reset (struct drm_crtc *crtc); -extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);
drivers/gpu/drm/rcar-du/rcar_du_drv.c +4 -4
@@ -221,20 +221,20 @@ static void rcar_du_lastclose(struct drm_device *dev)drm_fbdev_cma_restore_mode (rcdu->fbdev); } -static int rcar_du_enable_vblank (struct drm_device *dev,int crtc) +static int rcar_du_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct rcar_du_device *rcdu = dev->dev_private; -rcar_du_crtc_enable_vblank (&rcdu->crtcs[crtc], true); +rcar_du_crtc_enable_vblank (&rcdu->crtcs[pipe], true);return 0 ; } -static void rcar_du_disable_vblank (struct drm_device *dev,int crtc) +static void rcar_du_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct rcar_du_device *rcdu = dev->dev_private; -rcar_du_crtc_enable_vblank (&rcdu->crtcs[crtc], false); +rcar_du_crtc_enable_vblank (&rcdu->crtcs[pipe], false); }static const struct file_operations rcar_du_fops = {
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +4 -2
@@ -103,7 +103,8 @@ static struct drm_crtc *rockchip_crtc_from_pipe(struct drm_device *drm,return NULL ; } -static int rockchip_drm_crtc_enable_vblank (struct drm_device *dev,int pipe) +static int rockchip_drm_crtc_enable_vblank (struct drm_device *dev, +unsigned int pipe) {struct rockchip_drm_private *priv = dev->dev_private;struct drm_crtc *crtc =rockchip_crtc_from_pipe (dev, pipe);
@@ -115,7 +116,8 @@ static int rockchip_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static void rockchip_drm_crtc_disable_vblank (struct drm_device *dev,int pipe) +static void rockchip_drm_crtc_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct rockchip_drm_private *priv = dev->dev_private;struct drm_crtc *crtc =rockchip_crtc_from_pipe (dev, pipe);
drivers/gpu/drm/shmobile/shmob_drm_drv.c +2 -2
@@ -231,7 +231,7 @@ static irqreturn_t shmob_drm_irq(int irq, void *arg)return IRQ_HANDLED ; } -static int shmob_drm_enable_vblank (struct drm_device *dev,int crtc) +static int shmob_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct shmob_drm_device *sdev = dev->dev_private;
@@ -240,7 +240,7 @@ static int shmob_drm_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void shmob_drm_disable_vblank (struct drm_device *dev,int crtc) +static void shmob_drm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct shmob_drm_device *sdev = dev->dev_private;
drivers/gpu/drm/sti/sti_crtc.c +8 -8
@@ -299,7 +299,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,return 0 ; } -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc) +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct sti_private *dev_priv = dev->dev_private;struct sti_compositor *compo = dev_priv->compo;
@@ -307,9 +307,9 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_register_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_register_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, - vtg_vblank_nb, crtc)) { + vtg_vblank_nb, pipe)) {DRM_ERROR ("Cannot register VTG notifier\n" );return -EINVAL ; }
@@ -318,7 +318,7 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc) }EXPORT_SYMBOL (sti_crtc_enable_vblank); -void sti_crtc_disable_vblank (struct drm_device *drm_dev,int crtc) +void sti_crtc_disable_vblank (struct drm_device *drm_dev,unsigned int pipe) {struct sti_private *priv = drm_dev->dev_private;struct sti_compositor *compo = priv->compo;
@@ -326,14 +326,14 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_unregister_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_unregister_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, vtg_vblank_nb))DRM_DEBUG_DRIVER ("Warning: cannot unregister VTG notifier\n" );/* free the resources of the pending requests */ -if (compo->mixer[crtc]->pending_event) { -drm_vblank_put (drm_dev, crtc); - compo->mixer[crtc]->pending_event =NULL ; +if (compo->mixer[pipe]->pending_event) { +drm_vblank_put (drm_dev, pipe); + compo->mixer[pipe]->pending_event =NULL ; } }EXPORT_SYMBOL (sti_crtc_disable_vblank);
drivers/gpu/drm/sti/sti_crtc.h +2 -2
@@ -13,8 +13,8 @@ struct sti_mixer;int sti_crtc_init (struct drm_device *drm_dev,struct sti_mixer *mixer,struct drm_plane *primary,struct drm_plane *cursor); -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc); -void sti_crtc_disable_vblank (struct drm_device *dev,int crtc); +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe); +void sti_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe);int sti_crtc_vblank_cb (struct notifier_block *nb,unsigned long event,void *data);bool sti_crtc_is_main (struct drm_crtc *drm_crtc);
drivers/gpu/drm/tegra/drm.c +4 -3
@@ -822,7 +822,8 @@ static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm,return NULL ; } -static u32 tegra_drm_get_vblank_counter (struct drm_device *drm,int pipe) +static u32 tegra_drm_get_vblank_counter (struct drm_device *drm, +unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);
@@ -833,7 +834,7 @@ static u32 tegra_drm_get_vblank_counter(struct drm_device *drm, int pipe)return tegra_dc_get_vblank_counter (dc); } -static int tegra_drm_enable_vblank (struct drm_device *drm,int pipe) +static int tegra_drm_enable_vblank (struct drm_device *drm,unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);
@@ -846,7 +847,7 @@ static int tegra_drm_enable_vblank(struct drm_device *drm, int pipe)return 0 ; } -static void tegra_drm_disable_vblank (struct drm_device *drm,int pipe) +static void tegra_drm_disable_vblank (struct drm_device *drm,unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);
drivers/gpu/drm/tilcdc/tilcdc_drv.c +2 -2
@@ -425,13 +425,13 @@ static void enable_vblank(struct drm_device *dev, bool enable)tilcdc_clear (dev, reg, mask); } -static int tilcdc_enable_vblank (struct drm_device *dev,int crtc) +static int tilcdc_enable_vblank (struct drm_device *dev,unsigned int pipe) {enable_vblank (dev, true);return 0 ; } -static void tilcdc_disable_vblank (struct drm_device *dev,int crtc) +static void tilcdc_disable_vblank (struct drm_device *dev,unsigned int pipe) {enable_vblank (dev, false); }
drivers/gpu/drm/via/via_drv.h +3 -3
@@ -136,9 +136,9 @@ extern int via_init_context(struct drm_device *dev, int context);extern int via_final_context (struct drm_device *dev,int context);extern int via_do_cleanup_map (struct drm_device *dev); -extern u32 via_get_vblank_counter (struct drm_device *dev,int crtc); -extern int via_enable_vblank (struct drm_device *dev,int crtc); -extern void via_disable_vblank (struct drm_device *dev,int crtc); +extern u32 via_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +extern int via_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void via_disable_vblank (struct drm_device *dev,unsigned int pipe);extern irqreturn_t via_driver_irq_handler (int irq,void *arg);extern void via_driver_irq_preinstall (struct drm_device *dev);
drivers/gpu/drm/via/via_irq.c +9 -8
@@ -95,10 +95,11 @@ static unsigned time_diff(struct timeval *now, struct timeval *then)1000000 - (then->tv_usec - now->tv_usec); } -u32 via_get_vblank_counter (struct drm_device *dev,int crtc) +u32 via_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) + +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);
@@ -170,13 +171,13 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t *dev_priv) } } -int via_enable_vblank (struct drm_device *dev,int crtc) +int via_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private;u32 status; -if (crtc !=0 ) { -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) { +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);return -EINVAL ; }
@@ -189,7 +190,7 @@ int via_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void via_disable_vblank (struct drm_device *dev,int crtc) +void via_disable_vblank (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private;u32 status;
@@ -200,8 +201,8 @@ void via_disable_vblank(struct drm_device *dev, int crtc)VIA_WRITE8 (0x83d4 ,0x11 );VIA_WRITE8 (0x83d5 ,VIA_READ8 (0x83d5 ) & ~0x30 ); -if (crtc !=0 ) -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe); } static int
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +3 -3
@@ -913,9 +913,9 @@ void vmw_kms_idle_workqueues(struct vmw_master *vmaster);bool vmw_kms_validate_mode_vram (struct vmw_private *dev_priv,uint32_t pitch,uint32_t height); -u32 vmw_get_vblank_counter (struct drm_device *dev,int crtc); -int vmw_enable_vblank (struct drm_device *dev,int crtc); -void vmw_disable_vblank (struct drm_device *dev,int crtc); +u32 vmw_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +int vmw_enable_vblank (struct drm_device *dev,unsigned int pipe); +void vmw_disable_vblank (struct drm_device *dev,unsigned int pipe); int vmw_kms_present(struct vmw_private *dev_priv, struct drm_file *file_priv, struct vmw_framebuffer *vfb,
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3 -3
@@ -1263,7 +1263,7 @@ bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,/** * Function called by DRM code called with vbl_lock held. */ -u32 vmw_get_vblank_counter (struct drm_device *dev,int crtc) +u32 vmw_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {return 0 ; }
@@ -1271,7 +1271,7 @@ u32 vmw_get_vblank_counter(struct drm_device *dev, int crtc)/** * Function called by DRM code called with vbl_lock held. */ -int vmw_enable_vblank (struct drm_device *dev,int crtc) +int vmw_enable_vblank (struct drm_device *dev,unsigned int pipe) {return -ENOSYS ; }
@@ -1279,7 +1279,7 @@ int vmw_enable_vblank(struct drm_device *dev, int crtc)/** * Function called by DRM code called with vbl_lock held. */ -void vmw_disable_vblank (struct drm_device *dev,int crtc) +void vmw_disable_vblank (struct drm_device *dev,unsigned int pipe) { }
include/drm/drmP.h +12 -13
@@ -412,7 +412,7 @@ struct drm_driver {/** * get_vblank_counter - get raw hardware vblank counter * @dev: DRM device -* @crtc: counter to fetch +* @pipe: counter to fetch * * Driver callback for fetching a raw hardware vblank counter for @crtc. * If a device doesn't have a hardware counter, the driver can simply
@@ -426,12 +426,12 @@ struct drm_driver {* RETURNS * Raw vblank counter value. */ -u32 (*get_vblank_counter) (struct drm_device *dev,int crtc); +u32 (*get_vblank_counter) (struct drm_device *dev,unsigned int pipe);/** * enable_vblank - enable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Enable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since
@@ -441,18 +441,18 @@ struct drm_driver {* Zero on success, appropriate errno if the given @crtc's vblank * interrupt cannot be enabled. */ -int (*enable_vblank) (struct drm_device *dev,int crtc); +int (*enable_vblank) (struct drm_device *dev,unsigned int pipe);/** * disable_vblank - disable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Disable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since * interrupts will have to stay on to keep the count accurate. */ -void (*disable_vblank) (struct drm_device *dev,int crtc); +void (*disable_vblank) (struct drm_device *dev,unsigned int pipe);/** * Called by \c drm_device_is_agp. Typically used to determine if a
@@ -474,7 +474,7 @@ struct drm_driver {* optional accurate ktime_get timestamp of when position was measured. * * \param dev DRM device. -* \param crtc Id of the crtc to query. +* \param pipe Id of the crtc to query. * \param flags Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Target location for current vertical scanout position. * \param *hpos Target location for current horizontal scanout position.
@@ -498,9 +498,8 @@ struct drm_driver {* but unknown small number of scanlines wrt. real scanout position. * */ -int (*get_scanout_position) (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +int (*get_scanout_position) (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);
@@ -518,7 +517,7 @@ struct drm_driver {* to the OpenML OML_sync_control extension specification. * * \param dev dev DRM device handle. -* \param crtc crtc for which timestamp should be returned. +* \param pipe crtc for which timestamp should be returned. * \param *max_error Maximum allowable timestamp error in nanoseconds. * Implementation should strive to provide timestamp * with an error of at most *max_error nanoseconds.
@@ -534,7 +533,7 @@ struct drm_driver {* negative number on failure. A positive status code on success, * which describes how the vblank_time timestamp was computed. */ -int (*get_vblank_timestamp) (struct drm_device *dev,int crtc, +int (*get_vblank_timestamp) (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);
@@ -927,7 +926,7 @@ extern int drm_irq_uninstall(struct drm_device *dev);extern int drm_vblank_init (struct drm_device *dev,unsigned int num_crtcs);extern int drm_wait_vblank (struct drm_device *dev,void *data,struct drm_file *filp); -extern u32 drm_vblank_count (struct drm_device *dev,int pipe); +extern u32 drm_vblank_count (struct drm_device *dev,unsigned int pipe);extern u32 drm_crtc_vblank_count (struct drm_crtc *crtc);extern u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
Quoted 4 lines · Thierry Reding
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.
I don't like being forced to use the "pipe" naming in all drivers; I found that really confusing when I first looked at DRM, and it took a long time to work out that "pipe" basically means "crtc" or "gpu".
What's wrong with keeping "crtc" as the index terminology for crtc things? Surely that's more descriptive of what's going on here?
Signature · 6 lines
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
Quoted 9 lines · Russell King - ARM Linux
Quoted 4 lines · Thierry Reding
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.I don't like being forced to use the "pipe" naming in all drivers; I found that really confusing when I first looked at DRM, and it took a long time to work out that "pipe" basically means "crtc" or "gpu".
crtc mean "cathode ray tube controller". If you weren't used to it, it would be pretty much impossible to guess what piece of modern hardware that means. So I think it's more a case of "a lot of this junk used to be in what people called the crtc, so we'll call this modern thing a crtc too". Although I think most of the hardware people moved on from using that name quite a long time ago.
"gpu" can mean either just the part that does the rendering and whatnot, or it can mean the entire graphics "card". But calling a display pipeline a "gpu" is not done. Now _that_ would be confusing.
"pipe" is fairly nice term, meaning "pipeline". That describes the thing quite nicely. Stuff comes in from one end, flows through the pipe, and goes out the other end.
At least both Intel and OMAP used the term pipe or pipeline in the hardware docs. Can't really say aything about other brands, at least if I discount the more ancient junk I'm familiar with.
Quoted 2 lines
What's wrong with keeping "crtc" as the index terminology for crtc things? Surely that's more descriptive of what's going on here?
I can't speak for Thierry, but I assume the real motivation for this renaming was to make it clear which is the "index", and which is the crtc object. "pipe" for one, "crtc" for the other. Avoids having to call the object "dcrtc", "drm_crtc" or something else entirely. And since the object is called "crtc" everywhere else, it's nice not to have to make an exception in the vblank code.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
Quoted 18 lines · On Thursday 24 September 2015 23:20:54 Ville Syrjälä wrote:
Quoted 9 lines · Russell King - ARM Linux
Quoted 4 lines · Thierry Reding
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.I don't like being forced to use the "pipe" naming in all drivers; I found that really confusing when I first looked at DRM, and it took a long time to work out that "pipe" basically means "crtc" or "gpu".
crtc mean "cathode ray tube controller". If you weren't used to it, it would be pretty much impossible to guess what piece of modern hardware that means. So I think it's more a case of "a lot of this junk used to be in what people called the crtc, so we'll call this modern thing a crtc too". Although I think most of the hardware people moved on from using that name quite a long time ago.
Quoted 8 lines
"gpu" can mean either just the part that does the rendering and whatnot, or it can mean the entire graphics "card". But calling a display pipeline a "gpu" is not done. Now _that_ would be confusing.
"pipe" is fairly nice term, meaning "pipeline". That describes the thing quite nicely. Stuff comes in from one end, flows through the pipe, and goes out the other end.
To be pedantic the object we call CRTC today is a subset of the pipeline, not the full pipeline. Given that the full pipelines can more complex than a single chain (think about one CRTC cloned on two encoders and two connectors), I can see why the "pipe" name could sound confusing.
Quoted 13 lines
At least both Intel and OMAP used the term pipe or pipeline in the hardware docs. Can't really say aything about other brands, at least if I discount the more ancient junk I'm familiar with.
Quoted 2 lines
What's wrong with keeping "crtc" as the index terminology for crtc things? Surely that's more descriptive of what's going on here?
I can't speak for Thierry, but I assume the real motivation for this renaming was to make it clear which is the "index", and which is the crtc object. "pipe" for one, "crtc" for the other. Avoids having to call the object "dcrtc", "
drm_crtc" or something else entirely. And since the object is called "crtc" everywhere else, it's nice not to have to make an exception in the vblank code.
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
In reply to Ville SyrjäläQuoted 34 lines · Ville Syrjälä
Quoted 9 lines · Russell King - ARM Linux
Quoted 4 lines · Thierry Reding
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.I don't like being forced to use the "pipe" naming in all drivers; I found that really confusing when I first looked at DRM, and it took a long time to work out that "pipe" basically means "crtc" or "gpu".
crtc mean "cathode ray tube controller". If you weren't used to it, it would be pretty much impossible to guess what piece of modern hardware that means. So I think it's more a case of "a lot of this junk used to be in what people called the crtc, so we'll call this modern thing a crtc too". Although I think most of the hardware people moved on from using that name quite a long time ago.
"gpu" can mean either just the part that does the rendering and whatnot, or it can mean the entire graphics "card". But calling a display pipeline a "gpu" is not done. Now _that_ would be confusing.
"pipe" is fairly nice term, meaning "pipeline". That describes the thing quite nicely. Stuff comes in from one end, flows through the pipe, and goes out the other end.
At least both Intel and OMAP used the term pipe or pipeline in the hardware docs. Can't really say aything about other brands, at least if I discount the more ancient junk I'm familiar with.
Quoted 2 lines
What's wrong with keeping "crtc" as the index terminology for crtc things? Surely that's more descriptive of what's going on here?
Quoted 6 lines
I can't speak for Thierry, but I assume the real motivation for this renaming was to make it clear which is the "index", and which is the crtc object. "pipe" for one, "crtc" for the other. Avoids having to call the object "dcrtc", "
drm_crtc" or something else entirely. And since the object is called "crtc" everywhere else, it's nice not to have to make an exception in the vblank code.
Exactly this. I find it to be very confusing to read through drivers and see completely inconsistent naming for what's really the same thing. The list isn't limited to "pipe", "crtc" or "index". There are others that use "head" or "crtc_id". The latter in particular is very confusing because, at least in most of the cases I've seen, it refers to the pipe rather than the CRTC object ID.
That said this is all only temporary, though it may take us a while to get rid of it. The ultimate goal is to convert all drivers over to using struct drm_crtc * everywhere, at which point we don't have to bother with what to call the CRTC index. As a preliminary step, having drivers use consistent naming is hopefully going to make it easier to replace.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
In reply to Thierry RedingQuoted 28 lines · Thierry Reding
From: Thierry Reding <[email protected]>
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 <[email protected]>Cc Alex Deucher <[email protected]>Cc Russell King <[email protected]>Cc Inki Dae <[email protected]>Cc Jianwei Wang <[email protected]>Cc Alison Wang <[email protected]>Cc Patrik Jakobsson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Rob Clark <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Mark Yao <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Thomas Hellstrom <[email protected]>Signed-off-by Thierry Reding <[email protected]>---
[...]
Quoted 2 lines
drivers/gpu/drm/sti/sti_crtc.c | 16 ++++++------ drivers/gpu/drm/sti/sti_crtc.h | 4 +--
[...]
Quoted 58 lines
drivers/gpu/drm/sti/sti_crtc.c +8
-8@@ -299,7 +299,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,return 0 ; } -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc) +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct sti_private *dev_priv = dev->dev_private;struct sti_compositor *compo = dev_priv->compo;@@ -307,9 +307,9 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_register_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_register_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, - vtg_vblank_nb, crtc)) { + vtg_vblank_nb, pipe)) {DRM_ERROR ("Cannot register VTG notifier\n" );return -EINVAL ; }@@ -318,7 +318,7 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc) }EXPORT_SYMBOL (sti_crtc_enable_vblank); -void sti_crtc_disable_vblank (struct drm_device *drm_dev,int crtc) +void sti_crtc_disable_vblank (struct drm_device *drm_dev,unsigned int pipe) {struct sti_private *priv = drm_dev->dev_private;struct sti_compositor *compo = priv->compo;@@ -326,14 +326,14 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_unregister_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_unregister_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, vtg_vblank_nb))DRM_DEBUG_DRIVER ("Warning: cannot unregister VTG notifier\n" );/* free the resources of the pending requests */ -if (compo->mixer[crtc]->pending_event) { -drm_vblank_put (drm_dev, crtc); - compo->mixer[crtc]->pending_event =NULL ; +if (compo->mixer[pipe]->pending_event) { +drm_vblank_put (drm_dev, pipe); + compo->mixer[pipe]->pending_event =NULL ; } }EXPORT_SYMBOL (sti_crtc_disable_vblank);drivers/gpu/drm/sti/sti_crtc.h +0
-0
drivers/gpu/drm/sti/sti_crtc.h struct sti_mixer; · line 20
Quoted 10 lines
drivers/gpu/drm/sti/sti_crtc.h +2
-2@@ -13,8 +13,8 @@ struct sti_mixer;int sti_crtc_init (struct drm_device *drm_dev,struct sti_mixer *mixer,struct drm_plane *primary,struct drm_plane *cursor); -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc); -void sti_crtc_disable_vblank (struct drm_device *dev,int crtc); +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe); +void sti_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe);int sti_crtc_vblank_cb (struct notifier_block *nb,unsigned long event,void *data);bool sti_crtc_is_main (struct drm_crtc *drm_crtc);
Tested on top of next-20151001.
You can add my Ack-by on this patch
Vincent
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/16] drm/irq: Use unsigned int pipe in public API
In reply to Thierry RedingQuoted 6 lines · Thierry Reding
From: Thierry Reding <[email protected]>
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.
Quickly scanned through this one, didn't spot anything alarming.
Quoted 1,680 lines
Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Cc Russell King <[email protected]>Cc Inki Dae <[email protected]>Cc Jianwei Wang <[email protected]>Cc Alison Wang <[email protected]>Cc Patrik Jakobsson <[email protected]>Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Philipp Zabel <[email protected]>Cc David Airlie <[email protected]>Cc Rob Clark <[email protected]>Cc Ben Skeggs <[email protected]>Cc Tomi Valkeinen <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Mark Yao <[email protected]>Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Cc Thomas Hellstrom <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 9 ++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 36 +++++++++++++------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 9 +++---- drivers/gpu/drm/armada/armada_drv.c | 8 +++--- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 6 +++-- drivers/gpu/drm/drm_irq.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 +-- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 5 ++-- drivers/gpu/drm/gma500/psb_drv.h | 6 ++--- drivers/gpu/drm/gma500/psb_irq.c | 8 +++--- drivers/gpu/drm/gma500/psb_irq.h | 6 ++--- drivers/gpu/drm/i915/i915_irq.c | 34 ++++++++++++------------- drivers/gpu/drm/imx/imx-drm-core.c | 8 +++--- drivers/gpu/drm/mga/mga_drv.h | 6 ++--- drivers/gpu/drm/mga/mga_irq.c | 20 +++++++-------- drivers/gpu/drm/msm/msm_drv.c | 12 ++++----- drivers/gpu/drm/nouveau/nouveau_display.c | 23 +++++++++-------- drivers/gpu/drm/nouveau/nouveau_display.h | 12 ++++----- drivers/gpu/drm/omapdrm/omap_drv.h | 4 +-- drivers/gpu/drm/omapdrm/omap_irq.c | 16 ++++++------ drivers/gpu/drm/qxl/qxl_drv.c | 7 ++--- drivers/gpu/drm/r128/r128_drv.h | 6 ++--- drivers/gpu/drm/r128/r128_irq.c | 16 ++++++------ drivers/gpu/drm/radeon/radeon_display.c | 25 +++++++++--------- drivers/gpu/drm/radeon/radeon_drv.c | 13 +++++----- drivers/gpu/drm/radeon/radeon_drv.h | 6 ++--- drivers/gpu/drm/radeon/radeon_irq.c | 38 ++++++++++++++-------------- drivers/gpu/drm/radeon/radeon_mode.h | 5 ++-- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 8 +++--- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 +++-- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 +-- drivers/gpu/drm/sti/sti_crtc.c | 16 ++++++------ drivers/gpu/drm/sti/sti_crtc.h | 4 +-- drivers/gpu/drm/tegra/drm.c | 7 ++--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +-- drivers/gpu/drm/via/via_drv.h | 6 ++--- drivers/gpu/drm/via/via_irq.c | 17 +++++++------ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 ++--- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ++--- include/drm/drmP.h | 25 +++++++++--------- 42 files changed, 239 insertions(+), 232 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +4
-4@@ -2348,10 +2348,10 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev, struct drm_file *file_priv);int amdgpu_suspend_kms (struct drm_device *dev,bool suspend,bool fbcon);int amdgpu_resume_kms (struct drm_device *dev,bool resume,bool fbcon); -u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,int crtc); -int amdgpu_enable_vblank_kms (struct drm_device *dev,int crtc); -void amdgpu_disable_vblank_kms (struct drm_device *dev,int crtc); -int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe); +int amdgpu_enable_vblank_kms (struct drm_device *dev,unsigned int pipe); +void amdgpu_disable_vblank_kms (struct drm_device *dev,unsigned int pipe); +int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +5
-4@@ -721,7 +721,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* an optional accurate timestamp of when query happened. * * \param dev Device to query. -* \param crtc Crtc to query. +* \param pipe Crtc to query. * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Location where vertical scanout position should be stored. * \param *hpos Location where horizontal scanout position should go. @@ -744,8 +744,9 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,int crtc,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {u32 vbl =0 , position =0 ;@@ -760,7 +761,7 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int flif (stime) *stime =ktime_get (); -if (amdgpu_display_page_flip_get_scanoutpos (adev, crtc, &vbl, &position) ==0 ) +if (amdgpu_display_page_flip_get_scanoutpos (adev, pipe, &vbl, &position) ==0 ) ret |=DRM_SCANOUTPOS_VALID ;/* Get optional system timestamp after query. */ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +18
-18@@ -599,36 +599,36 @@ void amdgpu_driver_preclose_kms(struct drm_device *dev,* amdgpu_get_vblank_counter_kms - get frame count * * @dev: drm dev pointer -* @crtc: crtc to get the frame count from +* @pipe: crtc to get the frame count from * * Gets the frame count on the requested crtc (all asics). * Returns frame count on success, -EINVAL on failure. */ -u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,int crtc) +u32 amdgpu_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -if (crtc <0 || crtc >= adev->mode_info.num_crtc) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >= adev->mode_info.num_crtc) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; } -return amdgpu_display_vblank_get_counter (adev, crtc); +return amdgpu_display_vblank_get_counter (adev, pipe); }/** * amdgpu_enable_vblank_kms - enable vblank interrupt * * @dev: drm dev pointer -* @crtc: crtc to enable vblank interrupt for +* @pipe: crtc to enable vblank interrupt for * * Enable the interrupt on the requested crtc (all asics). * Returns 0 on success, -EINVAL on failure. */ -int amdgpu_enable_vblank_kms (struct drm_device *dev,int crtc) +int amdgpu_enable_vblank_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -int idx =amdgpu_crtc_idx_to_irq_type (adev, crtc); +int idx =amdgpu_crtc_idx_to_irq_type (adev, pipe);return amdgpu_irq_get (adev, &adev->crtc_irq, idx); }@@ -637,14 +637,14 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, int crtc)* amdgpu_disable_vblank_kms - disable vblank interrupt * * @dev: drm dev pointer -* @crtc: crtc to disable vblank interrupt for +* @pipe: crtc to disable vblank interrupt for * * Disable the interrupt on the requested crtc (all asics). */ -void amdgpu_disable_vblank_kms (struct drm_device *dev,int crtc) +void amdgpu_disable_vblank_kms (struct drm_device *dev,unsigned int pipe) {struct amdgpu_device *adev = dev->dev_private; -int idx =amdgpu_crtc_idx_to_irq_type (adev, crtc); +int idx =amdgpu_crtc_idx_to_irq_type (adev, pipe);amdgpu_irq_put (adev, &adev->crtc_irq, idx); }@@ -662,26 +662,26 @@ void amdgpu_disable_vblank_kms(struct drm_device *dev, int crtc)* scanout position. (all asics). * Returns postive status flags on success, negative error on failure. */ -int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +int amdgpu_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags) { -struct drm_crtc *drmcrtc; +struct drm_crtc *crtc;struct amdgpu_device *adev = dev->dev_private; -if (crtc <0 || crtc >= dev->num_crtcs) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >= dev->num_crtcs) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }/* Get associated drm_crtc: */ - drmcrtc = &adev->mode_info.crtcs[crtc]->base; + crtc = &adev->mode_info.crtcs[pipe]->base;/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, crtc, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (dev, pipe, max_error, vblank_time, flags, - &drmcrtc->hwmode); + &crtc->hwmode); }const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +4
-5@@ -540,11 +540,10 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, bool use_aux);void amdgpu_encoder_set_active_device (struct drm_encoder *encoder); -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos,ktime_t *stime, -ktime_t *etime, -const struct drm_display_mode *mode); +int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime, +const struct drm_display_mode *mode); int amdgpu_framebuffer_init(struct drm_device *dev, struct amdgpu_framebuffer *rfb,drivers/gpu/drm/armada/armada_drv.c +4
-4@@ -254,17 +254,17 @@ void armada_drm_vbl_event_remove(struct armada_crtc *dcrtc, }/* These are called under the vbl_lock. */ -static int armada_drm_enable_vblank (struct drm_device *dev,int crtc) +static int armada_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct armada_private *priv = dev->dev_private; -armada_drm_crtc_enable_irq (priv->dcrtc[crtc],VSYNC_IRQ_ENA ); +armada_drm_crtc_enable_irq (priv->dcrtc[pipe],VSYNC_IRQ_ENA );return 0 ; } -static void armada_drm_disable_vblank (struct drm_device *dev,int crtc) +static void armada_drm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct armada_private *priv = dev->dev_private; -armada_drm_crtc_disable_irq (priv->dcrtc[crtc],VSYNC_IRQ_ENA ); +armada_drm_crtc_disable_irq (priv->dcrtc[pipe],VSYNC_IRQ_ENA ); }static struct drm_ioctl_desc armada_ioctls[] = {drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +4
-2@@ -656,7 +656,8 @@ static void atmel_hlcdc_dc_irq_uninstall(struct drm_device *dev)regmap_read (dc->hlcdc->regmap,ATMEL_HLCDC_ISR , &isr); } -static int atmel_hlcdc_dc_enable_vblank (struct drm_device *dev,int crtc) +static int atmel_hlcdc_dc_enable_vblank (struct drm_device *dev, +unsigned int pipe) {struct atmel_hlcdc_dc *dc = dev->dev_private;@@ -666,7 +667,8 @@ static int atmel_hlcdc_dc_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void atmel_hlcdc_dc_disable_vblank (struct drm_device *dev,int crtc) +static void atmel_hlcdc_dc_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct atmel_hlcdc_dc *dc = dev->dev_private;drivers/gpu/drm/drm_irq.c +1
-1@@ -876,7 +876,7 @@ drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe,* Returns: * The software vblank counter. */ -u32 drm_vblank_count (struct drm_device *dev,int pipe) +u32 drm_vblank_count (struct drm_device *dev,unsigned int pipe) {struct drm_vblank_crtc *vblank = &dev->vblank[pipe];drivers/gpu/drm/exynos/exynos_drm_crtc.c +2
-2@@ -167,7 +167,7 @@ err_crtc:return ERR_PTR (ret); } -int exynos_drm_crtc_enable_vblank (struct drm_device *dev,int pipe) +int exynos_drm_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct exynos_drm_private *private = dev->dev_private; struct exynos_drm_crtc *exynos_crtc =@@ -179,7 +179,7 @@ int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -void exynos_drm_crtc_disable_vblank (struct drm_device *dev,int pipe) +void exynos_drm_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct exynos_drm_private *private = dev->dev_private; struct exynos_drm_crtc *exynos_crtc =drivers/gpu/drm/exynos/exynos_drm_crtc.h +2
-2@@ -23,8 +23,8 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,enum exynos_drm_output_type type, const struct exynos_drm_crtc_ops *ops, void *context); -int exynos_drm_crtc_enable_vblank (struct drm_device *dev,int pipe); -void exynos_drm_crtc_disable_vblank (struct drm_device *dev,int pipe); +int exynos_drm_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe); +void exynos_drm_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe);void exynos_drm_crtc_wait_pending_update (struct exynos_drm_crtc *exynos_crtc);void exynos_drm_crtc_finish_update (struct exynos_drm_crtc *exynos_crtc,struct exynos_drm_plane *exynos_plane);drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +3
-2@@ -140,7 +140,7 @@ static irqreturn_t fsl_dcu_drm_irq(int irq, void *arg)return IRQ_HANDLED ; } -static int fsl_dcu_drm_enable_vblank (struct drm_device *dev,int crtc) +static int fsl_dcu_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;unsigned int value;@@ -156,7 +156,8 @@ static int fsl_dcu_drm_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void fsl_dcu_drm_disable_vblank (struct drm_device *dev,int crtc) +static void fsl_dcu_drm_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;unsigned int value;drivers/gpu/drm/gma500/psb_drv.h +3
-3@@ -687,15 +687,15 @@ extern void psb_irq_turn_off_dpst(struct drm_device *dev);extern void psb_irq_uninstall_islands (struct drm_device *dev,int hw_islands);extern int psb_vblank_wait2 (struct drm_device *dev,unsigned int *sequence);extern int psb_vblank_wait (struct drm_device *dev,unsigned int *sequence); -extern int psb_enable_vblank (struct drm_device *dev,int crtc); -extern void psb_disable_vblank (struct drm_device *dev,int crtc); +extern int psb_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void psb_disable_vblank (struct drm_device *dev,unsigned int pipe);void psb_enable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask);void psb_disable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask); -extern u32 psb_get_vblank_counter (struct drm_device *dev,int crtc); +extern u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe);/* framebuffer.c */ extern int psbfb_probed (struct drm_device *dev);drivers/gpu/drm/gma500/psb_irq.c +4
-4@@ -510,7 +510,7 @@ int psb_irq_disable_dpst(struct drm_device *dev)/* * It is used to enable VBLANK interrupt */ -int psb_enable_vblank (struct drm_device *dev,int pipe) +int psb_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -549,7 +549,7 @@ int psb_enable_vblank(struct drm_device *dev, int pipe)/* * It is used to disable VBLANK interrupt */ -void psb_disable_vblank (struct drm_device *dev,int pipe) +void psb_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -622,7 +622,7 @@ void mdfld_disable_te(struct drm_device *dev, int pipe)/* Called from drm generic code, passed a 'crtc', which * we use as a pipe index */ -u32 psb_get_vblank_counter (struct drm_device *dev,int pipe) +u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {uint32_t high_frame =PIPEAFRAMEHIGH ;uint32_t low_frame =PIPEAFRAMEPIXEL ;@@ -654,7 +654,7 @@ u32 psb_get_vblank_counter(struct drm_device *dev, int pipe) reg_val =REG_READ (pipeconf_reg);if (!(reg_val &PIPEACONF_ENABLE )) { -dev_err (dev->dev,"trying to get vblank count for disabled pipe %d\n" , +dev_err (dev->dev,"trying to get vblank count for disabled pipe %u\n" , pipe); goto psb_get_vblank_counter_exit; }drivers/gpu/drm/gma500/psb_irq.h +3
-3@@ -38,9 +38,9 @@ int psb_irq_enable_dpst(struct drm_device *dev);int psb_irq_disable_dpst (struct drm_device *dev);void psb_irq_turn_on_dpst (struct drm_device *dev);void psb_irq_turn_off_dpst (struct drm_device *dev); -int psb_enable_vblank (struct drm_device *dev,int pipe); -void psb_disable_vblank (struct drm_device *dev,int pipe); -u32 psb_get_vblank_counter (struct drm_device *dev,int pipe); +int psb_enable_vblank (struct drm_device *dev,unsigned int pipe); +void psb_disable_vblank (struct drm_device *dev,unsigned int pipe); +u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe);int mdfld_enable_te (struct drm_device *dev,int pipe);void mdfld_disable_te (struct drm_device *dev,int pipe);drivers/gpu/drm/i915/i915_irq.c +17
-17@@ -649,7 +649,7 @@ static void i915_enable_asle_pipestat(struct drm_device *dev)* of horizontal active on the first line of vertical active */ -static u32 i8xx_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 i8xx_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {/* Gen2 doesn't have a hardware frame counter */ return 0 ;@@ -658,7 +658,7 @@ static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe)/* Called from drm generic code, passed a 'crtc', which * we use as a pipe index */ -static u32 i915_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 i915_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long high_frame;@@ -706,7 +706,7 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)return (((high1 <<8 ) | low) + (pixel >= vbl_start)) &0xffffff ; } -static u32 gm45_get_vblank_counter (struct drm_device *dev,int pipe) +static u32 gm45_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;int reg =PIPE_FRMCOUNT_GM45 (pipe);@@ -767,7 +767,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc)return (position + crtc->scanline_offset) % vtotal; } -static int i915_get_crtc_scanoutpos (struct drm_device *dev,int pipe, +static int i915_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe,unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode)@@ -904,27 +904,27 @@ int intel_get_crtc_scanline(struct intel_crtc *crtc)return position; } -static int i915_get_vblank_timestamp (struct drm_device *dev,int pipe, +static int i915_get_vblank_timestamp (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags) {struct drm_crtc *crtc; -if (pipe <0 || pipe >=INTEL_INFO (dev)->num_pipes) { -DRM_ERROR ("Invalid crtc %d\n" , pipe); +if (pipe >=INTEL_INFO (dev)->num_pipes) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }/* Get drm_crtc to timestamp: */ crtc =intel_get_crtc_for_pipe (dev, pipe);if (crtc ==NULL ) { -DRM_ERROR ("Invalid crtc %d\n" , pipe); +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }if (!crtc->hwmode.crtc_clock) { -DRM_DEBUG_KMS ("crtc %d is disabled\n" , pipe); +DRM_DEBUG_KMS ("crtc %u is disabled\n" , pipe);return -EBUSY ; }@@ -2612,7 +2612,7 @@ void i915_handle_error(struct drm_device *dev, bool wedged,/* Called from drm generic code, passed 'crtc' which * we use as a pipe index */ -static int i915_enable_vblank (struct drm_device *dev,int pipe) +static int i915_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2629,7 +2629,7 @@ static int i915_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int ironlake_enable_vblank (struct drm_device *dev,int pipe) +static int ironlake_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2643,7 +2643,7 @@ static int ironlake_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int valleyview_enable_vblank (struct drm_device *dev,int pipe) +static int valleyview_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2656,7 +2656,7 @@ static int valleyview_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static int gen8_enable_vblank (struct drm_device *dev,int pipe) +static int gen8_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2672,7 +2672,7 @@ static int gen8_enable_vblank(struct drm_device *dev, int pipe)/* Called from drm generic code, passed 'crtc' which * we use as a pipe index */ -static void i915_disable_vblank (struct drm_device *dev,int pipe) +static void i915_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2684,7 +2684,7 @@ static void i915_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void ironlake_disable_vblank (struct drm_device *dev,int pipe) +static void ironlake_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2696,7 +2696,7 @@ static void ironlake_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void valleyview_disable_vblank (struct drm_device *dev,int pipe) +static void valleyview_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;@@ -2707,7 +2707,7 @@ static void valleyview_disable_vblank(struct drm_device *dev, int pipe)spin_unlock_irqrestore (&dev_priv->irq_lock, irqflags); } -static void gen8_disable_vblank (struct drm_device *dev,int pipe) +static void gen8_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct drm_i915_private *dev_priv = dev->dev_private;unsigned long irqflags;drivers/gpu/drm/imx/imx-drm-core.c +4
-4@@ -144,10 +144,10 @@ void imx_drm_handle_vblank(struct imx_drm_crtc *imx_drm_crtc) }EXPORT_SYMBOL_GPL (imx_drm_handle_vblank); -static int imx_drm_enable_vblank (struct drm_device *drm,int crtc) +static int imx_drm_enable_vblank (struct drm_device *drm,unsigned int pipe) {struct imx_drm_device *imxdrm = drm->dev_private; -struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[crtc]; +struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[pipe];int ret;if (!imx_drm_crtc)@@ -162,10 +162,10 @@ static int imx_drm_enable_vblank(struct drm_device *drm, int crtc)return ret; } -static void imx_drm_disable_vblank (struct drm_device *drm,int crtc) +static void imx_drm_disable_vblank (struct drm_device *drm,unsigned int pipe) {struct imx_drm_device *imxdrm = drm->dev_private; -struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[crtc]; +struct imx_drm_crtc *imx_drm_crtc = imxdrm->crtc[pipe];if (!imx_drm_crtc)return ;drivers/gpu/drm/mga/mga_drv.h +3
-3@@ -183,9 +183,9 @@ extern int mga_warp_install_microcode(drm_mga_private_t *dev_priv);extern int mga_warp_init (drm_mga_private_t *dev_priv);/* mga_irq.c */ -extern int mga_enable_vblank (struct drm_device *dev,int crtc); -extern void mga_disable_vblank (struct drm_device *dev,int crtc); -extern u32 mga_get_vblank_counter (struct drm_device *dev,int crtc); +extern int mga_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void mga_disable_vblank (struct drm_device *dev,unsigned int pipe); +extern u32 mga_get_vblank_counter (struct drm_device *dev,unsigned int pipe);extern int mga_driver_fence_wait (struct drm_device *dev,unsigned int *sequence);extern int mga_driver_vblank_wait (struct drm_device *dev,unsigned int *sequence);extern irqreturn_t mga_driver_irq_handler (int irq,void *arg);drivers/gpu/drm/mga/mga_irq.c +10
-10@@ -35,12 +35,12 @@#include <drm/mga_drm.h> #include "mga_drv.h" -u32 mga_get_vblank_counter (struct drm_device *dev,int crtc) +u32 mga_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {const drm_mga_private_t *const dev_priv = (drm_mga_private_t *) dev->dev_private; -if (crtc !=0 ) +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);@@ -88,13 +88,13 @@ irqreturn_t mga_driver_irq_handler(int irq, void *arg)return IRQ_NONE ; } -int mga_enable_vblank (struct drm_device *dev,int crtc) +int mga_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; -if (crtc !=0 ) { -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +if (pipe !=0 ) { +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return 0 ; }@@ -103,11 +103,11 @@ int mga_enable_vblank(struct drm_device *dev, int crtc) } -void mga_disable_vblank (struct drm_device *dev,int crtc) +void mga_disable_vblank (struct drm_device *dev,unsigned int pipe) { -if (crtc !=0 ) { -DRM_ERROR ("tried to disable vblank on non-existent crtc %d\n" , - crtc); +if (pipe !=0 ) { +DRM_ERROR ("tried to disable vblank on non-existent crtc %u\n" , + pipe); }/* Do *NOT* disable the vertical refresh interrupt. MGA doesn't have drivers/gpu/drm/msm/msm_drv.c +6
-6@@ -531,24 +531,24 @@ static void msm_irq_uninstall(struct drm_device *dev) kms->funcs->irq_uninstall (kms); } -static int msm_enable_vblank (struct drm_device *dev,int crtc_id) +static int msm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct msm_drm_private *priv = dev->dev_private;struct msm_kms *kms = priv->kms;if (!kms)return -ENXIO ; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); -return vblank_ctrl_queue_work (priv, crtc_id, true); +DBG ("dev=%p, crtc=%u" , dev, pipe); +return vblank_ctrl_queue_work (priv, pipe, true); } -static void msm_disable_vblank (struct drm_device *dev,int crtc_id) +static void msm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct msm_drm_private *priv = dev->dev_private;struct msm_kms *kms = priv->kms;if (!kms)return ; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); -vblank_ctrl_queue_work (priv, crtc_id, false); +DBG ("dev=%p, crtc=%u" , dev, pipe); +vblank_ctrl_queue_work (priv, pipe, false); }/* drivers/gpu/drm/nouveau/nouveau_display.c +12
-11@@ -51,12 +51,12 @@ nouveau_display_vblank_handler(struct nvif_notify *notify) }int -nouveau_display_vblank_enable (struct drm_device *dev,int head) +nouveau_display_vblank_enable (struct drm_device *dev,unsigned int pipe) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {struct nouveau_crtc *nv_crtc =nouveau_crtc (crtc); -if (nv_crtc->index == head) { +if (nv_crtc->index == pipe) {nvif_notify_get (&nv_crtc->vblank);return 0 ; }@@ -65,12 +65,12 @@ nouveau_display_vblank_enable(struct drm_device *dev, int head) }void -nouveau_display_vblank_disable (struct drm_device *dev,int head) +nouveau_display_vblank_disable (struct drm_device *dev,unsigned int pipe) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {struct nouveau_crtc *nv_crtc =nouveau_crtc (crtc); -if (nv_crtc->index == head) { +if (nv_crtc->index == pipe) {nvif_notify_put (&nv_crtc->vblank);return ; }@@ -132,14 +132,15 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, }int -nouveau_display_scanoutpos (struct drm_device *dev,int head,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +nouveau_display_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { -if (nouveau_crtc (crtc)->index == head) { +if (nouveau_crtc (crtc)->index == pipe) {return nouveau_display_scanoutpos_head (crtc, vpos, hpos, stime, etime); }@@ -149,15 +150,15 @@ nouveau_display_scanoutpos(struct drm_device *dev, int head, unsigned int flags, }int -nouveau_display_vblstamp (struct drm_device *dev,int head,int *max_error, -struct timeval *time,unsigned flags) +nouveau_display_vblstamp (struct drm_device *dev,unsigned int pipe, +int *max_error,struct timeval *time,unsigned flags) {struct drm_crtc *crtc;list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { -if (nouveau_crtc (crtc)->index == head) { +if (nouveau_crtc (crtc)->index == pipe) {return drm_calc_vbltimestamp_from_scanoutpos (dev, - head, max_error, time, flags, + pipe, max_error, time, flags, &crtc->hwmode); } }drivers/gpu/drm/nouveau/nouveau_display.h +6
-6@@ -65,12 +65,12 @@ int nouveau_display_init(struct drm_device *dev);void nouveau_display_fini (struct drm_device *dev);int nouveau_display_suspend (struct drm_device *dev,bool runtime);void nouveau_display_resume (struct drm_device *dev,bool runtime); -int nouveau_display_vblank_enable (struct drm_device *,int ); -void nouveau_display_vblank_disable (struct drm_device *,int ); -int nouveau_display_scanoutpos (struct drm_device *,int ,unsigned int , -int *,int *,ktime_t *,ktime_t *, -const struct drm_display_mode *); -int nouveau_display_vblstamp (struct drm_device *,int ,int *, +int nouveau_display_vblank_enable (struct drm_device *,unsigned int ); +void nouveau_display_vblank_disable (struct drm_device *,unsigned int ); +int nouveau_display_scanoutpos (struct drm_device *,unsigned int , +unsigned int ,int *,int *,ktime_t *, +ktime_t *,const struct drm_display_mode *); +int nouveau_display_vblstamp (struct drm_device *,unsigned int ,int *,struct timeval *,unsigned ); int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,drivers/gpu/drm/omapdrm/omap_drv.h +2
-2@@ -129,8 +129,8 @@ void omap_gem_describe_objects(struct list_head *list, struct seq_file *m);int omap_gem_resume (struct device *dev);#endif -int omap_irq_enable_vblank (struct drm_device *dev,int crtc_id); -void omap_irq_disable_vblank (struct drm_device *dev,int crtc_id); +int omap_irq_enable_vblank (struct drm_device *dev,unsigned int pipe); +void omap_irq_disable_vblank (struct drm_device *dev,unsigned int pipe);void __omap_irq_register (struct drm_device *dev,struct omap_drm_irq *irq);void __omap_irq_unregister (struct drm_device *dev,struct omap_drm_irq *irq);void omap_irq_register (struct drm_device *dev,struct omap_drm_irq *irq);drivers/gpu/drm/omapdrm/omap_irq.c +8
-8@@ -134,7 +134,7 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait,/** * enable_vblank - enable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Enable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since @@ -144,13 +144,13 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait,* Zero on success, appropriate errno if the given @crtc's vblank * interrupt cannot be enabled. */ -int omap_irq_enable_vblank (struct drm_device *dev,int crtc_id) +int omap_irq_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct omap_drm_private *priv = dev->dev_private; -struct drm_crtc *crtc = priv->crtcs[crtc_id]; +struct drm_crtc *crtc = priv->crtcs[pipe];unsigned long flags; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); +DBG ("dev=%p, crtc=%u" , dev, pipe);spin_lock_irqsave (&list_lock, flags); priv->vblank_mask |=pipe2vbl (crtc);@@ -163,19 +163,19 @@ int omap_irq_enable_vblank(struct drm_device *dev, int crtc_id)/** * disable_vblank - disable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Disable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since * interrupts will have to stay on to keep the count accurate. */ -void omap_irq_disable_vblank (struct drm_device *dev,int crtc_id) +void omap_irq_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct omap_drm_private *priv = dev->dev_private; -struct drm_crtc *crtc = priv->crtcs[crtc_id]; +struct drm_crtc *crtc = priv->crtcs[pipe];unsigned long flags; -DBG ("dev=%p, crtc=%d" , dev, crtc_id); +DBG ("dev=%p, crtc=%u" , dev, pipe);spin_lock_irqsave (&list_lock, flags); priv->vblank_mask &= ~pipe2vbl (crtc);drivers/gpu/drm/qxl/qxl_drv.c +4
-3@@ -196,17 +196,18 @@ static int qxl_pm_restore(struct device *dev)return qxl_drm_resume (drm_dev, false); } -static u32 qxl_noop_get_vblank_counter (struct drm_device *dev,int crtc) +static u32 qxl_noop_get_vblank_counter (struct drm_device *dev, +unsigned int pipe) {return 0 ; } -static int qxl_noop_enable_vblank (struct drm_device *dev,int crtc) +static int qxl_noop_enable_vblank (struct drm_device *dev,unsigned int pipe) {return 0 ; } -static void qxl_noop_disable_vblank (struct drm_device *dev,int crtc) +static void qxl_noop_disable_vblank (struct drm_device *dev,unsigned int pipe) { }drivers/gpu/drm/r128/r128_drv.h +3
-3@@ -154,9 +154,9 @@ extern int r128_wait_ring(drm_r128_private_t *dev_priv, int n);extern int r128_do_cce_idle (drm_r128_private_t *dev_priv);extern int r128_do_cleanup_cce (struct drm_device *dev); -extern int r128_enable_vblank (struct drm_device *dev,int crtc); -extern void r128_disable_vblank (struct drm_device *dev,int crtc); -extern u32 r128_get_vblank_counter (struct drm_device *dev,int crtc); +extern int r128_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void r128_disable_vblank (struct drm_device *dev,unsigned int pipe); +extern u32 r128_get_vblank_counter (struct drm_device *dev,unsigned int pipe);extern irqreturn_t r128_driver_irq_handler (int irq,void *arg);extern void r128_driver_irq_preinstall (struct drm_device *dev);extern int r128_driver_irq_postinstall (struct drm_device *dev);drivers/gpu/drm/r128/r128_irq.c +8
-8@@ -34,11 +34,11 @@#include <drm/r128_drm.h> #include "r128_drv.h" -u32 r128_get_vblank_counter (struct drm_device *dev,int crtc) +u32 r128_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {const drm_r128_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);@@ -62,12 +62,12 @@ irqreturn_t r128_driver_irq_handler(int irq, void *arg)return IRQ_NONE ; } -int r128_enable_vblank (struct drm_device *dev,int crtc) +int r128_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_r128_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) { -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) { +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);return -EINVAL ; }@@ -75,10 +75,10 @@ int r128_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void r128_disable_vblank (struct drm_device *dev,int crtc) +void r128_disable_vblank (struct drm_device *dev,unsigned int pipe) { -if (crtc !=0 ) -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);/* * FIXME: implement proper interrupt disable by using the vblank drivers/gpu/drm/radeon/radeon_display.c +13
-12@@ -1799,8 +1799,9 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc,unsigned int flags, -int *vpos,int *hpos,ktime_t *stime,ktime_t *etime, +int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos, +ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode) {u32 stat_crtc =0 , vbl =0 , position =0 ;@@ -1816,42 +1817,42 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl *stime =ktime_get ();if (ASIC_IS_DCE4 (rdev)) { -if (crtc ==0 ) { +if (pipe ==0 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC0_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC0_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC1_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC1_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==2 ) { +if (pipe ==2 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC2_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC2_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==3 ) { +if (pipe ==3 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC3_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC3_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==4 ) { +if (pipe ==4 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC4_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC4_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==5 ) { +if (pipe ==5 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC5_REGISTER_OFFSET ); position = RREG32(EVERGREEN_CRTC_STATUS_POSITION +@@ -1859,19 +1860,19 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl ret |=DRM_SCANOUTPOS_VALID ; } }else if (ASIC_IS_AVIVO (rdev)) { -if (crtc ==0 ) { +if (pipe ==0 ) { vbl =RREG32 (AVIVO_D1CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D1CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl =RREG32 (AVIVO_D2CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D2CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } }else {/* Pre-AVIVO: Different encoding of scanout pos and vblank interval. */ -if (crtc ==0 ) { +if (pipe ==0 ) {/* Assume vbl_end == 0, get vbl_start from * upper 16 bits. */ @@ -1885,7 +1886,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, int crtc, unsigned int fl ret |=DRM_SCANOUTPOS_VALID ; } -if (crtc ==1 ) { +if (pipe ==1 ) { vbl = (RREG32 (RADEON_CRTC2_V_TOTAL_DISP ) &RADEON_CRTC_V_DISP ) >>RADEON_CRTC_V_DISP_SHIFT ; position = (RREG32 (RADEON_CRTC2_VLINE_CRNT_VLINE ) >>16 ) &RADEON_CRTC_V_TOTAL ;drivers/gpu/drm/radeon/radeon_drv.c +6
-7@@ -105,10 +105,10 @@ void radeon_driver_preclose_kms(struct drm_device *dev, struct drm_file *file_priv);int radeon_suspend_kms (struct drm_device *dev,bool suspend,bool fbcon);int radeon_resume_kms (struct drm_device *dev,bool resume,bool fbcon); -u32 radeon_get_vblank_counter_kms (struct drm_device *dev,int crtc); -int radeon_enable_vblank_kms (struct drm_device *dev,int crtc); -void radeon_disable_vblank_kms (struct drm_device *dev,int crtc); -int radeon_get_vblank_timestamp_kms (struct drm_device *dev,int crtc, +u32 radeon_get_vblank_counter_kms (struct drm_device *dev,unsigned int pipe); +int radeon_enable_vblank_kms (struct drm_device *dev,unsigned int pipe); +void radeon_disable_vblank_kms (struct drm_device *dev,unsigned int pipe); +int radeon_get_vblank_timestamp_kms (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);@@ -124,9 +124,8 @@ void radeon_gem_object_close(struct drm_gem_object *obj,struct dma_buf *radeon_gem_prime_export (struct drm_device *dev,struct drm_gem_object *gobj,int flags); -extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int crtc, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);extern bool radeon_is_px (struct drm_device *dev);drivers/gpu/drm/radeon/radeon_drv.h +3
-3@@ -404,9 +404,9 @@ extern int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file *extern int radeon_irq_wait (struct drm_device *dev,void *data,struct drm_file *file_priv);extern void radeon_do_release (struct drm_device * dev); -extern u32 radeon_get_vblank_counter (struct drm_device *dev,int crtc); -extern int radeon_enable_vblank (struct drm_device *dev,int crtc); -extern void radeon_disable_vblank (struct drm_device *dev,int crtc); +extern u32 radeon_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +extern int radeon_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void radeon_disable_vblank (struct drm_device *dev,unsigned int pipe);extern irqreturn_t radeon_driver_irq_handler (int irq,void *arg);extern void radeon_driver_irq_preinstall (struct drm_device * dev);extern int radeon_driver_irq_postinstall (struct drm_device *dev);drivers/gpu/drm/radeon/radeon_irq.c +19
-19@@ -62,12 +62,12 @@ static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state)RADEON_WRITE (R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } -int radeon_enable_vblank (struct drm_device *dev,int crtc) +int radeon_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -switch (crtc) { +switch (pipe) {case 0 :r500_vbl_irq_set_state (dev,R500_D1MODE_INT_MASK ,1 );break ;@@ -75,12 +75,12 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)r500_vbl_irq_set_state (dev,R500_D2MODE_INT_MASK ,1 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return -EINVAL ; } }else { -switch (crtc) { +switch (pipe) {case 0 :radeon_irq_set_state (dev,RADEON_CRTC_VBLANK_MASK ,1 );break ;@@ -88,8 +88,8 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)radeon_irq_set_state (dev,RADEON_CRTC2_VBLANK_MASK ,1 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);return -EINVAL ; } }@@ -97,12 +97,12 @@ int radeon_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void radeon_disable_vblank (struct drm_device *dev,int crtc) +void radeon_disable_vblank (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -switch (crtc) { +switch (pipe) {case 0 :r500_vbl_irq_set_state (dev,R500_D1MODE_INT_MASK ,0 );break ;@@ -110,12 +110,12 @@ void radeon_disable_vblank(struct drm_device *dev, int crtc)r500_vbl_irq_set_state (dev,R500_D2MODE_INT_MASK ,0 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);break ; } }else { -switch (crtc) { +switch (pipe) {case 0 :radeon_irq_set_state (dev,RADEON_CRTC_VBLANK_MASK ,0 );break ;@@ -123,8 +123,8 @@ void radeon_disable_vblank(struct drm_device *dev, int crtc)radeon_irq_set_state (dev,RADEON_CRTC2_VBLANK_MASK ,0 );break ;default : -DRM_ERROR ("tried to enable vblank on non-existent crtc %d\n" , - crtc); +DRM_ERROR ("tried to enable vblank on non-existent crtc %u\n" , + pipe);break ; } }@@ -255,7 +255,7 @@ static int radeon_wait_irq(struct drm_device * dev, int swi_nr)return ret; } -u32 radeon_get_vblank_counter (struct drm_device *dev,int crtc) +u32 radeon_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {drm_radeon_private_t *dev_priv = dev->dev_private;@@ -264,18 +264,18 @@ u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc)return -EINVAL ; } -if (crtc <0 || crtc >1 ) { -DRM_ERROR ("Invalid crtc %d\n" , crtc); +if (pipe >1 ) { +DRM_ERROR ("Invalid crtc %u\n" , pipe);return -EINVAL ; }if ((dev_priv->flags &RADEON_FAMILY_MASK ) >=CHIP_RS600 ) { -if (crtc ==0 ) +if (pipe ==0 )return RADEON_READ (R500_D1CRTC_FRAME_COUNT );else return RADEON_READ (R500_D2CRTC_FRAME_COUNT ); }else { -if (crtc ==0 ) +if (pipe ==0 )return RADEON_READ (RADEON_CRTC_CRNT_FRAME );else return RADEON_READ (RADEON_CRTC2_CRNT_FRAME );drivers/gpu/drm/radeon/radeon_mode.h +2
-3@@ -874,9 +874,8 @@ extern int radeon_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);extern void radeon_cursor_reset (struct drm_crtc *crtc); -extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);drivers/gpu/drm/rcar-du/rcar_du_drv.c +4
-4@@ -221,20 +221,20 @@ static void rcar_du_lastclose(struct drm_device *dev)drm_fbdev_cma_restore_mode (rcdu->fbdev); } -static int rcar_du_enable_vblank (struct drm_device *dev,int crtc) +static int rcar_du_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct rcar_du_device *rcdu = dev->dev_private; -rcar_du_crtc_enable_vblank (&rcdu->crtcs[crtc], true); +rcar_du_crtc_enable_vblank (&rcdu->crtcs[pipe], true);return 0 ; } -static void rcar_du_disable_vblank (struct drm_device *dev,int crtc) +static void rcar_du_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct rcar_du_device *rcdu = dev->dev_private; -rcar_du_crtc_enable_vblank (&rcdu->crtcs[crtc], false); +rcar_du_crtc_enable_vblank (&rcdu->crtcs[pipe], false); }static const struct file_operations rcar_du_fops = {drivers/gpu/drm/rockchip/rockchip_drm_drv.c +4
-2@@ -103,7 +103,8 @@ static struct drm_crtc *rockchip_crtc_from_pipe(struct drm_device *drm,return NULL ; } -static int rockchip_drm_crtc_enable_vblank (struct drm_device *dev,int pipe) +static int rockchip_drm_crtc_enable_vblank (struct drm_device *dev, +unsigned int pipe) {struct rockchip_drm_private *priv = dev->dev_private;struct drm_crtc *crtc =rockchip_crtc_from_pipe (dev, pipe);@@ -115,7 +116,8 @@ static int rockchip_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)return 0 ; } -static void rockchip_drm_crtc_disable_vblank (struct drm_device *dev,int pipe) +static void rockchip_drm_crtc_disable_vblank (struct drm_device *dev, +unsigned int pipe) {struct rockchip_drm_private *priv = dev->dev_private;struct drm_crtc *crtc =rockchip_crtc_from_pipe (dev, pipe);drivers/gpu/drm/shmobile/shmob_drm_drv.c +2
-2@@ -231,7 +231,7 @@ static irqreturn_t shmob_drm_irq(int irq, void *arg)return IRQ_HANDLED ; } -static int shmob_drm_enable_vblank (struct drm_device *dev,int crtc) +static int shmob_drm_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct shmob_drm_device *sdev = dev->dev_private;@@ -240,7 +240,7 @@ static int shmob_drm_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -static void shmob_drm_disable_vblank (struct drm_device *dev,int crtc) +static void shmob_drm_disable_vblank (struct drm_device *dev,unsigned int pipe) {struct shmob_drm_device *sdev = dev->dev_private;drivers/gpu/drm/sti/sti_crtc.c +8
-8@@ -299,7 +299,7 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,return 0 ; } -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc) +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe) {struct sti_private *dev_priv = dev->dev_private;struct sti_compositor *compo = dev_priv->compo;@@ -307,9 +307,9 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_register_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_register_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, - vtg_vblank_nb, crtc)) { + vtg_vblank_nb, pipe)) {DRM_ERROR ("Cannot register VTG notifier\n" );return -EINVAL ; }@@ -318,7 +318,7 @@ int sti_crtc_enable_vblank(struct drm_device *dev, int crtc) }EXPORT_SYMBOL (sti_crtc_enable_vblank); -void sti_crtc_disable_vblank (struct drm_device *drm_dev,int crtc) +void sti_crtc_disable_vblank (struct drm_device *drm_dev,unsigned int pipe) {struct sti_private *priv = drm_dev->dev_private;struct sti_compositor *compo = priv->compo;@@ -326,14 +326,14 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc)DRM_DEBUG_DRIVER ("\n" ); -if (sti_vtg_unregister_client (crtc ==STI_MIXER_MAIN ? +if (sti_vtg_unregister_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, vtg_vblank_nb))DRM_DEBUG_DRIVER ("Warning: cannot unregister VTG notifier\n" );/* free the resources of the pending requests */ -if (compo->mixer[crtc]->pending_event) { -drm_vblank_put (drm_dev, crtc); - compo->mixer[crtc]->pending_event =NULL ; +if (compo->mixer[pipe]->pending_event) { +drm_vblank_put (drm_dev, pipe); + compo->mixer[pipe]->pending_event =NULL ; } }EXPORT_SYMBOL (sti_crtc_disable_vblank);drivers/gpu/drm/sti/sti_crtc.h +2
-2@@ -13,8 +13,8 @@ struct sti_mixer;int sti_crtc_init (struct drm_device *drm_dev,struct sti_mixer *mixer,struct drm_plane *primary,struct drm_plane *cursor); -int sti_crtc_enable_vblank (struct drm_device *dev,int crtc); -void sti_crtc_disable_vblank (struct drm_device *dev,int crtc); +int sti_crtc_enable_vblank (struct drm_device *dev,unsigned int pipe); +void sti_crtc_disable_vblank (struct drm_device *dev,unsigned int pipe);int sti_crtc_vblank_cb (struct notifier_block *nb,unsigned long event,void *data);bool sti_crtc_is_main (struct drm_crtc *drm_crtc);drivers/gpu/drm/tegra/drm.c +4
-3@@ -822,7 +822,8 @@ static struct drm_crtc *tegra_crtc_from_pipe(struct drm_device *drm,return NULL ; } -static u32 tegra_drm_get_vblank_counter (struct drm_device *drm,int pipe) +static u32 tegra_drm_get_vblank_counter (struct drm_device *drm, +unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);@@ -833,7 +834,7 @@ static u32 tegra_drm_get_vblank_counter(struct drm_device *drm, int pipe)return tegra_dc_get_vblank_counter (dc); } -static int tegra_drm_enable_vblank (struct drm_device *drm,int pipe) +static int tegra_drm_enable_vblank (struct drm_device *drm,unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);@@ -846,7 +847,7 @@ static int tegra_drm_enable_vblank(struct drm_device *drm, int pipe)return 0 ; } -static void tegra_drm_disable_vblank (struct drm_device *drm,int pipe) +static void tegra_drm_disable_vblank (struct drm_device *drm,unsigned int pipe) {struct drm_crtc *crtc =tegra_crtc_from_pipe (drm, pipe);struct tegra_dc *dc =to_tegra_dc (crtc);drivers/gpu/drm/tilcdc/tilcdc_drv.c +2
-2@@ -425,13 +425,13 @@ static void enable_vblank(struct drm_device *dev, bool enable)tilcdc_clear (dev, reg, mask); } -static int tilcdc_enable_vblank (struct drm_device *dev,int crtc) +static int tilcdc_enable_vblank (struct drm_device *dev,unsigned int pipe) {enable_vblank (dev, true);return 0 ; } -static void tilcdc_disable_vblank (struct drm_device *dev,int crtc) +static void tilcdc_disable_vblank (struct drm_device *dev,unsigned int pipe) {enable_vblank (dev, false); }drivers/gpu/drm/via/via_drv.h +3
-3@@ -136,9 +136,9 @@ extern int via_init_context(struct drm_device *dev, int context);extern int via_final_context (struct drm_device *dev,int context);extern int via_do_cleanup_map (struct drm_device *dev); -extern u32 via_get_vblank_counter (struct drm_device *dev,int crtc); -extern int via_enable_vblank (struct drm_device *dev,int crtc); -extern void via_disable_vblank (struct drm_device *dev,int crtc); +extern u32 via_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +extern int via_enable_vblank (struct drm_device *dev,unsigned int pipe); +extern void via_disable_vblank (struct drm_device *dev,unsigned int pipe);extern irqreturn_t via_driver_irq_handler (int irq,void *arg);extern void via_driver_irq_preinstall (struct drm_device *dev);drivers/gpu/drm/via/via_irq.c +9
-8@@ -95,10 +95,11 @@ static unsigned time_diff(struct timeval *now, struct timeval *then)1000000 - (then->tv_usec - now->tv_usec); } -u32 via_get_vblank_counter (struct drm_device *dev,int crtc) +u32 via_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private; -if (crtc !=0 ) + +if (pipe !=0 )return 0 ;return atomic_read (&dev_priv->vbl_received);@@ -170,13 +171,13 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t *dev_priv) } } -int via_enable_vblank (struct drm_device *dev,int crtc) +int via_enable_vblank (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private;u32 status; -if (crtc !=0 ) { -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) { +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe);return -EINVAL ; }@@ -189,7 +190,7 @@ int via_enable_vblank(struct drm_device *dev, int crtc)return 0 ; } -void via_disable_vblank (struct drm_device *dev,int crtc) +void via_disable_vblank (struct drm_device *dev,unsigned int pipe) {drm_via_private_t *dev_priv = dev->dev_private;u32 status;@@ -200,8 +201,8 @@ void via_disable_vblank(struct drm_device *dev, int crtc)VIA_WRITE8 (0x83d4 ,0x11 );VIA_WRITE8 (0x83d5 ,VIA_READ8 (0x83d5 ) & ~0x30 ); -if (crtc !=0 ) -DRM_ERROR ("%s: bad crtc %d\n" , __func__, crtc); +if (pipe !=0 ) +DRM_ERROR ("%s: bad crtc %u\n" , __func__, pipe); } static intdrivers/gpu/drm/vmwgfx/vmwgfx_drv.h +3
-3@@ -913,9 +913,9 @@ void vmw_kms_idle_workqueues(struct vmw_master *vmaster);bool vmw_kms_validate_mode_vram (struct vmw_private *dev_priv,uint32_t pitch,uint32_t height); -u32 vmw_get_vblank_counter (struct drm_device *dev,int crtc); -int vmw_enable_vblank (struct drm_device *dev,int crtc); -void vmw_disable_vblank (struct drm_device *dev,int crtc); +u32 vmw_get_vblank_counter (struct drm_device *dev,unsigned int pipe); +int vmw_enable_vblank (struct drm_device *dev,unsigned int pipe); +void vmw_disable_vblank (struct drm_device *dev,unsigned int pipe); int vmw_kms_present(struct vmw_private *dev_priv, struct drm_file *file_priv, struct vmw_framebuffer *vfb,drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3
-3@@ -1263,7 +1263,7 @@ bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,/** * Function called by DRM code called with vbl_lock held. */ -u32 vmw_get_vblank_counter (struct drm_device *dev,int crtc) +u32 vmw_get_vblank_counter (struct drm_device *dev,unsigned int pipe) {return 0 ; }@@ -1271,7 +1271,7 @@ u32 vmw_get_vblank_counter(struct drm_device *dev, int crtc)/** * Function called by DRM code called with vbl_lock held. */ -int vmw_enable_vblank (struct drm_device *dev,int crtc) +int vmw_enable_vblank (struct drm_device *dev,unsigned int pipe) {return -ENOSYS ; }@@ -1279,7 +1279,7 @@ int vmw_enable_vblank(struct drm_device *dev, int crtc)/** * Function called by DRM code called with vbl_lock held. */ -void vmw_disable_vblank (struct drm_device *dev,int crtc) +void vmw_disable_vblank (struct drm_device *dev,unsigned int pipe) { }include/drm/drmP.h +12
-13@@ -412,7 +412,7 @@ struct drm_driver {/** * get_vblank_counter - get raw hardware vblank counter * @dev: DRM device -* @crtc: counter to fetch +* @pipe: counter to fetch * * Driver callback for fetching a raw hardware vblank counter for @crtc. * If a device doesn't have a hardware counter, the driver can simply @@ -426,12 +426,12 @@ struct drm_driver {* RETURNS * Raw vblank counter value. */ -u32 (*get_vblank_counter) (struct drm_device *dev,int crtc); +u32 (*get_vblank_counter) (struct drm_device *dev,unsigned int pipe);/** * enable_vblank - enable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Enable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since @@ -441,18 +441,18 @@ struct drm_driver {* Zero on success, appropriate errno if the given @crtc's vblank * interrupt cannot be enabled. */ -int (*enable_vblank) (struct drm_device *dev,int crtc); +int (*enable_vblank) (struct drm_device *dev,unsigned int pipe);/** * disable_vblank - disable vblank interrupt events * @dev: DRM device -* @crtc: which irq to enable +* @pipe: which irq to enable * * Disable vblank interrupts for @crtc. If the device doesn't have * a hardware vblank counter, this routine should be a no-op, since * interrupts will have to stay on to keep the count accurate. */ -void (*disable_vblank) (struct drm_device *dev,int crtc); +void (*disable_vblank) (struct drm_device *dev,unsigned int pipe);/** * Called by \c drm_device_is_agp. Typically used to determine if a @@ -474,7 +474,7 @@ struct drm_driver {* optional accurate ktime_get timestamp of when position was measured. * * \param dev DRM device. -* \param crtc Id of the crtc to query. +* \param pipe Id of the crtc to query. * \param flags Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Target location for current vertical scanout position. * \param *hpos Target location for current horizontal scanout position. @@ -498,9 +498,8 @@ struct drm_driver {* but unknown small number of scanlines wrt. real scanout position. * */ -int (*get_scanout_position) (struct drm_device *dev,int crtc, -unsigned int flags, -int *vpos,int *hpos, +int (*get_scanout_position) (struct drm_device *dev,unsigned int pipe, +unsigned int flags,int *vpos,int *hpos,ktime_t *stime,ktime_t *etime,const struct drm_display_mode *mode);@@ -518,7 +517,7 @@ struct drm_driver {* to the OpenML OML_sync_control extension specification. * * \param dev dev DRM device handle. -* \param crtc crtc for which timestamp should be returned. +* \param pipe crtc for which timestamp should be returned. * \param *max_error Maximum allowable timestamp error in nanoseconds. * Implementation should strive to provide timestamp * with an error of at most *max_error nanoseconds. @@ -534,7 +533,7 @@ struct drm_driver {* negative number on failure. A positive status code on success, * which describes how the vblank_time timestamp was computed. */ -int (*get_vblank_timestamp) (struct drm_device *dev,int crtc, +int (*get_vblank_timestamp) (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *vblank_time,unsigned flags);@@ -927,7 +926,7 @@ extern int drm_irq_uninstall(struct drm_device *dev);extern int drm_vblank_init (struct drm_device *dev,unsigned int num_crtcs);extern int drm_wait_vblank (struct drm_device *dev,void *data,struct drm_file *filp); -extern u32 drm_vblank_count (struct drm_device *dev,int pipe); +extern u32 drm_vblank_count (struct drm_device *dev,unsigned int pipe);extern u32 drm_crtc_vblank_count (struct drm_crtc *crtc);extern u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime);Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 10/16 drm/gma500: Use unsigned int pipe consistently
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
The pipe number can never be negative, so turn variables referring to it to unsigned int.
--- drivers/gpu/drm/gma500/psb_drv.h | 8 ++++---- drivers/gpu/drm/gma500/psb_irq.c | 30 ++++++++++++++++-------------- drivers/gpu/drm/gma500/psb_irq.h | 4 ++-- 3 files changed, 22 insertions(+), 20 deletions(-)
drivers/gpu/drm/gma500/psb_drv.h +4 -4
@@ -689,11 +689,11 @@ extern int psb_vblank_wait2(struct drm_device *dev, unsigned int *sequence);extern int psb_vblank_wait (struct drm_device *dev,unsigned int *sequence);extern int psb_enable_vblank (struct drm_device *dev,unsigned int pipe);extern void psb_disable_vblank (struct drm_device *dev,unsigned int pipe); -void -psb_enable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask); +void psb_enable_pipestat (struct drm_psb_private *dev_priv,unsigned int pipe, +u32 mask); -void -psb_disable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask); +void psb_disable_pipestat (struct drm_psb_private *dev_priv,unsigned int pipe, +u32 mask);extern u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe);
drivers/gpu/drm/gma500/psb_irq.c +16 -14
@@ -35,7 +35,7 @@*/ static inline u32 -psb_pipestat (int pipe) +psb_pipestat (unsigned int pipe) {if (pipe ==0 )return PIPEASTAT ;
@@ -47,7 +47,7 @@ psb_pipestat(int pipe) }static inline u32 -mid_pipe_event (int pipe) +mid_pipe_event (unsigned int pipe) {if (pipe ==0 )return _PSB_PIPEA_EVENT_FLAG;
@@ -59,7 +59,7 @@ mid_pipe_event(int pipe) }static inline u32 -mid_pipe_vsync (int pipe) +mid_pipe_vsync (unsigned int pipe) {if (pipe ==0 )return _PSB_VSYNC_PIPEA_FLAG;
@@ -71,7 +71,7 @@ mid_pipe_vsync(int pipe) }static inline u32 -mid_pipeconf (int pipe) +mid_pipeconf (unsigned int pipe) {if (pipe ==0 )return PIPEACONF ;
@@ -82,8 +82,8 @@ mid_pipeconf(int pipe)BUG (); } -void -psb_enable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask) +void psb_enable_pipestat (struct drm_psb_private *dev_priv,unsigned int pipe, +u32 mask) {if ((dev_priv->pipestat[pipe] & mask) != mask) {u32 reg =psb_pipestat (pipe);
@@ -99,8 +99,8 @@ psb_enable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask) } } -void -psb_disable_pipestat (struct drm_psb_private *dev_priv,int pipe,u32 mask) +void psb_disable_pipestat (struct drm_psb_private *dev_priv,unsigned int pipe, +u32 mask) {if ((dev_priv->pipestat[pipe] & mask) !=0 ) {u32 reg =psb_pipestat (pipe);
@@ -115,7 +115,8 @@ psb_disable_pipestat(struct drm_psb_private *dev_priv, int pipe, u32 mask) } } -static void mid_enable_pipe_event (struct drm_psb_private *dev_priv,int pipe) +static void mid_enable_pipe_event (struct drm_psb_private *dev_priv, +unsigned int pipe) {if (gma_power_begin (dev_priv->dev, false)) {u32 pipe_event =mid_pipe_event (pipe);
@@ -126,7 +127,8 @@ static void mid_enable_pipe_event(struct drm_psb_private *dev_priv, int pipe) } } -static void mid_disable_pipe_event (struct drm_psb_private *dev_priv,int pipe) +static void mid_disable_pipe_event (struct drm_psb_private *dev_priv, +unsigned int pipe) {if (dev_priv->pipestat[pipe] ==0 ) {if (gma_power_begin (dev_priv->dev, false)) {
@@ -143,7 +145,7 @@ static void mid_disable_pipe_event(struct drm_psb_private *dev_priv, int pipe)* Display controller interrupt handler for pipe event. * */ -static void mid_pipe_event_handler (struct drm_device *dev,int pipe) +static void mid_pipe_event_handler (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = (struct drm_psb_private *) dev->dev_private;
@@ -175,7 +177,7 @@ static void mid_pipe_event_handler(struct drm_device *dev, int pipe)if (pipe_clear)dev_err (dev->dev, -"%s, can't clear status bits for pipe %d, its value = 0x%x.\n" , +"%s, can't clear status bits for pipe %u, its value = 0x%x.\n" , __func__, pipe,PSB_RVDC32 (pipe_stat_reg));if (pipe_stat_val &PIPE_VBLANK_STATUS )
@@ -573,7 +575,7 @@ void psb_disable_vblank(struct drm_device *dev, unsigned int pipe)/* * It is used to enable TE interrupt */ -int mdfld_enable_te (struct drm_device *dev,int pipe) +int mdfld_enable_te (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = (struct drm_psb_private *) dev->dev_private;
@@ -602,7 +604,7 @@ int mdfld_enable_te(struct drm_device *dev, int pipe)/* * It is used to disable TE interrupt */ -void mdfld_disable_te (struct drm_device *dev,int pipe) +void mdfld_disable_te (struct drm_device *dev,unsigned int pipe) {struct drm_psb_private *dev_priv = (struct drm_psb_private *) dev->dev_private;
drivers/gpu/drm/gma500/psb_irq.h +2 -2
@@ -42,6 +42,6 @@ int psb_enable_vblank(struct drm_device *dev, unsigned int pipe);void psb_disable_vblank (struct drm_device *dev,unsigned int pipe);u32 psb_get_vblank_counter (struct drm_device *dev,unsigned int pipe); -int mdfld_enable_te (struct drm_device *dev,int pipe); -void mdfld_disable_te (struct drm_device *dev,int pipe); +int mdfld_enable_te (struct drm_device *dev,unsigned int pipe); +void mdfld_disable_te (struct drm_device *dev,unsigned int pipe);#endif /* _PSB_IRQ_H_ */
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 11/16 drm/imx: Use unsigned int for CRTC index
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
The CRTC index can never be negative, so use an unsigned rather than a signed integer for the loop variable.
--- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
@@ -179,7 +179,7 @@ static void imx_drm_disable_vblank(struct drm_device *drm, unsigned int pipe)static void imx_drm_driver_preclose (struct drm_device *drm,struct drm_file *file) { -int i; +unsigned int i;if (!file->is_master)return ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 12/16 drm/msm: Use unsigned int pipe consistently
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Use unsigned int pipe consistently to denote the CRTC index.
--- drivers/gpu/drm/msm/msm_drv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/msm/msm_drv.c +5 -5
@@ -118,7 +118,7 @@ u32 msm_readl(const void __iomem *addr)struct vblank_event {struct list_head node; -int crtc_id; +unsigned int pipe;bool enable; };
@@ -139,10 +139,10 @@ static void vblank_ctrl_worker(struct work_struct *work)if (vbl_ev->enable) kms->funcs->enable_vblank (kms, - priv->crtcs[vbl_ev->crtc_id]); + priv->crtcs[vbl_ev->pipe]);else kms->funcs->disable_vblank (kms, - priv->crtcs[vbl_ev->crtc_id]); + priv->crtcs[vbl_ev->pipe]);kfree (vbl_ev);
@@ -153,7 +153,7 @@ static void vblank_ctrl_worker(struct work_struct *work) }static int vblank_ctrl_queue_work (struct msm_drm_private *priv, -int crtc_id,bool enable) +unsigned int pipe,bool enable) {struct msm_vblank_ctrl *vbl_ctrl = &priv->vblank_ctrl;struct vblank_event *vbl_ev;
@@ -163,7 +163,7 @@ static int vblank_ctrl_queue_work(struct msm_drm_private *priv,if (!vbl_ev)return -ENOMEM ; - vbl_ev->crtc_id = crtc_id; + vbl_ev->pipe = pipe; vbl_ev->enable = enable;spin_lock_irqsave (&vbl_ctrl->lock, flags);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 13/16 drm: Move ->get_scanout_position() to struct drm_crtc_funcs
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
None of the drivers use this in legacy mode, so it can be converted to use struct drm_crtc * directly. While at it, also make the sole user of the callback, drm_calc_vbltimestamp_from_scanoutpos(), pass through the CRTC directly.
v2: use standard [CRTC:%u] format
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 13 ++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 6 ++-- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/drm_irq.c | 40 ++++++++++--------------- drivers/gpu/drm/i915/i915_irq.c | 14 ++++----- drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 4 +++ drivers/gpu/drm/nouveau/dispnv04/crtc.c | 1 + drivers/gpu/drm/nouveau/nouveau_display.c | 28 ++++-------------- drivers/gpu/drm/nouveau/nouveau_display.h | 12 ++++---- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 - drivers/gpu/drm/nouveau/nv50_display.c | 1 + drivers/gpu/drm/radeon/radeon_display.c | 37 ++++++++++++----------- drivers/gpu/drm/radeon/radeon_drv.c | 1 - drivers/gpu/drm/radeon/radeon_kms.c | 2 +- drivers/gpu/drm/radeon/radeon_mode.h | 6 ++-- drivers/gpu/drm/radeon/radeon_pm.c | 6 ++-- include/drm/drmP.h | 46 ----------------------------- include/drm/drm_crtc.h | 46 +++++++++++++++++++++++++++++ 23 files changed, 127 insertions(+), 144 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +6 -7
@@ -720,8 +720,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* Retrieve current video scanout position of crtc on a given gpu, and * an optional accurate timestamp of when query happened. * -* \param dev Device to query. -* \param pipe Crtc to query. +* \param crtc CRTC to query. * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Location where vertical scanout position should be stored. * \param *hpos Location where horizontal scanout position should go.
@@ -744,17 +743,17 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, +int amdgpu_get_crtc_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime,const struct drm_display_mode *mode) { +struct amdgpu_device *adev = crtc->dev->dev_private; +unsigned int pipe =drm_crtc_index (crtc);u32 vbl =0 , position =0 ;int vbl_start, vbl_end, vtotal, ret =0 ;bool in_vbl = true; -struct amdgpu_device *adev = dev->dev_private; -/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */ /* Get optional system timestamp before query. */
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
@@ -480,7 +480,6 @@ static struct drm_driver kms_driver = { .enable_vblank = amdgpu_enable_vblank_kms, .disable_vblank = amdgpu_disable_vblank_kms, .get_vblank_timestamp = amdgpu_get_vblank_timestamp_kms, - .get_scanout_position = amdgpu_get_crtc_scanoutpos,#if defined(CONFIG_DEBUG_FS ) .debugfs_init = amdgpu_debugfs_init, .debugfs_cleanup = amdgpu_debugfs_cleanup,
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
@@ -679,7 +679,7 @@ int amdgpu_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int pipe, crtc = &adev->mode_info.crtcs[pipe]->base;/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, pipe, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (crtc, max_error, vblank_time, flags, &crtc->hwmode); }
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +3 -3
@@ -540,9 +540,9 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, bool use_aux);void amdgpu_encoder_set_active_device (struct drm_encoder *encoder); -int amdgpu_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, +int amdgpu_get_crtc_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime,const struct drm_display_mode *mode); int amdgpu_framebuffer_init(struct drm_device *dev,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -0
@@ -2647,6 +2647,7 @@ static const struct drm_crtc_funcs dce_v10_0_crtc_funcs = { .set_config = amdgpu_crtc_set_config, .destroy = dce_v10_0_crtc_destroy, .page_flip = amdgpu_crtc_page_flip, + .get_scanout_position = amdgpu_get_crtc_scanoutpos, };static void dce_v10_0_crtc_dpms (struct drm_crtc *crtc,int mode)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -0
@@ -2624,6 +2624,7 @@ static const struct drm_crtc_funcs dce_v11_0_crtc_funcs = { .set_config = amdgpu_crtc_set_config, .destroy = dce_v11_0_crtc_destroy, .page_flip = amdgpu_crtc_page_flip, + .get_scanout_position = amdgpu_get_crtc_scanoutpos, };static void dce_v11_0_crtc_dpms (struct drm_crtc *crtc,int mode)
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -0
@@ -2559,6 +2559,7 @@ static const struct drm_crtc_funcs dce_v8_0_crtc_funcs = { .set_config = amdgpu_crtc_set_config, .destroy = dce_v8_0_crtc_destroy, .page_flip = amdgpu_crtc_page_flip, + .get_scanout_position = amdgpu_get_crtc_scanoutpos, };static void dce_v8_0_crtc_dpms (struct drm_crtc *crtc,int mode)
drivers/gpu/drm/drm_irq.c +16 -24
@@ -653,8 +653,7 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);/** * drm_calc_vbltimestamp_from_scanoutpos - precise vblank timestamp helper -* @dev: DRM device -* @pipe: index of CRTC whose vblank timestamp to retrieve +* @crtc: CRTC whose vblank timestamp to retrieve * @max_error: Desired maximum allowable error in timestamps (nanosecs) * On return contains true maximum error of timestamp * @vblank_time: Pointer to struct timeval which should receive the timestamp
@@ -696,13 +695,13 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);* DRM_VBLANKTIME_INVBL - Timestamp taken while scanout was in vblank interval. * */ -int drm_calc_vbltimestamp_from_scanoutpos (struct drm_device *dev, -unsigned int pipe, +int drm_calc_vbltimestamp_from_scanoutpos (struct drm_crtc *crtc,int *max_error,struct timeval *vblank_time,unsigned flags,const struct drm_display_mode *mode) { +const struct drm_crtc_funcs *funcs = crtc->funcs;struct timeval tv_etime;ktime_t stime, etime;unsigned int vbl_status;
@@ -710,22 +709,16 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,int vpos, hpos, i;int delta_ns, duration_ns; -if (pipe >= dev->num_crtcs) { -DRM_ERROR ("Invalid crtc %u\n" , pipe); -return -EINVAL ; - } -/* Scanout position query not supported? Should not happen. */ -if (!dev->driver->get_scanout_position) { -DRM_ERROR ("Called from driver w/o get_scanout_position()!?\n" ); -return -EIO ; - } +if (WARN_ON (funcs->get_scanout_position ==NULL )) +return -ENOSYS ;/* If mode timing undefined, just return as no-op: * Happens during initial modesetting of a crtc. */ if (mode->crtc_clock ==0 ) { -DRM_DEBUG ("crtc %u: Noop due to uninitialized mode.\n" , pipe); +DRM_DEBUG ("[CRTC:%u] Noop due to uninitialized mode.\n" , + crtc->base.id);return -EAGAIN ; }
@@ -741,15 +734,14 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,* Get vertical and horizontal scanout position vpos, hpos, * and bounding timestamps stime, etime, pre/post query. */ - vbl_status = dev->driver->get_scanout_position (dev, pipe, flags, - &vpos, &hpos, - &stime, &etime, - mode); + vbl_status = funcs->get_scanout_position (crtc, flags, &vpos, + &hpos, &stime, &etime, + mode);/* Return as no-op if scanout query unsupported or failed. */ if (!(vbl_status &DRM_SCANOUTPOS_VALID )) { -DRM_DEBUG ("crtc %u : scanoutpos query failed [0x%x].\n" , - pipe, vbl_status); +DRM_DEBUG ("[CRTC:%u] scanoutpos query failed [%d].\n" , + crtc->base.id, vbl_status);return -EIO ; }
@@ -763,8 +755,8 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,/* Noisy system timing? */ if (i ==DRM_TIMESTAMP_MAXRETRIES ) { -DRM_DEBUG ("crtc %u: Noisy timestamp %d us > %d us [%d reps].\n" , - pipe, duration_ns/1000 , *max_error/1000 , i); +DRM_DEBUG ("[CRTC:%u] Noisy timestamp %d us > %d us [%d reps].\n" , + crtc->base.id, duration_ns/1000 , *max_error/1000 , i); }/* Return upper bound of timestamp precision error. */
@@ -799,8 +791,8 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, etime =ktime_sub_ns (etime, delta_ns); *vblank_time =ktime_to_timeval (etime); -DRM_DEBUG ("crtc %u : v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n" , - pipe, vbl_status, hpos, vpos, +DRM_DEBUG ("[CRTC:%u] v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n" , + crtc->base.id, vbl_status, hpos, vpos, (long )tv_etime.tv_sec, (long )tv_etime.tv_usec, (long )vblank_time->tv_sec, (long )vblank_time->tv_usec, duration_ns/1000 , i);
drivers/gpu/drm/i915/i915_irq.c +7 -7
@@ -767,14 +767,15 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc)return (position + crtc->scanline_offset) % vtotal; } -static int i915_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, -const struct drm_display_mode *mode) +int i915_get_crtc_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime, +const struct drm_display_mode *mode) { +struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private; -struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +enum pipe pipe = intel_crtc->pipe;int position;int vbl_start, vbl_end, hsync_start, htotal, vtotal;bool in_vbl = true;
@@ -929,7 +930,7 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe, }/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, pipe, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (crtc, max_error, vblank_time, flags, &crtc->hwmode); }
@@ -4387,7 +4388,6 @@ void intel_irq_init(struct drm_i915_private *dev_priv) dev->vblank_disable_immediate = true; dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; - dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;if (IS_CHERRYVIEW (dev_priv)) { dev->driver->irq_handler = cherryview_irq_handler;
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -13203,6 +13203,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = { .page_flip = intel_crtc_page_flip, .atomic_duplicate_state = intel_crtc_duplicate_state, .atomic_destroy_state = intel_crtc_destroy_state, + .get_scanout_position = i915_get_crtc_scanoutpos, }; static bool ibx_pch_dpll_get_hw_state(struct drm_i915_private *dev_priv,
drivers/gpu/drm/i915/intel_drv.h +4 -0
@@ -955,6 +955,10 @@ static inline bool intel_irqs_enabled(struct drm_i915_private *dev_priv)return dev_priv->pm.irqs_enabled; } +int i915_get_crtc_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime, +const struct drm_display_mode *mode);int intel_get_crtc_scanline (struct intel_crtc *crtc);void gen8_irq_power_well_post_enable (struct drm_i915_private *dev_priv,unsigned int pipe_mask);
drivers/gpu/drm/nouveau/dispnv04/crtc.c +1 -0
@@ -1089,6 +1089,7 @@ static const struct drm_crtc_funcs nv04_crtc_funcs = { .set_config = nouveau_crtc_set_config, .page_flip = nouveau_crtc_page_flip, .destroy = nv_crtc_destroy, + .get_scanout_position = nouveau_display_scanoutpos, };static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
drivers/gpu/drm/nouveau/nouveau_display.c +5 -23
@@ -92,8 +92,9 @@ calc(int blanks, int blanke, int total, int line) }int -nouveau_display_scanoutpos_head (struct drm_crtc *crtc,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime) +nouveau_display_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime,const struct drm_display_mode *mode) {struct {struct nv04_disp_mthd_v0 base;
@@ -132,24 +133,6 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, }int -nouveau_display_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, -const struct drm_display_mode *mode) -{ -struct drm_crtc *crtc; - -list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) { -if (nouveau_crtc (crtc)->index == pipe) { -return nouveau_display_scanoutpos_head (crtc, vpos, hpos, - stime, etime); - } - } - -return 0 ; -} - -int nouveau_display_vblstamp (struct drm_device *dev,unsigned int pipe,int *max_error,struct timeval *time,unsigned flags) {
@@ -157,9 +140,8 @@ nouveau_display_vblstamp(struct drm_device *dev, unsigned int pipe,list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {if (nouveau_crtc (crtc)->index == pipe) { -return drm_calc_vbltimestamp_from_scanoutpos (dev, - pipe, max_error, time, flags, - &crtc->hwmode); +return drm_calc_vbltimestamp_from_scanoutpos (crtc, + max_error, time, flags, &crtc->hwmode); } }
drivers/gpu/drm/nouveau/nouveau_display.h +6 -6
@@ -65,12 +65,12 @@ int nouveau_display_init(struct drm_device *dev);void nouveau_display_fini (struct drm_device *dev);int nouveau_display_suspend (struct drm_device *dev,bool runtime);void nouveau_display_resume (struct drm_device *dev,bool runtime); -int nouveau_display_vblank_enable (struct drm_device *,unsigned int ); -void nouveau_display_vblank_disable (struct drm_device *,unsigned int ); -int nouveau_display_scanoutpos (struct drm_device *,unsigned int , -unsigned int ,int *,int *,ktime_t *, -ktime_t *,const struct drm_display_mode *); -int nouveau_display_vblstamp (struct drm_device *,unsigned int ,int *, +int nouveau_display_vblank_enable (struct drm_device *,unsigned int pipe); +void nouveau_display_vblank_disable (struct drm_device *,unsigned int pipe); +int nouveau_display_scanoutpos (struct drm_crtc *,unsigned int ,int *,int *, +ktime_t *,ktime_t *, +const struct drm_display_mode *); +int nouveau_display_vblstamp (struct drm_device *,unsigned int pipe,int *,struct timeval *,unsigned ); int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
drivers/gpu/drm/nouveau/nouveau_drm.c +0 -1
@@ -937,7 +937,6 @@ driver_stub = { .get_vblank_counter = drm_vblank_count, .enable_vblank = nouveau_display_vblank_enable, .disable_vblank = nouveau_display_vblank_disable, - .get_scanout_position = nouveau_display_scanoutpos, .get_vblank_timestamp = nouveau_display_vblstamp, .ioctls = nouveau_ioctls,
drivers/gpu/drm/nouveau/nv50_display.c +1 -0
@@ -1423,6 +1423,7 @@ static const struct drm_crtc_funcs nv50_crtc_func = { .set_config = nouveau_crtc_set_config, .destroy = nv50_crtc_destroy, .page_flip = nouveau_crtc_page_flip, + .get_scanout_position = nouveau_display_scanoutpos, }; static int
drivers/gpu/drm/radeon/radeon_display.c +19 -18
@@ -322,10 +322,10 @@ void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id)* to complete in this vblank? */ if (update_pending && - (DRM_SCANOUTPOS_VALID &radeon_get_crtc_scanoutpos (rdev->ddev, crtc_id,0 , + (DRM_SCANOUTPOS_VALID &radeon_crtc_get_scanoutpos (&radeon_crtc->base,0 , &vpos, &hpos,NULL ,NULL , - &rdev->mode_info.crtcs[crtc_id]->base.hwmode)) && - ((vpos >= (99 * rdev->mode_info.crtcs[crtc_id]->base.hwmode.crtc_vdisplay)/100 ) || + &radeon_crtc->base.hwmode)) && + ((vpos >= (99 * radeon_crtc->base.hwmode.crtc_vdisplay)/100 ) || (vpos <0 && !ASIC_IS_AVIVO (rdev)))) {/* crtc didn't flip in this target vblank interval, * but flip is pending in crtc. Based on the current
@@ -642,6 +642,7 @@ static const struct drm_crtc_funcs radeon_crtc_funcs = { .set_config = radeon_crtc_set_config, .destroy = radeon_crtc_destroy, .page_flip = radeon_crtc_page_flip, + .get_scanout_position = radeon_crtc_get_scanoutpos, };static void radeon_crtc_init (struct drm_device *dev,int index)
@@ -1775,7 +1776,6 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* Retrieve current video scanout position of crtc on a given gpu, and * an optional accurate timestamp of when query happened. * -* \param dev Device to query. * \param crtc Crtc to query. * \param flags Flags from caller (DRM_CALLED_FROM_VBLIRQ or 0). * \param *vpos Location where vertical scanout position should be stored.
@@ -1799,16 +1799,17 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,* unknown small number of scanlines wrt. real scanout position. * */ -int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, +int radeon_crtc_get_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime,const struct drm_display_mode *mode) { +struct radeon_crtc *radeon_crtc =to_radeon_crtc (crtc);u32 stat_crtc =0 , vbl =0 , position =0 ;int vbl_start, vbl_end, vtotal, ret =0 ;bool in_vbl = true; -struct radeon_device *rdev = dev->dev_private; +struct radeon_device *rdev = crtc->dev->dev_private;/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */
@@ -1817,42 +1818,42 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, *stime =ktime_get ();if (ASIC_IS_DCE4 (rdev)) { -if (pipe ==0 ) { +if (radeon_crtc->crtc_id ==0 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC0_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC0_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==1 ) { +if (radeon_crtc->crtc_id ==1 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC1_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC1_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==2 ) { +if (radeon_crtc->crtc_id ==2 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC2_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC2_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==3 ) { +if (radeon_crtc->crtc_id ==3 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC3_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC3_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==4 ) { +if (radeon_crtc->crtc_id ==4 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC4_REGISTER_OFFSET ); position =RREG32 (EVERGREEN_CRTC_STATUS_POSITION +EVERGREEN_CRTC4_REGISTER_OFFSET ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==5 ) { +if (radeon_crtc->crtc_id ==5 ) { vbl =RREG32 (EVERGREEN_CRTC_V_BLANK_START_END +EVERGREEN_CRTC5_REGISTER_OFFSET ); position = RREG32(EVERGREEN_CRTC_STATUS_POSITION +
@@ -1860,19 +1861,19 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, ret |=DRM_SCANOUTPOS_VALID ; } }else if (ASIC_IS_AVIVO (rdev)) { -if (pipe ==0 ) { +if (radeon_crtc->crtc_id ==0 ) { vbl =RREG32 (AVIVO_D1CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D1CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==1 ) { +if (radeon_crtc->crtc_id ==1 ) { vbl =RREG32 (AVIVO_D2CRTC_V_BLANK_START_END ); position =RREG32 (AVIVO_D2CRTC_STATUS_POSITION ); ret |=DRM_SCANOUTPOS_VALID ; } }else {/* Pre-AVIVO: Different encoding of scanout pos and vblank interval. */ -if (pipe ==0 ) { +if (radeon_crtc->crtc_id ==0 ) {/* Assume vbl_end == 0, get vbl_start from * upper 16 bits. */
@@ -1886,7 +1887,7 @@ int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, ret |=DRM_SCANOUTPOS_VALID ; } -if (pipe ==1 ) { +if (radeon_crtc->crtc_id ==1 ) { vbl = (RREG32 (RADEON_CRTC2_V_TOTAL_DISP ) &RADEON_CRTC_V_DISP ) >>RADEON_CRTC_V_DISP_SHIFT ; position = (RREG32 (RADEON_CRTC2_VLINE_CRNT_VLINE ) >>16 ) &RADEON_CRTC_V_TOTAL ;
drivers/gpu/drm/radeon/radeon_drv.c +0 -1
@@ -578,7 +578,6 @@ static struct drm_driver kms_driver = { .enable_vblank = radeon_enable_vblank_kms, .disable_vblank = radeon_disable_vblank_kms, .get_vblank_timestamp = radeon_get_vblank_timestamp_kms, - .get_scanout_position = radeon_get_crtc_scanoutpos,#if defined(CONFIG_DEBUG_FS ) .debugfs_init = radeon_debugfs_init, .debugfs_cleanup = radeon_debugfs_cleanup,
drivers/gpu/drm/radeon/radeon_kms.c +1 -1
@@ -839,7 +839,7 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,return -EINVAL ;/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, crtc, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (drmcrtc, max_error, vblank_time, flags, &drmcrtc->hwmode); }
drivers/gpu/drm/radeon/radeon_mode.h +3 -3
@@ -874,9 +874,9 @@ extern int radeon_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);extern void radeon_cursor_reset (struct drm_crtc *crtc); -extern int radeon_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, +extern int radeon_crtc_get_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime,const struct drm_display_mode *mode);extern bool radeon_combios_check_hardcoded_edid (struct radeon_device *rdev);
drivers/gpu/drm/radeon/radeon_pm.c +4 -2
@@ -1732,10 +1732,12 @@ static bool radeon_pm_in_vbl(struct radeon_device *rdev)* otherwise return in_vbl == false. */ for (crtc =0 ; (crtc < rdev->num_crtc) && in_vbl; crtc++) { +struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; +if (rdev->pm.active_crtcs & (1 << crtc)) { - vbl_status =radeon_get_crtc_scanoutpos (rdev->ddev, crtc,0 , + vbl_status =radeon_crtc_get_scanoutpos (&radeon_crtc->base,0 , &vpos, &hpos,NULL ,NULL , - &rdev->mode_info.crtcs[crtc]->base.hwmode); + &radeon_crtc->base.hwmode);if ((vbl_status &DRM_SCANOUTPOS_VALID ) && !(vbl_status &DRM_SCANOUTPOS_IN_VBLANK )) in_vbl = false;
include/drm/drmP.h +0 -46
64 lines not on this page · raw message
include/drm/drm_crtc.h +46 -0
70 lines not on this page · raw message
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 13/16] drm: Move ->get_scanout_position() to struct drm_crtc_funcs
Quoted 8 lines · Thierry Reding
From: Thierry Reding <[email protected]>
None of the drivers use this in legacy mode, so it can be converted to use struct
drm_crtc* directly. While at it, also make the sole user of the callback,drm_calc_vbltimestamp_from_scanoutpos(), pass through the CRTC directly.v2: use standard [CRTC:%u] format
I very much like this as a first small step towards untangling drm_irq.c. Two comments below.
Quoted 24 lines
Cc Daniel Vetter <[email protected]>Cc Jani Nikula <[email protected]>Cc Ben Skeggs <[email protected]>Cc Alex Deucher <[email protected]>Cc Christian König <[email protected]>Signed-off-by Thierry Reding <[email protected]>drivers/gpu/drm/drm_irq.c +1
-2@@ -653,8 +653,7 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);/** * drm_calc_vbltimestamp_from_scanoutpos - precise vblank timestamp helper -* @dev: DRM device -* @pipe: index of CRTC whose vblank timestamp to retrieve +* @crtc: CRTC whose vblank timestamp to retrieve * @max_error: Desired maximum allowable error in timestamps (nanosecs) * On return contains true maximum error of timestamp * @vblank_time: Pointer to struct timeval which should receive the timestamp
drivers/gpu/drm/drm_irq.c EXPORT_SYMBOL(drm_calc_timestamping_constants); · line 702
Quoted 10 lines
drivers/gpu/drm/drm_irq.c +1
-2@@ -696,13 +695,13 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);* DRM_VBLANKTIME_INVBL - Timestamp taken while scanout was in vblank interval. * */ -int drm_calc_vbltimestamp_from_scanoutpos (struct drm_device *dev, -unsigned int pipe, +int drm_calc_vbltimestamp_from_scanoutpos (struct drm_crtc *crtc,int *max_error,struct timeval *vblank_time,unsigned flags,const struct drm_display_mode *mode)
This function is actually more a helper, since if you use some hardware vblank timestamp register you don't really need it at all. Hence I think we should fix this properly and instead move this function into a new drm_irq_helper.c (part of drm_kms_helper.ko) - there will be more once drm_irq.c is untangled. And also push the callback into the corresponding helper funcs sturctures.
Quoted 143 lines
drivers/gpu/drm/drm_irq.c +14
-20{ +const struct drm_crtc_funcs *funcs = crtc->funcs;struct timeval tv_etime;ktime_t stime, etime;unsigned int vbl_status;@@ -710,22 +709,16 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,int vpos, hpos, i;int delta_ns, duration_ns; -if (pipe >= dev->num_crtcs) { -DRM_ERROR ("Invalid crtc %u\n" , pipe); -return -EINVAL ; - } -/* Scanout position query not supported? Should not happen. */ -if (!dev->driver->get_scanout_position) { -DRM_ERROR ("Called from driver w/o get_scanout_position()!?\n" ); -return -EIO ; - } +if (WARN_ON (funcs->get_scanout_position ==NULL )) +return -ENOSYS ;/* If mode timing undefined, just return as no-op: * Happens during initial modesetting of a crtc. */ if (mode->crtc_clock ==0 ) { -DRM_DEBUG ("crtc %u: Noop due to uninitialized mode.\n" , pipe); +DRM_DEBUG ("[CRTC:%u] Noop due to uninitialized mode.\n" , + crtc->base.id);return -EAGAIN ; }@@ -741,15 +734,14 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,* Get vertical and horizontal scanout position vpos, hpos, * and bounding timestamps stime, etime, pre/post query. */ - vbl_status = dev->driver->get_scanout_position (dev, pipe, flags, - &vpos, &hpos, - &stime, &etime, - mode); + vbl_status = funcs->get_scanout_position (crtc, flags, &vpos, + &hpos, &stime, &etime, + mode);/* Return as no-op if scanout query unsupported or failed. */ if (!(vbl_status &DRM_SCANOUTPOS_VALID )) { -DRM_DEBUG ("crtc %u : scanoutpos query failed [0x%x].\n" , - pipe, vbl_status); +DRM_DEBUG ("[CRTC:%u] scanoutpos query failed [%d].\n" , + crtc->base.id, vbl_status);return -EIO ; }@@ -763,8 +755,8 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,/* Noisy system timing? */ if (i ==DRM_TIMESTAMP_MAXRETRIES ) { -DRM_DEBUG ("crtc %u: Noisy timestamp %d us > %d us [%d reps].\n" , - pipe, duration_ns/1000 , *max_error/1000 , i); +DRM_DEBUG ("[CRTC:%u] Noisy timestamp %d us > %d us [%d reps].\n" , + crtc->base.id, duration_ns/1000 , *max_error/1000 , i); }/* Return upper bound of timestamp precision error. */ @@ -799,8 +791,8 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, etime =ktime_sub_ns (etime, delta_ns); *vblank_time =ktime_to_timeval (etime); -DRM_DEBUG ("crtc %u : v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n" , - pipe, vbl_status, hpos, vpos, +DRM_DEBUG ("[CRTC:%u] v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n" , + crtc->base.id, vbl_status, hpos, vpos, (long )tv_etime.tv_sec, (long )tv_etime.tv_usec, (long )vblank_time->tv_sec, (long )vblank_time->tv_usec, duration_ns/1000 , i);drivers/gpu/drm/i915/i915_irq.c +7
-7@@ -767,14 +767,15 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc)return (position + crtc->scanline_offset) % vtotal; } -static int i915_get_crtc_scanoutpos (struct drm_device *dev,unsigned int pipe, -unsigned int flags,int *vpos,int *hpos, -ktime_t *stime,ktime_t *etime, -const struct drm_display_mode *mode) +int i915_get_crtc_scanoutpos (struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime, +const struct drm_display_mode *mode) { +struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private; -struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +enum pipe pipe = intel_crtc->pipe;int position;int vbl_start, vbl_end, hsync_start, htotal, vtotal;bool in_vbl = true;@@ -929,7 +930,7 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe, }/* Helper routine in DRM core does all the work: */ -return drm_calc_vbltimestamp_from_scanoutpos (dev, pipe, max_error, +return drm_calc_vbltimestamp_from_scanoutpos (crtc, max_error, vblank_time, flags, &crtc->hwmode); }@@ -4387,7 +4388,6 @@ void intel_irq_init(struct drm_i915_private *dev_priv) dev->vblank_disable_immediate = true; dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; - dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;if (IS_CHERRYVIEW (dev_priv)) { dev->driver->irq_handler = cherryview_irq_handler;include/drm/drm_crtc.h +6
-0@@ -307,6 +307,11 @@ struct drm_crtc_state {struct drm_atomic_state *state; }; +/* get_scanout_position() return flags */ +#define DRM_SCANOUTPOS_VALID (1 << 0) +#define DRM_SCANOUTPOS_IN_VBLANK (1 << 1) +#define DRM_SCANOUTPOS_ACCURATE (1 << 2) +/** * struct drm_crtc_funcs - control CRTCs for a given device * @save: save CRTC state @@ -326,6 +331,7 @@ struct drm_crtc_state {* (do not call directly, use drm_atomic_crtc_set_property()) * @atomic_get_property: get a property on an atomic state for this CRTC * (do not call directly, use drm_atomic_crtc_get_property()) +* @get_scanout_position: return the current scanout position * * The drm_crtc_funcs structure is the central CRTC management structure * in the DRM. Each CRTC controls one or more connectors (note that the name
include/drm/drm_crtc.h struct drm_crtc_funcs { · line 399
Quoted 5 lines
include/drm/drm_crtc.h +2
-0@@ -389,6 +395,40 @@ struct drm_crtc_funcs {const struct drm_crtc_state *state, struct drm_property *property, uint64_t *val); + +/**
Please use the new inline structure documentation layout for this (merged into 4.3): Just drop the @get_scanout_position: from the top-level comment and add that here.
-Daniel
Quoted 55 lines
include/drm/drm_crtc.h +38
-0+* Called by vblank timestamping code. +* +* Return the current display scanout position from a crtc, and an +* optional accurate ktime_get timestamp of when position was measured. +* +* \param crtc CRTC to query. +* \param flags Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0). +* \param *vpos Target location for current vertical scanout position. +* \param *hpos Target location for current horizontal scanout position. +* \param *stime Target location for timestamp taken immediately before +* scanout position query. Can be NULL to skip timestamp. +* \param *etime Target location for timestamp taken immediately after +* scanout position query. Can be NULL to skip timestamp. +* \param mode Current display timings. +* +* Returns vpos as a positive number while in active scanout area. +* Returns vpos as a negative number inside vblank, counting the number +* of scanlines to go until end of vblank, e.g., -1 means "one scanline +* until start of active scanout / end of vblank." +* +* \return Flags, or'ed together as follows: +* +* DRM_SCANOUTPOS_VALID = Query successful. +* DRM_SCANOUTPOS_INVBL = Inside vblank. +* DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of +* this flag means that returned position may be offset by a constant +* but unknown small number of scanlines wrt. real scanout position. +*/ +int (*get_scanout_position)(struct drm_crtc *crtc,unsigned int flags, +int *vpos,int *hpos,ktime_t *stime, +ktime_t *etime, +const struct drm_display_mode *mode); };/** @@ -1194,6 +1234,12 @@ extern int drm_crtc_init_with_planes(struct drm_device *dev,extern void drm_crtc_cleanup (struct drm_crtc *crtc);extern unsigned int drm_crtc_index (struct drm_crtc *crtc); +extern int drm_calc_vbltimestamp_from_scanoutpos (struct drm_crtc *crtc, +int *max_error, +struct timeval *vblank_time, +unsigned flags, +const struct drm_display_mode *mode); +/** * drm_crtc_mask - find the mask of a registered CRTC * @crtc: CRTC to find mask for Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 14/16 drm/irq: Add drm_crtc_vblank_count_and_time()
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
This function is the KMS native variant of drm_vblank_count_and_time(). It takes a struct drm_crtc * instead of a struct drm_device * and an index of the CRTC.
Eventually the goal is to access vblank data through the CRTC only so that the per-CRTC data can be moved to struct drm_crtc.
--- drivers/gpu/drm/drm_irq.c | 23 +++++++++++++++++++++++ include/drm/drmP.h | 2 ++ 2 files changed, 25 insertions(+)
drivers/gpu/drm/drm_irq.c +23 -0
@@ -909,6 +909,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_count);* vblank events since the system was booted, including lost events due to * modesetting activity. Returns corresponding system timestamp of the time * of the vblank interval that corresponds to the current vblank counter value. +* +* This is the legacy version of drm_crtc_vblank_count_and_time(). */ u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime)
@@ -936,6 +938,27 @@ u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pipe, }EXPORT_SYMBOL (drm_vblank_count_and_time); +/** +* drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter value +* and the system timestamp corresponding to that vblank counter value +* @crtc: which counter to retrieve +* @vblanktime: Pointer to struct timeval to receive the vblank timestamp. +* +* Fetches the "cooked" vblank count value that represents the number of +* vblank events since the system was booted, including lost events due to +* modesetting activity. Returns corresponding system timestamp of the time +* of the vblank interval that corresponds to the current vblank counter value. +* +* This is the native KMS version of drm_vblank_count_and_time(). +*/ +u32 drm_crtc_vblank_count_and_time (struct drm_crtc *crtc, +struct timeval *vblanktime) +{ +return drm_vblank_count_and_time (crtc->dev,drm_crtc_index (crtc), + vblanktime); +} +EXPORT_SYMBOL (drm_crtc_vblank_count_and_time); +static void send_vblank_event (struct drm_device *dev,struct drm_pending_vblank_event *e,unsigned long seq,struct timeval *now)
include/drm/drmP.h +2 -0
@@ -889,6 +889,8 @@ extern u32 drm_vblank_count(struct drm_device *dev, unsigned int pipe);extern u32 drm_crtc_vblank_count (struct drm_crtc *crtc);extern u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime); +extern u32 drm_crtc_vblank_count_and_time (struct drm_crtc *crtc, +struct timeval *vblanktime);extern void drm_send_vblank_event (struct drm_device *dev,unsigned int pipe,struct drm_pending_vblank_event *e); extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedRe: [PATCH 14/16] drm/irq: Add drm_crtc_vblank_count_and_time()
Quoted 10 lines · Thierry Reding
From: Thierry Reding <[email protected]>
This function is the KMS native variant of
drm_vblank_count_and_time(). It takes a structdrm_crtc* instead of a structdrm_device* and an index of the CRTC.Eventually the goal is to access vblank data through the CRTC only so that the per-CRTC data can be moved to struct
drm_crtc.Signed-off-by Thierry Reding <[email protected]>
Applied to drm-misc, thanks.
-Daniel
Quoted 66 lines
--- drivers/gpu/drm/drm_irq.c | 23 +++++++++++++++++++++++ include/drm/drmP.h | 2 ++ 2 files changed, 25 insertions(+)drivers/gpu/drm/drm_irq.c +23
-0@@ -909,6 +909,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_count);* vblank events since the system was booted, including lost events due to * modesetting activity. Returns corresponding system timestamp of the time * of the vblank interval that corresponds to the current vblank counter value. +* +* This is the legacy version of drm_crtc_vblank_count_and_time(). */ u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime)@@ -936,6 +938,27 @@ u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pipe, }EXPORT_SYMBOL (drm_vblank_count_and_time); +/** +* drm_crtc_vblank_count_and_time - retrieve "cooked" vblank counter value +* and the system timestamp corresponding to that vblank counter value +* @crtc: which counter to retrieve +* @vblanktime: Pointer to struct timeval to receive the vblank timestamp. +* +* Fetches the "cooked" vblank count value that represents the number of +* vblank events since the system was booted, including lost events due to +* modesetting activity. Returns corresponding system timestamp of the time +* of the vblank interval that corresponds to the current vblank counter value. +* +* This is the native KMS version of drm_vblank_count_and_time(). +*/ +u32 drm_crtc_vblank_count_and_time (struct drm_crtc *crtc, +struct timeval *vblanktime) +{ +return drm_vblank_count_and_time (crtc->dev,drm_crtc_index (crtc), + vblanktime); +} +EXPORT_SYMBOL (drm_crtc_vblank_count_and_time); +static void send_vblank_event (struct drm_device *dev,struct drm_pending_vblank_event *e,unsigned long seq,struct timeval *now)include/drm/drmP.h +2
-0@@ -889,6 +889,8 @@ extern u32 drm_vblank_count(struct drm_device *dev, unsigned int pipe);extern u32 drm_crtc_vblank_count (struct drm_crtc *crtc);extern u32 drm_vblank_count_and_time (struct drm_device *dev,unsigned int pipe,struct timeval *vblanktime); +extern u32 drm_crtc_vblank_count_and_time (struct drm_crtc *crtc, +struct timeval *vblanktime);extern void drm_send_vblank_event (struct drm_device *dev,unsigned int pipe,struct drm_pending_vblank_event *e); extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc,Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 15/16 drm/armada: Use drm_crtc_vblank_*() API
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct drm_crtc.
--- drivers/gpu/drm/armada/armada_crtc.c | 17 ++++++++--------- drivers/gpu/drm/armada/armada_drv.c | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-)
drivers/gpu/drm/armada/armada_crtc.c +8 -9
@@ -180,7 +180,7 @@ static int armada_drm_crtc_queue_frame_work(struct armada_crtc *dcrtc,unsigned long flags;int ret; - ret =drm_vblank_get (dev, dcrtc->num); + ret =drm_crtc_vblank_get (&dcrtc->crtc);if (ret) {DRM_ERROR ("failed to acquire vblank counter\n" );return ret;
@@ -194,14 +194,13 @@ static int armada_drm_crtc_queue_frame_work(struct armada_crtc *dcrtc,spin_unlock_irqrestore (&dev->event_lock, flags);if (ret) -drm_vblank_put (dev, dcrtc->num); +drm_crtc_vblank_put (&dcrtc->crtc);return ret; }static void armada_drm_crtc_complete_frame_work (struct armada_crtc *dcrtc) { -struct drm_device *dev = dcrtc->crtc.dev;struct armada_frame_work *work = dcrtc->frame_work; dcrtc->frame_work =NULL ;
@@ -209,9 +208,9 @@ static void armada_drm_crtc_complete_frame_work(struct armada_crtc *dcrtc)armada_drm_crtc_update_regs (dcrtc, work->regs);if (work->event) -drm_send_vblank_event (dev, dcrtc->num, work->event); +drm_crtc_send_vblank_event (&dcrtc->crtc, work->event); -drm_vblank_put (dev, dcrtc->num); +drm_crtc_vblank_put (&dcrtc->crtc);/* Finally, queue the process-half of the cleanup. */ __armada_drm_queue_unref_work (dcrtc->crtc.dev, work->old_fb);
@@ -365,13 +364,13 @@ static void armada_drm_crtc_irq(struct armada_crtc *dcrtc, u32 stat)DRM_ERROR ("graphics underflow on crtc %u\n" , dcrtc->num);if (stat &VSYNC_IRQ ) -drm_handle_vblank (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_handle_vblank (&dcrtc->crtc);spin_lock (&dcrtc->irq_lock);list_for_each_entry_safe (e, n, &dcrtc->vbl_list, node) {list_del_init (&e->node); -drm_vblank_put (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_vblank_put (&dcrtc->crtc); e->fn (dcrtc, e->data); }
@@ -546,9 +545,9 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,if (interlaced ^ dcrtc->interlaced) {if (adj->flags &DRM_MODE_FLAG_INTERLACE ) -drm_vblank_get (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_vblank_get (&dcrtc->crtc);else -drm_vblank_put (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_vblank_put (&dcrtc->crtc); dcrtc->interlaced = interlaced; }
drivers/gpu/drm/armada/armada_drv.c +2 -2
@@ -239,7 +239,7 @@ void armada_drm_vbl_event_add(struct armada_crtc *dcrtc,if (list_empty (&evt->node)) {list_add_tail (&evt->node, &dcrtc->vbl_list); -drm_vblank_get (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_vblank_get (&dcrtc->crtc); }spin_unlock_irqrestore (&dcrtc->irq_lock, flags); }
@@ -249,7 +249,7 @@ void armada_drm_vbl_event_remove(struct armada_crtc *dcrtc, {if (!list_empty (&evt->node)) {list_del_init (&evt->node); -drm_vblank_put (dcrtc->crtc.dev, dcrtc->num); +drm_crtc_vblank_put (&dcrtc->crtc); } }
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 16/16 drm/sti: Use drm_crtc_vblank_*() API
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct drm_crtc.
--- drivers/gpu/drm/sti/sti_crtc.c | 37 ++++++++++++++++++++----------------- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sti/sti_hqvdp.c | 2 +- drivers/gpu/drm/sti/sti_vtg.c | 14 +++++++------- drivers/gpu/drm/sti/sti_vtg.h | 4 ++-- 5 files changed, 31 insertions(+), 28 deletions(-)
drivers/gpu/drm/sti/sti_crtc.c +20 -17
@@ -254,15 +254,17 @@ static int sti_crtc_set_property(struct drm_crtc *crtc,int sti_crtc_vblank_cb (struct notifier_block *nb,unsigned long event,void *data) { -struct drm_device *drm_dev;struct sti_compositor *compo = container_of(nb, struct sti_compositor, vtg_vblank_nb); -int *crtc = data; +struct drm_crtc *crtc = data; +struct sti_mixer *mixer;unsigned long flags;struct sti_private *priv; +unsigned int pipe; - drm_dev = compo->mixer[*crtc]->drm_crtc.dev; - priv = drm_dev->dev_private; + priv = crtc->dev->dev_private; + pipe =drm_crtc_index (crtc); + mixer = compo->mixer[pipe];if ((event !=VTG_TOP_FIELD_EVENT ) && (event !=VTG_BOTTOM_FIELD_EVENT )) {
@@ -270,30 +272,29 @@ int sti_crtc_vblank_cb(struct notifier_block *nb,return -EINVAL ; } -drm_handle_vblank (drm_dev, *crtc); +drm_crtc_handle_vblank (crtc); -spin_lock_irqsave (&drm_dev->event_lock, flags); -if (compo->mixer[*crtc]->pending_event) { -drm_send_vblank_event (drm_dev, *crtc, - compo->mixer[*crtc]->pending_event); -drm_vblank_put (drm_dev, *crtc); - compo->mixer[*crtc]->pending_event =NULL ; +spin_lock_irqsave (&crtc->dev->event_lock, flags); +if (mixer->pending_event) { +drm_crtc_send_vblank_event (crtc, mixer->pending_event); +drm_crtc_vblank_put (crtc); + mixer->pending_event =NULL ; } -spin_unlock_irqrestore (&drm_dev->event_lock, flags); +spin_unlock_irqrestore (&crtc->dev->event_lock, flags); -if (compo->mixer[*crtc]->status ==STI_MIXER_DISABLING ) { +if (mixer->status ==STI_MIXER_DISABLING ) {struct drm_plane *p;/* Disable mixer only if all overlay planes (GDP and VDP) * are disabled */ -list_for_each_entry (p, &drm_dev->mode_config.plane_list, head) { +list_for_each_entry (p, &crtc->dev->mode_config.plane_list, head) {struct sti_plane *plane =to_sti_plane (p);if ((plane->desc &STI_PLANE_TYPE_MASK ) <=STI_VDP )if (plane->status !=STI_PLANE_DISABLED )return 0 ; } -sti_crtc_disable (&compo->mixer[*crtc]->drm_crtc); +sti_crtc_disable (crtc); }return 0 ;
@@ -304,12 +305,13 @@ int sti_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe)struct sti_private *dev_priv = dev->dev_private;struct sti_compositor *compo = dev_priv->compo;struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb; +struct drm_crtc *crtc = &compo->mixer[pipe]->drm_crtc;DRM_DEBUG_DRIVER ("\n" );if (sti_vtg_register_client (pipe ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, - vtg_vblank_nb, pipe)) { + vtg_vblank_nb, crtc)) {DRM_ERROR ("Cannot register VTG notifier\n" );return -EINVAL ; }
@@ -323,6 +325,7 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, unsigned int pipe)struct sti_private *priv = drm_dev->dev_private;struct sti_compositor *compo = priv->compo;struct notifier_block *vtg_vblank_nb = &compo->vtg_vblank_nb; +struct drm_crtc *crtc = &compo->mixer[pipe]->drm_crtc;DRM_DEBUG_DRIVER ("\n" );
@@ -332,7 +335,7 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, unsigned int pipe)/* free the resources of the pending requests */ if (compo->mixer[pipe]->pending_event) { -drm_vblank_put (drm_dev, pipe); +drm_crtc_vblank_put (crtc); compo->mixer[pipe]->pending_event =NULL ; } }
drivers/gpu/drm/sti/sti_gdp.c +1 -1
@@ -492,7 +492,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,/* Register gdp callback */ if (sti_vtg_register_client (mixer->id ==STI_MIXER_MAIN ? compo->vtg_main : compo->vtg_aux, - &gdp->vtg_field_nb, mixer->id)) { + &gdp->vtg_field_nb, crtc)) {DRM_ERROR ("Cannot register VTG notifier\n" );return ; }
drivers/gpu/drm/sti/sti_hqvdp.c +1 -1
@@ -763,7 +763,7 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,/* Register VTG Vsync callback to handle bottom fields */ if (sti_vtg_register_client (hqvdp->vtg, &hqvdp->vtg_nb, - mixer->id)) { + crtc)) {DRM_ERROR ("Cannot register VTG notifier\n" );return ; }
drivers/gpu/drm/sti/sti_vtg.c +7 -7
@@ -79,7 +79,7 @@ LIST_HEAD(vtg_lookup);* @irq: VTG irq * @type: VTG type (main or aux) * @notifier_list: notifier callback -* @crtc_id: the crtc id for vblank event +* @crtc: the CRTC for vblank event * @slave: slave vtg * @link: List node to link the structure in lookup list */
@@ -90,7 +90,7 @@ struct sti_vtg {int irq;u32 irq_status;struct raw_notifier_head notifier_list; -int crtc_id; +struct drm_crtc *crtc;struct sti_vtg *slave;struct list_head link; };
@@ -283,13 +283,13 @@ u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x) }EXPORT_SYMBOL (sti_vtg_get_pixel_number); -int sti_vtg_register_client (struct sti_vtg *vtg, -struct notifier_block *nb,int crtc_id) +int sti_vtg_register_client (struct sti_vtg *vtg,struct notifier_block *nb, +struct drm_crtc *crtc) {if (vtg->slave) -return sti_vtg_register_client (vtg->slave, nb, crtc_id); +return sti_vtg_register_client (vtg->slave, nb, crtc); - vtg->crtc_id = crtc_id; + vtg->crtc = crtc;return raw_notifier_chain_register (&vtg->notifier_list, nb); }EXPORT_SYMBOL (sti_vtg_register_client);
@@ -311,7 +311,7 @@ static irqreturn_t vtg_irq_thread(int irq, void *arg) event = (vtg->irq_status &VTG_IRQ_TOP ) ?VTG_TOP_FIELD_EVENT :VTG_BOTTOM_FIELD_EVENT ; -raw_notifier_call_chain (&vtg->notifier_list, event, &vtg->crtc_id); +raw_notifier_call_chain (&vtg->notifier_list, event, vtg->crtc);return IRQ_HANDLED ; }
drivers/gpu/drm/sti/sti_vtg.h +2 -2
@@ -17,8 +17,8 @@ struct notifier_block;struct sti_vtg *of_vtg_find (struct device_node *np);void sti_vtg_set_config (struct sti_vtg *vtg,const struct drm_display_mode *mode); -int sti_vtg_register_client (struct sti_vtg *vtg, -struct notifier_block *nb,int crtc_id); +int sti_vtg_register_client (struct sti_vtg *vtg,struct notifier_block *nb, +struct drm_crtc *crtc);int sti_vtg_unregister_client (struct sti_vtg *vtg,struct notifier_block *nb);
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 16/16] drm/sti: Use drm_crtc_vblank_*() API
Quoted 8 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct
drm_crtc.Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Quoted 8 lines
--- drivers/gpu/drm/sti/sti_crtc.c | 37 ++++++++++++++++++++----------------- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sti/sti_hqvdp.c | 2 +- drivers/gpu/drm/sti/sti_vtg.c | 14 +++++++------- drivers/gpu/drm/sti/sti_vtg.h | 4 ++-- 5 files changed, 31 insertions(+), 28 deletions(-)
Tested on top of next-20151001.
You can add my Ack-by on this patch
Vincent
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel