mirror of
https://github.com/X11Libre/xf86-video-fbdev.git
synced 2026-03-24 17:45:26 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24177f7218 | ||
|
|
c7b9e1a327 | ||
|
|
fe1fa4c016 | ||
|
|
41a763816d |
27
ChangeLog
27
ChangeLog
@@ -1,3 +1,30 @@
|
||||
2006-05-19 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* configure.ac:
|
||||
* src/fbdev.c:
|
||||
Bump to 0.3.0
|
||||
|
||||
2006-05-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
|
||||
* src/fbdev.c: (FBDevShadowInit), (FBDevScreenInit),
|
||||
(FBDevCloseScreen):
|
||||
Fix ShadowFB support to work with recent miext/shadow changes from
|
||||
bug #5460 (Kevin Martin), and apply fix for miext/shadow crasher
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=6940 (Kristian
|
||||
Hoegsberg).
|
||||
|
||||
2006-04-06 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* configure.ac:
|
||||
* src/fbdev.c:
|
||||
Unlibcwrap. Bump server version requirement. Bump to 0.2.0.
|
||||
|
||||
2006-01-09 David Nusinow <gravity-at-freedesktop-dot-org>
|
||||
|
||||
* man/fbdev.man:
|
||||
Convert manpage to utf-8
|
||||
Bugzilla #1925 <https://bugs.freedesktop.org/show_bug.cgi?id=1925>
|
||||
|
||||
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
|
||||
|
||||
* configure.ac:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-video-fbdev],
|
||||
0.1.0.5,
|
||||
0.3.0,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-video-fbdev)
|
||||
|
||||
@@ -53,7 +53,7 @@ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
|
||||
XORG_DRIVER_CHECK_EXT(XV, videoproto)
|
||||
|
||||
# Checks for pkg-config packages
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
|
||||
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
|
||||
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.man,v 1.3 2001/10/02 15:57:32 alanh Exp $
|
||||
.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/fbdev/fbdev.man,v 1.2 2001/01/27 18:20:47 dawes Exp $
|
||||
.\" shorthand for double quote that works everywhere.
|
||||
.ds q \N'34'
|
||||
.TH FBDEV __drivermansuffix__ __vendorversion__
|
||||
@@ -15,7 +15,7 @@ fbdev \- video driver for framebuffer device
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.B fbdev
|
||||
is an XFree86 driver for framebuffer devices. This is a non-accelerated
|
||||
is an __xservername__ driver for framebuffer devices. This is a non-accelerated
|
||||
driver, the following framebuffer depths are supported: 8, 15, 16, 24.
|
||||
All visual types are supported for depth 8, and TrueColor visual is
|
||||
supported for the other depths. Multi-head configurations are supported.
|
||||
@@ -27,7 +27,7 @@ fbdev uses the os-specific submodule fbdevhw(__drivermansuffix__) to talk
|
||||
to the kernel
|
||||
device driver. Currently a fbdevhw module is available for linux.
|
||||
.SH CONFIGURATION DETAILS
|
||||
Please refer to XF86Config(__filemansuffix__) for general configuration
|
||||
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
|
||||
details. This section only covers configuration details specific to
|
||||
this driver.
|
||||
.PP
|
||||
@@ -38,7 +38,8 @@ driver can pick up the currently used video mode from the framebuffer
|
||||
driver and will use it if there are no video modes configured.
|
||||
.PP
|
||||
For PCI boards you might have to add a BusID line to the Device
|
||||
section. See above for a sample line. You can use "XFree86 -scanpci"
|
||||
section. See above for a sample line. You can use \*q\__xservername__
|
||||
-scanpci\*q
|
||||
to figure out the correct values.
|
||||
.PP
|
||||
The following driver
|
||||
@@ -56,7 +57,7 @@ Enable rotation of the display. The supported values are "CW" (clockwise,
|
||||
90 degrees), "UD" (upside down, 180 degrees) and "CCW" (counter clockwise,
|
||||
270 degrees). Implies use of the shadow framebuffer layer. Default: off.
|
||||
.SH "SEE ALSO"
|
||||
XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1),
|
||||
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__),
|
||||
X(__miscmansuffix__), fbdevhw(__drivermansuffix__)
|
||||
.SH AUTHORS
|
||||
Authors include: Gerd Knorr, Michel Dänzer, Geert Uytterhoeven
|
||||
Authors include: Gerd Knorr, Michel Dänzer, Geert Uytterhoeven
|
||||
|
||||
66
src/fbdev.c
66
src/fbdev.c
@@ -9,10 +9,11 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* all driver need this */
|
||||
#include "xf86.h"
|
||||
#include "xf86_OSproc.h"
|
||||
#include "xf86_ansic.h"
|
||||
|
||||
#include "mipointer.h"
|
||||
#include "mibstore.h"
|
||||
@@ -81,14 +82,14 @@ enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTA
|
||||
*/
|
||||
static int pix24bpp = 0;
|
||||
|
||||
#define VERSION 4000
|
||||
#define FBDEV_VERSION 4000
|
||||
#define FBDEV_NAME "FBDEV"
|
||||
#define FBDEV_DRIVER_NAME "fbdev"
|
||||
#define FBDEV_MAJOR_VERSION 0
|
||||
#define FBDEV_MINOR_VERSION 1
|
||||
#define FBDEV_MINOR_VERSION 3
|
||||
|
||||
_X_EXPORT DriverRec FBDEV = {
|
||||
VERSION,
|
||||
FBDEV_VERSION,
|
||||
FBDEV_DRIVER_NAME,
|
||||
#if 0
|
||||
"driver for linux framebuffer devices",
|
||||
@@ -140,7 +141,6 @@ static const char *fbSymbols[] = {
|
||||
|
||||
static const char *shadowSymbols[] = {
|
||||
"shadowAdd",
|
||||
"shadowAlloc",
|
||||
"shadowInit",
|
||||
"shadowSetup",
|
||||
"shadowUpdatePacked",
|
||||
@@ -235,7 +235,6 @@ typedef struct {
|
||||
unsigned char* fbmem;
|
||||
int fboff;
|
||||
int lineLength;
|
||||
unsigned char* shadowmem;
|
||||
int rotate;
|
||||
Bool shadowFB;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
@@ -360,7 +359,7 @@ FBDevProbe(DriverPtr drv, int flags)
|
||||
if (pScrn) {
|
||||
foundScreen = TRUE;
|
||||
|
||||
pScrn->driverVersion = VERSION;
|
||||
pScrn->driverVersion = FBDEV_VERSION;
|
||||
pScrn->driverName = FBDEV_DRIVER_NAME;
|
||||
pScrn->name = FBDEV_NAME;
|
||||
pScrn->Probe = FBDevProbe;
|
||||
@@ -615,6 +614,36 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
FBDevShadowInit(ScreenPtr pScreen, FBDevPtr fPtr)
|
||||
{
|
||||
PixmapPtr pPixmap;
|
||||
ShadowUpdateProc update;
|
||||
ShadowWindowProc window;
|
||||
|
||||
pPixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height,
|
||||
pScreen->rootDepth);
|
||||
if (!pPixmap)
|
||||
return FALSE;
|
||||
|
||||
if (!shadowSetup(pScreen)) {
|
||||
pScreen->DestroyPixmap(pPixmap);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
update = fPtr->rotate ? shadowUpdateRotatePackedWeak()
|
||||
: shadowUpdatePackedWeak();
|
||||
|
||||
if (!shadowAdd(pScreen, pPixmap, update, FBDevWindowLinear,
|
||||
fPtr->rotate, NULL)) {
|
||||
pScreen->DestroyPixmap(pPixmap);
|
||||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
@@ -691,20 +720,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
pScrn->PointerMoved = FBDevPointerMoved;
|
||||
}
|
||||
|
||||
/* shadowfb */
|
||||
if (fPtr->shadowFB) {
|
||||
if ((fPtr->shadowmem = shadowAlloc(width, height,
|
||||
pScrn->bitsPerPixel)) == NULL) {
|
||||
xf86DrvMsg(scrnIndex,X_ERROR,
|
||||
"allocation of shadow framebuffer memory failed\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fPtr->fbstart = fPtr->shadowmem;
|
||||
} else {
|
||||
fPtr->shadowmem = NULL;
|
||||
fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
|
||||
}
|
||||
fPtr->fbstart = fPtr->fbmem + fPtr->fboff;
|
||||
|
||||
switch ((type = fbdevHWGetType(pScrn)))
|
||||
{
|
||||
@@ -802,11 +818,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"Render extension initialisation failed\n");
|
||||
|
||||
if (fPtr->shadowFB &&
|
||||
(!shadowSetup(pScreen) || !shadowAdd(pScreen, NULL,
|
||||
fPtr->rotate ? shadowUpdateRotatePackedWeak()
|
||||
: shadowUpdatePackedWeak(),
|
||||
FBDevWindowLinear, fPtr->rotate, NULL)) ) {
|
||||
if (fPtr->shadowFB && !FBDevShadowInit(pScreen, fPtr)) {
|
||||
xf86DrvMsg(scrnIndex, X_ERROR,
|
||||
"shadow framebuffer initialization failed\n");
|
||||
return FALSE;
|
||||
@@ -909,8 +921,6 @@ FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen)
|
||||
|
||||
fbdevHWRestore(pScrn);
|
||||
fbdevHWUnmapVidmem(pScrn);
|
||||
if (fPtr->shadowmem)
|
||||
xfree(fPtr->shadowmem);
|
||||
if (fPtr->pDGAMode) {
|
||||
xfree(fPtr->pDGAMode);
|
||||
fPtr->pDGAMode = NULL;
|
||||
|
||||
Reference in New Issue
Block a user