diff options
author | Thomas Hilber <sparkie@lowbyte.de> | 2009-05-27 06:23:20 +0200 |
---|---|---|
committer | Paul Menzel <paulepanter@users.sourceforge.net> | 2009-06-02 16:49:30 +0200 |
commit | c6322b3e8d28cb5a6987e119f27eae70a73ca72f (patch) | |
tree | 8a81283a6c2aaf9af808092ac73358e323e8daa3 | |
parent | 2f19cf305166b5bf6051a4294a191e7aa2c90143 (diff) | |
download | xf86-video-intel-frc-c6322b3e8d28cb5a6987e119f27eae70a73ca72f.tar.gz xf86-video-intel-frc-c6322b3e8d28cb5a6987e119f27eae70a73ca72f.tar.bz2 |
Add new scheduling option.
- new scheduling option added
Signed-off-by: Thomas Hilber <sparkie@lowbyte.de>
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r-- | src/i830_driver.c | 16 | ||||
-rw-r--r-- | src/i830_video.c | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index c7244b55..7de87691 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -201,6 +201,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include <sys/mman.h> #endif #include "sys/resource.h" +#include <sched.h> #ifdef INTEL_XVMC #define _INTEL_XVMC_SERVER_ @@ -1832,7 +1833,20 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) } if (pI830->sync_fields) { if (pI830->SchedPrio != ~0) { - if (pI830->SchedPrio) { + if (pI830->SchedPrio < -20) { + struct sched_param sched; + + sched.sched_priority = -pI830->SchedPrio; + if (sched_setscheduler(0, SCHED_FIFO, &sched)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "failed to set SCHED_FIFO priority as requested: %s\n", strerror(errno)); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "set SCHED_FIFO priority to (policy %d/ priority %d) as requested\n", + sched_getscheduler(0), + sched_getparam(0, &sched) ? ~0 : sched.sched_priority); + } + } else if (pI830->SchedPrio) { if (setpriority(PRIO_PROCESS, 0, pI830->SchedPrio)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to set scheduling priority as requested: %s\n", strerror(errno)); diff --git a/src/i830_video.c b/src/i830_video.c index 474647c7..5d14c5d7 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -3235,7 +3235,7 @@ vga_sync_fields(pI830) if (abs(vbl_usec - vbl_usec_prev) > SYF_WARN_RANGE) { log_graph(vbl_usec - vbl_usec_prev, '%'); } - if (abs(vbl_usec - SYF_PAL_FIELD_CYCLE) > SYF_WARN_RANGE) { + if (abs(vbl_usec - SYF_SYNC_POINT) > SYF_WARN_RANGE) { log_graph(vbl_usec - SYF_SYNC_POINT, ':'); } } |