Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Dec 2007 17:41:08 +0000
From:      "Wojciech A. Koszek" <wkoszek@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   [RFC, PATCH] Getting rid of direct calls to video's methods via vidsw[] array
Message-ID:  <20071222174108.GA27354@FreeBSD.czest.pl>

next in thread | raw e-mail | index | archive | help
Hello,

This is very similar patch to my kbdsw[] conversion patch, but directed
to the video output path. In the kernel, video adapter is represented by
"video_adapter" structure. Video adapter code declares itself as being the
video adapter driver with VIDEO_DRIVER() macro. It makes it appear in
vidsw[] array. For now, we indexed this array directly. I want this
behaviour to be improved.


My proposal is here:

	http://people.freebsd.org/~wkoszek/patches/tty/vidcleanup.patch

With this patch, instead of calling:

	(*vidsw[adp->va_index]-><mathod>)(args...)

You call:

	vidd_<method>(agp, args..);

Just like in kbdsw[] patch, I defined missing macros with their
respective convention. My intention was to provide full set of macros
for all "struct video_switch" function pointers.

Comments and suggestions are welcome,

Thanks,

-- 
Wojciech A. Koszek
wkoszek@FreeBSD.org
http://FreeBSD.czest.pl/dunstan/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071222174108.GA27354>