Compare commits

...

22 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
8a768d8f8f configure.ac: query video driver directory via pkg-config
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-13 11:33:01 +01:00
Enrico Weigelt, metux IT consult
755e07f865 replace obsolete "pointer" typedef by plain void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 18:22:21 +01:00
Enrico Weigelt, metux IT consult
a052df27e5 .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 17:24:14 +01:00
Enrico Weigelt, metux IT consult
a4d4b1976c .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-28 14:43:57 +01:00
Enrico Weigelt, metux IT consult
737142f729 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 21:46:02 +01:00
Enrico Weigelt, metux IT consult
a5c83b22f9 configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:05:40 +01:00
Enrico Weigelt, metux IT consult
b69995d4da release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 19:09:43 +01:00
Enrico Weigelt, metux IT consult
4fac426b6c configure.ac: tiny formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:22:16 +01:00
Enrico Weigelt, metux IT consult
66b481d628 drop hacks for ancient pre-libpciaccess Xservers
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 15:14:22 +01:00
Enrico Weigelt, metux IT consult
4f822e5dee drop obsolete #ifdef XFree86LOADER
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:43:01 +01:00
Enrico Weigelt, metux IT consult
a4e4066e0c configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:10:38 +01:00
Enrico Weigelt, metux IT consult
57b598c717 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:53:44 +01:00
Enrico Weigelt, metux IT consult
6441dd72a4 drop obsolete HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:37:03 +01:00
Enrico Weigelt, metux IT consult
cc44831a72 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 12:03:03 +01:00
Enrico Weigelt, metux IT consult
b1d35e5ae6 release 0.5.2
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 15:46:57 +01:00
Enrico Weigelt, metux IT consult
bcd5eb9815 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 15:46:36 +01:00
Alan Coopersmith
1a7ca6589d Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/-/merge_requests/12>
2025-12-09 16:43:55 +01:00
b-aaz
5f2150e618 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
2025-07-29 18:55:57 +02:00
Enrico Weigelt, metux IT consult
bb833d6b96 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 19:19:31 +02:00
callmetango
99d67cce2d .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:06:32 +02:00
Alan Coopersmith
bd09098198 Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/-/merge_requests/11>
2025-04-22 17:45:52 -07:00
Bjarni Ingi Gislason
7dd8150830 fbdev.4: Some editorial changes for this man page [Debian bug #1095447]
Originally from https://bugs.debian.org/1095447

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/-/merge_requests/11>
2025-04-17 17:27:11 -07:00
16 changed files with 392 additions and 252 deletions

View File

@@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Select the version
options:
- 0.5.1.1
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: |
Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-fbdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View File

@@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-fbdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be done.

View File

@@ -0,0 +1,49 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-fbdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View File

@@ -0,0 +1,38 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-fbdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

43
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xf86-video-fbdev/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

58
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
permissions:
contents: write
on:
push:
pull_request:
jobs:
ubuntu:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/ubuntu@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
freebsd:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0, xlibre-xserver-25.0.0.18 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/freebsd@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
dragonfly:
strategy:
matrix:
# xlibre-xserver-25.0.x not compiling on dragonfly yet
xserver-version: [ master, xlibre-xserver-25.1.0 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/dragonfly@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
netbsd:
strategy:
matrix:
xserver-version: [ master, xlibre-xserver-25.1.0 ]
runs-on: ubuntu-latest
steps:
- uses: X11Libre/action-build-driver/target/netbsd@v0.3.7
with:
xserver-version: ${{ matrix.xserver-version }}
release-notes:
name: Release pushed tag
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/xlibre-') }}
needs: [ ubuntu, freebsd, dragonfly, netbsd ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: X11Libre/action-build-driver/release@v0.3.7

4
.gitignore vendored
View File

@@ -71,8 +71,8 @@ core
*.tar.bz2
*.tar.gz
#
# Add & Override patterns for xf86-video-fbdev
# Add & Override patterns for xf86-video-fbdev
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#
#

View File

@@ -1,98 +0,0 @@
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
#
# This CI uses the freedesktop.org ci-templates.
# Please see the ci-templates documentation for details:
# https://freedesktop.pages.freedesktop.org/ci-templates/
.templates_sha: &template_sha 25e8e9f020880aa35fffe3d6b259b933f0f9449f # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include:
# Arch container builder template
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/arch.yml'
- project: 'freedesktop/ci-templates'
ref: *template_sha
file: '/templates/ci-fairy.yml'
- template: Security/SAST.gitlab-ci.yml
stages:
- prep # prep work like rebuilding the container images if there is a change
- build # for actually building and testing things in a container
- test
- deploy
variables:
FDO_UPSTREAM_REPO: 'xorg/driver/xf86-video-fbdev'
# The tag should be updated each time the list of packages is updated.
# Changing a tag forces the associated image to be rebuilt.
# Note: the tag has no meaning, we use a date format purely for readability
FDO_DISTRIBUTION_TAG: '2023-10-01.0'
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool make xorg-util-macros xorgproto xorg-server-devel pixman'
#
# Verify that commit messages are as expected
#
check-commits:
extends:
- .fdo.ci-fairy
stage: prep
script:
- ci-fairy check-commits --junit-xml=results.xml
except:
- master@xorg/driver/xf86-video-fbdev
variables:
GIT_DEPTH: 100
artifacts:
reports:
junit: results.xml
#
# Verify that the merge request has the allow-collaboration checkbox ticked
#
check-merge-request:
extends:
- .fdo.ci-fairy
stage: deploy
script:
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
artifacts:
when: on_failure
reports:
junit: results.xml
allow_failure: true
#
# Build a container with the given tag and the packages pre-installed.
# This only happens if the tag changes, otherwise the existing image is
# re-used.
#
container-prep:
extends:
- .fdo.container-build@arch
stage: prep
variables:
GIT_STRATEGY: none
#
# The default build, runs on the image built above.
#
build:
stage: build
extends:
- .fdo.distribution-image@arch
script:
- autoreconf -ivf
- mkdir _builddir
- pushd _builddir > /dev/null
- ../configure --disable-silent-rules
- make
- make check
- make distcheck
- popd > /dev/null

View File

@@ -18,6 +18,10 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# During distcheck, system locations (as provided by pkg-config) may
# not be writable; provide instead relative locations.
DISTCHECK_CONFIGURE_FLAGS = --with-xorg-module-dir='$${libdir}/xorg/modules'
SUBDIRS = src man
MAINTAINERCLEANFILES = ChangeLog INSTALL

View File

@@ -1,18 +1,8 @@
xf86-video-fbdev - video driver for framebuffer device
------------------------------------------------------
All questions regarding this software should be directed at the
Xorg mailing list:
https://lists.x.org/mailman/listinfo/xorg
The primary development code repository can be found at:
https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev
https://github.com/X11Libre/xf86-video-fbdev
Please submit bug reports and requests to merge patches there.
For patch submission instructions, see:
https://www.x.org/wiki/Development/Documentation/SubmittingPatches

View File

@@ -22,10 +22,10 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-fbdev],
[0.5.1],
[https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/issues],
[xf86-video-fbdev])
AC_INIT([xlibre-xf86-video-fbdev],
[25.0.0],
[https://github.com/X11Libre/xf86-video-fbdev/issues],
[xlibrexf86-video-fbdev])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
@@ -45,14 +45,10 @@ LT_INIT([disable-static])
AH_TOP([#include "xorg-server.h"])
# Define a configure option for an alternate module directory
AC_ARG_WITH(xorg-module-dir,
AS_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess],
[Enable use of libpciaccess (default: disabled)]),
[PCIACCESS=$enableval], [PCIACCESS=no])
PKG_PROG_PKG_CONFIG([0.25])
xlibre_video_drivers_dir=`$PKG_CONFIG --variable=video_drivers_dir xlibre-server`
AC_SUBST(xlibre_video_drivers_dir)
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -60,26 +56,9 @@ XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES])
PKG_CHECK_MODULES(XORG, [xorg-server >= 25.0.0 xproto fontsproto $REQUIRED_MODULES])
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
if test "x$PCIACCESS" = xyes; then
AC_DEFINE(PCIACCESS, 1, [Use libpciaccess])
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
# Checks for libraries.
AC_SUBST([moduledir])
DRIVER_NAME=fbdev
AC_SUBST([DRIVER_NAME])
AC_CONFIG_FILES([
Makefile
src/Makefile
man/Makefile
])
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
AC_OUTPUT

