* [RFT][PATCH] drm/radeon/kms: check for being in VBLANK on VBLANK interrupt
@ 2010-03-03 22:33 Rafał Miłecki
2010-03-03 22:35 ` Rafał Miłecki
0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2010-03-03 22:33 UTC (permalink / raw)
To: dri-devel, Dave Airlie; +Cc: Jaime Velasco Juan
This is supposed to check if we receive correct interrupt and if out check for
VBLANK is correct. If you get warnings with patch applied, it means we have
problem in at least one of mentioned places.
---
To provoke VBLANK interrupt appearing, please use dynpm and start/stop for
example glxgears few times.
Jaime can you check this? I know you experienced warnings when using check in
PM code.
Dave: I believe you reported warnings as well?
---
drivers/gpu/drm/radeon/r100.c | 4 ++++
drivers/gpu/drm/radeon/r600.c | 4 ++++
drivers/gpu/drm/radeon/radeon.h | 2 ++
drivers/gpu/drm/radeon/radeon_pm.c | 5 +----
drivers/gpu/drm/radeon/rs600.c | 4 ++++
5 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 73f9a79..0ac1651 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -311,11 +311,15 @@ int r100_irq_process(struct radeon_device *rdev)
}
/* Vertical blank interrupts */
if (status & RADEON_CRTC_VBLANK_STAT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
}
if (status & RADEON_CRTC2_VBLANK_STAT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 5b56a1b..a98fb4e 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2764,6 +2764,8 @@ restart_ih:
switch (src_data) {
case 0: /* D1 vblank */
if (disp_int & LB_D1_VBLANK_INTERRUPT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
@@ -2786,6 +2788,8 @@ restart_ih:
switch (src_data) {
case 0: /* D2 vblank */
if (disp_int & LB_D2_VBLANK_INTERRUPT) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 0d7caee..9e103ec 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -74,6 +74,8 @@
#include "radeon_mode.h"
#include "radeon_reg.h"
+bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish);
+
/*
* Modules parameters.
*/
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 4f37b52..6b65f15 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -28,7 +28,6 @@
#define RADEON_RECLOCK_DELAY_MS 200
#define RADEON_WAIT_VBLANK_TIMEOUT 200
-static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish);
static void radeon_pm_set_clocks_locked(struct radeon_device *rdev);
static void radeon_pm_set_clocks(struct radeon_device *rdev);
static void radeon_pm_idle_work_handler(struct work_struct *work);
@@ -209,9 +208,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
/* set engine clock */
radeon_sync_with_vblank(rdev);
- radeon_pm_debug_check_in_vbl(rdev, false);
radeon_set_engine_clock(rdev, rdev->pm.requested_clock_mode->sclk);
- radeon_pm_debug_check_in_vbl(rdev, true);
#if 0
/* set memory clock */
@@ -322,7 +319,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
mutex_unlock(&rdev->pm.mutex);
}
-static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish)
+bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish)
{
u32 stat_crtc1 = 0, stat_crtc2 = 0;
bool in_vbl = true;
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index ac7c27a..e1935bb 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -391,11 +391,15 @@ int rs600_irq_process(struct radeon_device *rdev)
radeon_fence_process(rdev);
/* Vertical blank interrupts */
if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 0);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
}
if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) {
+ if (!rdev->pm.vblank_sync)
+ radeon_pm_debug_check_in_vbl(rdev, false);
drm_handle_vblank(rdev->ddev, 1);
rdev->pm.vblank_sync = true;
wake_up(&rdev->irq.vblank_queue);
--
1.6.4.2
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [RFT][PATCH] drm/radeon/kms: check for being in VBLANK on VBLANK interrupt
2010-03-03 22:33 [RFT][PATCH] drm/radeon/kms: check for being in VBLANK on VBLANK interrupt Rafał Miłecki
@ 2010-03-03 22:35 ` Rafał Miłecki
2010-03-04 18:54 ` Jaime Velasco Juan
0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2010-03-03 22:35 UTC (permalink / raw)
To: dri-devel, Dave Airlie; +Cc: Jaime Velasco Juan
W dniu 3 marca 2010 23:33 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> This is supposed to check if we receive correct interrupt and if out check for
> VBLANK is correct. If you get warnings with patch applied, it means we have
> problem in at least one of mentioned places.
> ---
> To provoke VBLANK interrupt appearing, please use dynpm and start/stop for
> example glxgears few times.
>
> Jaime can you check this? I know you experienced warnings when using check in
> PM code.
>
> Dave: I believe you reported warnings as well?
> ---
Personally I got following results on my machine:
[ 57.981202] [drm] Requested: e: 68000 m: 80000 p: 16
[ 57.981212] [drm] Setting: e: 68000 m: 80000 p: 16
[ 57.982827] [drm] not in vbl for pm change 00020002 00000000 at entry
[ 61.784087] [drm] Requested: e: 11000 m: 40500 p: 16
[ 61.784095] [drm] Setting: e: 11000 m: 40500 p: 16
[ 61.799187] [drm] not in vbl for pm change 00020002 00000000 at entry
[ 66.799047] [drm] Requested: e: 68000 m: 80000 p: 16
[ 66.799056] [drm] Setting: e: 68000 m: 80000 p: 16
[ 69.916111] [drm] Requested: e: 11000 m: 40500 p: 16
[ 69.916119] [drm] Setting: e: 11000 m: 40500 p: 16
[ 69.931836] [drm] not in vbl for pm change 00020002 00000000 at entry
[ 73.032037] [drm] Requested: e: 68000 m: 80000 p: 16
[ 73.032046] [drm] Setting: e: 68000 m: 80000 p: 16
[ 76.048056] [drm] Requested: e: 11000 m: 40500 p: 16
[ 76.048064] [drm] Setting: e: 11000 m: 40500 p: 16
[ 78.964090] [drm] Requested: e: 68000 m: 80000 p: 16
[ 78.964099] [drm] Setting: e: 68000 m: 80000 p: 16
[ 84.864053] [drm] Requested: e: 11000 m: 40500 p: 16
[ 84.864069] [drm] Setting: e: 11000 m: 40500 p: 16
[ 84.864102] [drm] not in vbl for pm change 00010002 00000000 at entry
[ 93.165037] [drm] Requested: e: 68000 m: 80000 p: 16
[ 93.165046] [drm] Setting: e: 68000 m: 80000 p: 16
[ 98.080093] [drm] Requested: e: 11000 m: 40500 p: 16
[ 98.080102] [drm] Setting: e: 11000 m: 40500 p: 16
[ 101.396033] [drm] Requested: e: 68000 m: 80000 p: 16
[ 101.396041] [drm] Setting: e: 68000 m: 80000 p: 16
[ 105.012113] [drm] Requested: e: 11000 m: 40500 p: 16
[ 105.012121] [drm] Setting: e: 11000 m: 40500 p: 16
[ 107.613035] [drm] Requested: e: 68000 m: 80000 p: 16
[ 107.613044] [drm] Setting: e: 68000 m: 80000 p: 16
[ 111.728091] [drm] Requested: e: 11000 m: 40500 p: 16
[ 111.728099] [drm] Setting: e: 11000 m: 40500 p: 16
[ 114.328054] [drm] Requested: e: 68000 m: 80000 p: 16
[ 114.328063] [drm] Setting: e: 68000 m: 80000 p: 16
[ 114.328102] [drm] not in vbl for pm change 00020002 00000000 at entry
[ 119.328104] [drm] Requested: e: 11000 m: 40500 p: 16
[ 119.328117] [drm] Setting: e: 11000 m: 40500 p: 16
[ 119.344343] [drm] not in vbl for pm change 00020002 00000000 at entry
So you can see I receive VBLANK when *not* being in VBLANK in about 50% cases.
I don't experience corruptions however.
--
Rafał
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFT][PATCH] drm/radeon/kms: check for being in VBLANK on VBLANK interrupt
2010-03-03 22:35 ` Rafał Miłecki
@ 2010-03-04 18:54 ` Jaime Velasco Juan
0 siblings, 0 replies; 3+ messages in thread
From: Jaime Velasco Juan @ 2010-03-04 18:54 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: dri-devel
El mié. 03 de mar. de 2010, a las 23:35:00 +0100, Rafał Miłecki escribió:
> W dniu 3 marca 2010 23:33 użytkownik Rafał Miłecki <zajec5@gmail.com> napisał:
> > This is supposed to check if we receive correct interrupt and if out check for
> > VBLANK is correct. If you get warnings with patch applied, it means we have
> > problem in at least one of mentioned places.
> > ---
> > To provoke VBLANK interrupt appearing, please use dynpm and start/stop for
> > example glxgears few times.
> >
> > Jaime can you check this? I know you experienced warnings when using check in
> > PM code.
> >
Here are a few tests:
[ 169.696784] [drm] Requested: e: 68000 m: 80000 p: 16
[ 169.696802] [drm] Setting: e: 68000 m: 80000 p: 16
[ 172.700046] [drm] Requested: e: 11000 m: 40500 p: 16
[ 172.700055] [drm] Setting: e: 11000 m: 40500 p: 16
[ 179.513370] [drm] Requested: e: 68000 m: 80000 p: 16
[ 179.513388] [drm] Setting: e: 68000 m: 80000 p: 16
[ 180.113380] [drm] Requested: e: 11000 m: 40500 p: 16
[ 180.113389] [drm] Setting: e: 11000 m: 40500 p: 16
[ 180.115295] [drm] not in vbl for pm change 00020002 00000000 at entry
[ 184.513350] [drm] Requested: e: 68000 m: 80000 p: 16
[ 184.513359] [drm] Setting: e: 68000 m: 80000 p: 16
[ 186.023395] [drm] Requested: e: 11000 m: 40500 p: 16
[ 186.023403] [drm] Setting: e: 11000 m: 40500 p: 16
[ 192.040034] [drm] Requested: e: 68000 m: 80000 p: 16
[ 192.040054] [drm] Setting: e: 68000 m: 80000 p: 16
[ 193.946734] [drm] Requested: e: 11000 m: 40500 p: 16
[ 193.946743] [drm] Setting: e: 11000 m: 40500 p: 16
[ 230.163392] [drm] Requested: e: 68000 m: 80000 p: 16
[ 230.163411] [drm] Setting: e: 68000 m: 80000 p: 16
[ 231.473389] [drm] Requested: e: 11000 m: 40500 p: 16
[ 231.473398] [drm] Setting: e: 11000 m: 40500 p: 16
[ 327.796715] [drm] Requested: e: 68000 m: 80000 p: 16
[ 327.796734] [drm] Setting: e: 68000 m: 80000 p: 16
[ 328.496738] [drm] Requested: e: 11000 m: 40500 p: 16
[ 328.496746] [drm] Setting: e: 11000 m: 40500 p: 16
[ 328.497883] [drm] not in vbl for pm change 00020002 00000000 at entry
> > Dave: I believe you reported warnings as well?
> > ---
>
> Personally I got following results on my machine:
>
> [ 57.981202] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 57.981212] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 57.982827] [drm] not in vbl for pm change 00020002 00000000 at entry
> [ 61.784087] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 61.784095] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 61.799187] [drm] not in vbl for pm change 00020002 00000000 at entry
> [ 66.799047] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 66.799056] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 69.916111] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 69.916119] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 69.931836] [drm] not in vbl for pm change 00020002 00000000 at entry
> [ 73.032037] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 73.032046] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 76.048056] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 76.048064] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 78.964090] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 78.964099] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 84.864053] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 84.864069] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 84.864102] [drm] not in vbl for pm change 00010002 00000000 at entry
> [ 93.165037] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 93.165046] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 98.080093] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 98.080102] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 101.396033] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 101.396041] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 105.012113] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 105.012121] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 107.613035] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 107.613044] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 111.728091] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 111.728099] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 114.328054] [drm] Requested: e: 68000 m: 80000 p: 16
> [ 114.328063] [drm] Setting: e: 68000 m: 80000 p: 16
> [ 114.328102] [drm] not in vbl for pm change 00020002 00000000 at entry
> [ 119.328104] [drm] Requested: e: 11000 m: 40500 p: 16
> [ 119.328117] [drm] Setting: e: 11000 m: 40500 p: 16
> [ 119.344343] [drm] not in vbl for pm change 00020002 00000000 at entry
>
>
> So you can see I receive VBLANK when *not* being in VBLANK in about 50% cases.
>
> I don't experience corruptions however.
>
> --
> Rafał
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-04 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 22:33 [RFT][PATCH] drm/radeon/kms: check for being in VBLANK on VBLANK interrupt Rafał Miłecki
2010-03-03 22:35 ` Rafał Miłecki
2010-03-04 18:54 ` Jaime Velasco Juan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.