From: John Gilbert <jgilbert@biomail.ucsd.edu>
To: linux-kernel@vger.kernel.org
Subject: svgalib_helper from svgalib-1.9.19 and RTL 2.6.9-mm1-V0.2 lockup
Date: Tue, 26 Oct 2004 09:25:51 -0700 [thread overview]
Message-ID: <417E7A8F.7000501@biomail.ucsd.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
Hello all,
I've built and loaded the 1.9.19 svgalib_helper driver, on
2.6.9-mm1-V0.2 and when I run a svgalib program the entire system locks
up hard.
The screen blanks, no keyboard, network, serial, all completely dead.
It seems to work mostly fine on 2.6.9-mm1-U10.3 (it's starting to not
play as nice with XWindows).
It would be great to see svgalib's interrupt code used in the DRI
interface. Spin waits spend valuable CPU resources and are not reliable
(see attached code).
On a completely other note, what replaces __bad_sema_init_use? The
proprietary ATI drivers use it, and it seems to have been recently retired.
Belayed thanks to Panagiotis for the remap_page_range info.
John Gilbert
jgilbert@biomail.ucsd.edu
[-- Attachment #2: vsync.c --]
[-- Type: text/plain, Size: 3022 bytes --]
/* A work in progress, hope to have a smoothly rotating curser and count as first test of vsync */
/* Done. works pretty good now, and simplified a few things as well */
/* curser rotates 60 times a second along with vsync */
#include <fcntl.h> /* where does O_RDWR come from? */
#include <stdio.h> /* where does stderr come from? */
#include <stdlib.h> /* where does stderr come from? */
#include <signal.h> /* where SIGINT lives */
#include <unistd.h> /* where close lives */
#include <errno.h> /* where errno lives */
#include <sys/ioctl.h> /* where _IOWR lives */
#include <asm-i386/msr.h> /* where rdtscll lives */
#include "/usr/src/linux/drivers/char/drm/drm.h" /* all the drm ioctls and structures */
#include "vsync.h" /* where vsync stuff lives */
int dri_fd = -1;
#ifdef RUNVSYNC
int
main()
{
unsigned long long int lasttick, thistick, ticks, maxval = 0, minval = ~0, total = 0, meanval;
int count = 1;
if (dri_init() == -1) {
printf("can't open dri device\n");
exit(1);
}
signal(SIGINT, (__sighandler_t) dri_close);
dri_vblank();
rdtscll(lasttick);
for (;;) {
/* note: need to use fprintf, as printf will cache and only really print every once in a while */
dri_vblank();
rdtscll(thistick);
ticks = thistick - lasttick;
lasttick = thistick;
maxval = (maxval > ticks) ? maxval : ticks;
minval = (minval < ticks) ? minval : ticks;
total += ticks;
meanval = total / count;
fprintf(stderr, "\\:%i\t:%llu\t:%llu\t:%llu\t:%llu \r", count++, ticks, maxval, minval, meanval);
dri_vblank();
rdtscll(thistick);
ticks = thistick - lasttick;
lasttick = thistick;
maxval = (maxval > ticks) ? maxval : ticks;
minval = (minval < ticks) ? minval : ticks;
total += ticks;
meanval = total / count;
fprintf(stderr, "|:%i\t:%llu\t:%llu\t:%llu\t:%llu \r", count++, ticks, maxval, minval, meanval);
dri_vblank();
rdtscll(thistick);
ticks = thistick - lasttick;
lasttick = thistick;
maxval = (maxval > ticks) ? maxval : ticks;
minval = (minval < ticks) ? minval : ticks;
total += ticks;
meanval = total / count;
fprintf(stderr, "/:%i\t:%llu\t:%llu\t:%llu\t:%llu \r", count++, ticks, maxval, minval, meanval);
dri_vblank();
rdtscll(thistick);
ticks = thistick - lasttick;
lasttick = thistick;
maxval = (maxval > ticks) ? maxval : ticks;
minval = (minval < ticks) ? minval : ticks;
total += ticks;
meanval = total / count;
fprintf(stderr, "-:%i\t:%llu\t:%llu\t:%llu\t:%llu \r", count++, ticks, maxval, minval, meanval);
}
}
#endif /* RUNVSYNC */
int dri_init(void)
{
dri_fd = open ("/dev/dri/card0", O_RDWR);
return (dri_fd);
}
void dri_close(void)
{
fprintf(stderr, "\nShutting down!\n");
if (dri_fd != -1)
close(dri_fd);
exit(0);
}
void dri_vblank(void)
{
int ret;
drm_wait_vblank_t vbl;
vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.sequence = 1;
do {
ret = ioctl( dri_fd, DRM_IOCTL_WAIT_VBLANK, &vbl );
vbl.request.type &= ~_DRM_VBLANK_RELATIVE;
} while (ret && errno == EINTR);
return;
}
reply other threads:[~2004-10-26 16:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=417E7A8F.7000501@biomail.ucsd.edu \
--to=jgilbert@biomail.ucsd.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®