View File

@@ -20,15 +20,15 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
#
drivermandir = $(DRIVER_MAN_DIR)
driverman_PRE = @DRIVER_NAME@.man
driverman_PRE = fbdev.man
driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
EXTRA_DIST = @DRIVER_NAME@.man
EXTRA_DIST = fbdev.man
CLEANFILES = $(driverman_DATA)

View File

@@ -14,49 +14,64 @@ fbdev \- video driver for framebuffer device
.fi
.SH DESCRIPTION
.B fbdev
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.
is an
.B __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.
.SH SUPPORTED HARDWARE
The
The
.B fbdev
driver supports all hardware where a framebuffer driver is available.
fbdev uses the os-specific submodule fbdevhw(__drivermansuffix__) to talk
to the kernel
device driver. Currently a fbdevhw module is available for linux.
fbdev uses the os-specific submodule
.BR fbdevhw (__drivermansuffix__)
to talk to the kernel device driver.
Currently a fbdevhw module is available for Linux.
.SH CONFIGURATION DETAILS
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
details. This section only covers configuration details specific to
this driver.
Please refer to
.BR __xconfigfile__ (__filemansuffix__)
for general configuration details.
This section only covers configuration details specific to this driver.
.PP
For this driver it is not required to specify modes in the screen
section of the config file. The
For this driver it is not required to specify modes
in the screen section of the config file.
The
.B fbdev
driver can pick up the currently used video mode from the framebuffer
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.
For PCI boards you might have to add a BusID line to the Device section.
See above for a sample line.
.PP
The following driver
The following driver
.B Options
are supported:
.TP
.BI "Option \*qfbdev\*q \*q" string \*q
The framebuffer device to use. Default: /dev/fb0.
The framebuffer device to use.
Default: /dev/fb0.
.TP
.BI "Option \*qShadowFB\*q \*q" boolean \*q
Enable or disable use of the shadow framebuffer layer. Mandatory for 24bpp
framebuffers on newer servers. Default: on.
Enable or disable use of the shadow framebuffer layer.
Mandatory for 24bpp framebuffers on newer servers.
Default: on.
.TP
.BI "Option \*qRotate\*q \*q" string \*q
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. Disabled for 24bpp
framebuffers. Default: off.
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.
Disabled for 24bpp framebuffers.
Default: off.
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__),
X(__miscmansuffix__), fbdevhw(__drivermansuffix__)
.BR __xservername__ (__appmansuffix__),
.BR __xconfigfile__ (__filemansuffix__),
.BR Xserver (__appmansuffix__),
.BR X (__miscmansuffix__),
.BR fbdevhw (__drivermansuffix__)
.SH AUTHORS
Authors include: Gerd Knorr, Michel D\(:anzer, Geert Uytterhoeven

View File

@@ -26,7 +26,7 @@
AM_CFLAGS = $(BASE_CFLAGS) $(XORG_CFLAGS)
fbdev_drv_la_LTLIBRARIES = fbdev_drv.la
fbdev_drv_la_LDFLAGS = -module -avoid-version
fbdev_drv_ladir = @moduledir@/drivers
fbdev_drv_ladir = @xlibre_video_drivers_dir@
fbdev_drv_la_SOURCES = \
fbdev.c

View File

@@ -2,10 +2,7 @@
* Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
* Michel Dänzer, <michel@tungstengraphics.com>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
@@ -27,9 +24,7 @@
#include "xf86xv.h"
#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
#endif
/* for xf86{Depth,FbBpp}. i am a terrible person, and i am sorry. */
#include "xf86Priv.h"
@@ -53,10 +48,8 @@ static Bool debug = 0;
static const OptionInfoRec * FBDevAvailableOptions(int chipid, int busid);
static void FBDevIdentify(int flags);
static Bool FBDevProbe(DriverPtr drv, int flags);
#ifdef XSERVER_LIBPCIACCESS
static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
struct pci_device *dev, intptr_t match_data);
#endif
static Bool FBDevPreInit(ScrnInfoPtr pScrn, int flags);
static Bool FBDevScreenInit(ScreenPtr pScreen, int argc, char **argv);
static Bool FBDevCloseScreen(ScreenPtr pScreen);
@@ -65,7 +58,7 @@ static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, in
static void FBDevPointerMoved(ScrnInfoPtr pScrn, int x, int y);
static Bool FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen);
static Bool FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op,
pointer ptr);
void *ptr);
enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTATE_CCW=90 };
@@ -77,7 +70,6 @@ enum { FBDEV_ROTATE_NONE=0, FBDEV_ROTATE_CW=270, FBDEV_ROTATE_UD=180, FBDEV_ROTA
#define FBDEV_NAME "FBDEV"
#define FBDEV_DRIVER_NAME "fbdev"
#ifdef XSERVER_LIBPCIACCESS
static const struct pci_id_match fbdev_device_match[] = {
{
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
@@ -86,7 +78,6 @@ static const struct pci_id_match fbdev_device_match[] = {
{ 0, 0, 0 },
};
#endif
_X_EXPORT DriverRec FBDEV = {
FBDEV_VERSION,
@@ -100,11 +91,8 @@ _X_EXPORT DriverRec FBDEV = {
NULL,
0,
FBDevDriverFunc,
#ifdef XSERVER_LIBPCIACCESS
fbdev_device_match,
FBDevPciProbe
#endif
};
/* Supported "chipsets" */
@@ -131,8 +119,6 @@ static const OptionInfoRec FBDevOptions[] = {
/* -------------------------------------------------------------------- */
#ifdef XFree86LOADER
MODULESETUPPROTO(FBDevSetup);
static XF86ModuleVersionInfo FBDevVersRec =
@@ -151,23 +137,21 @@ static XF86ModuleVersionInfo FBDevVersRec =
_X_EXPORT XF86ModuleData fbdevModuleData = { &FBDevVersRec, FBDevSetup, NULL };
pointer
FBDevSetup(pointer module, pointer opts, int *errmaj, int *errmin)
void*
FBDevSetup(void *module, void *opts, int *errmaj, int *errmin)
{
static Bool setupDone = FALSE;
if (!setupDone) {
setupDone = TRUE;
xf86AddDriver(&FBDEV, module, HaveDriverFuncs);
return (pointer)1;
return (void*)1;
} else {
if (errmaj) *errmaj = LDR_ONCEONLY;
return NULL;
}
}
#endif /* XFree86LOADER */
/* -------------------------------------------------------------------- */
/* our private data, and two functions to allocate/free this */
@@ -197,7 +181,7 @@ FBDevGetRec(ScrnInfoPtr pScrn)
{
if (pScrn->driverPrivate != NULL)
return TRUE;
pScrn->driverPrivate = XNFcallocarray(sizeof(FBDevRec), 1);
return TRUE;
}
@@ -255,7 +239,6 @@ fbdevValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
return fbdevHWValidMode(pScrn, mode, verbose, flags);
}
#ifdef XSERVER_LIBPCIACCESS
static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
struct pci_device *dev, intptr_t match_data)
{
@@ -263,7 +246,7 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
if (!xf86LoadDrvSubModule(drv, "fbdevhw"))
return FALSE;
pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, NULL,
NULL, NULL, NULL, NULL);
if (pScrn) {
@@ -286,7 +269,7 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
pScrn->ValidMode = fbdevValidMode;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"claimed PCI slot %d@%d:%d:%d\n",
"claimed PCI slot %d@%d:%d:%d\n",
dev->bus, dev->domain, dev->dev, dev->func);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"using %s\n", device ? device : "default device");
@@ -298,8 +281,6 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
return (pScrn != NULL);
}
#endif
static Bool
FBDevProbe(DriverPtr drv, int flags)
@@ -308,9 +289,6 @@ FBDevProbe(DriverPtr drv, int flags)
ScrnInfoPtr pScrn;
GDevPtr *devSections;
int numDevSections;
#ifndef XSERVER_LIBPCIACCESS
int bus,device,func;
#endif
char *dev;
Bool foundScreen = FALSE;
@@ -320,46 +298,21 @@ FBDevProbe(DriverPtr drv, int flags)
if (flags & PROBE_DETECT)
return FALSE;
if ((numDevSections = xf86MatchDevice(FBDEV_DRIVER_NAME, &devSections)) <= 0)
if ((numDevSections = xf86MatchDevice(FBDEV_DRIVER_NAME, &devSections)) <= 0)
return FALSE;
if (!xf86LoadDrvSubModule(drv, "fbdevhw"))
return FALSE;
for (i = 0; i < numDevSections; i++) {
Bool isPci = FALSE;
dev = xf86FindOptionValue(devSections[i]->options,"fbdev");
if (devSections[i]->busID) {
#ifndef XSERVER_LIBPCIACCESS
if (xf86ParsePciBusString(devSections[i]->busID,&bus,&device,
&func)) {
if (!xf86CheckPciSlot(bus,device,func))
continue;
isPci = TRUE;
}
#endif
}
if (fbdevHWProbe(NULL,dev,NULL)) {
pScrn = NULL;
if (isPci) {
#ifndef XSERVER_LIBPCIACCESS
/* XXX what about when there's no busID set? */
int entity;
entity = xf86ClaimPciSlot(bus,device,func,drv,
0,devSections[i],
TRUE);
pScrn = xf86ConfigPciEntity(pScrn,0,entity,
NULL,RES_SHARED_VGA,
NULL,NULL,NULL,NULL);
/* xf86DrvMsg() can't be called without setting these */
pScrn->driverName = FBDEV_DRIVER_NAME;
pScrn->name = FBDEV_NAME;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"claimed PCI slot %d:%d:%d\n",bus,device,func);
#endif
} else {
int entity;
@@ -367,11 +320,11 @@ FBDevProbe(DriverPtr drv, int flags)
devSections[i], TRUE);
pScrn = xf86ConfigFbEntity(pScrn,0,entity,
NULL,NULL,NULL,NULL);
}
if (pScrn) {
foundScreen = TRUE;
pScrn->driverVersion = FBDEV_VERSION;
pScrn->driverName = FBDEV_DRIVER_NAME;
pScrn->name = FBDEV_NAME;
@@ -383,7 +336,7 @@ FBDevProbe(DriverPtr drv, int flags)
pScrn->EnterVT = fbdevEnterVT;
pScrn->LeaveVT = fbdevLeaveVT;
pScrn->ValidMode = fbdevValidMode;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"using %s\n", dev ? dev : "default device");
}
@@ -418,21 +371,8 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
fPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
#ifndef XSERVER_LIBPCIACCESS
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
/* XXX Is this right? Can probably remove RAC_FB */
pScrn->racIoFlags = RAC_FB | RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT;
if (fPtr->pEnt->location.type == BUS_PCI &&
xf86RegisterResources(fPtr->pEnt->index,NULL,ResExclusive)) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"xf86RegisterResources() found resource conflicts\n");
return FALSE;
}
#else
if (fPtr->pEnt->location.type == BUS_PCI)
pci_dev = fPtr->pEnt->location.id.pci;
#endif
/* open device */
if (!fbdevHWInit(pScrn, pci_dev,
xf86FindOptionValue(fPtr->pEnt->device->options,
@@ -571,7 +511,7 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "checking modes against monitor...\n");
{
DisplayModePtr mode, first = mode = pScrn->modes;
if (mode != NULL) do {
mode->status = xf86CheckModeForMonitor(mode, pScrn->monitor);
mode = mode->next;
@@ -710,7 +650,7 @@ FBDevShadowInit(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
FBDevPtr fPtr = FBDEVPTR(pScrn);
if (!shadowSetup(pScreen)) {
return FALSE;
}
@@ -1006,7 +946,7 @@ FBDevCloseScreen(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
FBDevPtr fPtr = FBDEVPTR(pScrn);
fbdevHWRestore(pScrn);
fbdevHWUnmapVidmem(pScrn);
if (fPtr->shadow) {
@@ -1235,10 +1175,10 @@ FBDevDGAInit(ScrnInfoPtr pScrn, ScreenPtr pScreen)
}
static Bool
FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, pointer ptr)
FBDevDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, void *ptr)
{
xorgHWFlags *flag;
switch (op) {
case GET_REQUIRED_HW_INTERFACES:
flag = (CARD32*)ptr;