As I was editing code, the top-level .dir-locals.el was making my new
stuff conflict with the existing style. Make it consistently use the
xorg style, instead.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
v2: Fix libdrm version check, and use XORG_VERSION_* instead of a
static 1.0.0 version for the driver module.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
The server will always have it.
v2: Clean up some weird formatting from the unifdeffing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
On something like cirrus, start X, then attempt to start a second
X while the first is running, if fbdev is installed it'll fail
hard.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Newer Linux kernels support DSI outputs. To be able to identify them
properly, add DSI to the list of output names.
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This array isn't used anywhere outside this file, so it can be made
static. While at it, make the array const as well.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Add const to any immutable string pointers.
Rename 'range' to 'prop_range' to avoid redefined warning.
Eliminate some unused return values.
Signed-off-by: Keith Packard <keithp@keithp.com>
When SDL called this it was totally broken, actually hook
up to the underlying drmmode function.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64808
Thanks to Peter Wu <lekensteyn@gmail.com> for harassing me.
Signed-off-by: Dave Airlie <airlied@redhat.com>
If a device is not primary, the PCI device match fails because the
xf86-video-modesetting driver looks specifically for a PCI class match of
0x30000 with a mask of 0xffffff. This fails to match, for example, a
non-primary Intel VGA device, because it is reported as having a class of
0x38000.
Fix that by ignoring the low 16 bits of the class in the pci_id_match table.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed on IRC by Adam Jackson <ajax@redhat.com>
A fixed-mode output device like a panel will often only inform of its
preferred mode through its EDID. However, the driver will adjust user
specified modes for display through use of a panel-fitter allowing
greater flexibility in upscaling. This is often used by games to set a
low resolution for performance and use the panel fitter to fill the
screen.
v2: Use the presence of the 'scaling mode' connector property as an
indication that a panel fitter is attached to that pipe.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55564
So the kernel removes the device, and the driver processes the first
udev event, and gets no output back from the kernel, so it check
and don't fall over.
This fixes a couple of crashes seen when hotplugging USB devices.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Recent versions of the X server no longer provide this function, which
has been obsolete for over 2 years now.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This allows the driver to operate as an output slave.
It adds scan out pixmap, and the capability
checks to make sure they available.
Signed-off-by: Dave Airlie <airlied@redhat.com>
If we get asked to pci open a device with a kms path override,
make sure they match, otherwise this driver can steal the primary
device binding for a usb adaptor.
The driver should fallback to the old probe entry point in this case.
Signed-off-by: Dave Airlie <airlied@redhat.com>
the cirrus driver presents certain challenges, and this is a
workaround, until we can possibly agree some sane interface
for exposing this information.
Signed-off-by: Dave Airlie <airlied@redhat.com>
due to interaction between option handling and set depth, we need
to what fbdev does to get the device path early.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Currently the driver only probes a device when it has a
busID. The busID is optional so don't depend on it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
To make the driver work on nin PCI devices we shouldn't bail
out in this case.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
When no devicename is found in the option then the driver probes
by PciInfo no matter if it's valid or not. Instead of doing this
use PciInfo only when it's valid and fall back to the devicename
otherwise. With devicename probing use open_hw() to fall back
on the KMSDEVICE environment variable or to the default device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
probe_hw opens the hardware in the order we want it:
first try devname, if this is NULL then try the KMSDEVICE
environment variable and as a last fallback use "/dev/dri/card0".
Instead of implementing the same code again when really opening
the device move the code to a open_hw() function and let probe_hw
use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
in Probe() the indention shows what's meant but there are no
brackets. Add them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
The current code only adds -Wall and only for gcc.
Automake reserves the use of CPPFLAGS for the user to override
on the command line.
This also breaks the option --enable-strict-compilation
The variable CWARNFLAGS contains the complete set of warnings
and is platform sensitive.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This reflects the copyright license text in the source code
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Dave Airlie <airlied@redhat.com>
If the kernel rejects a cursor, cause a fallback, this isn't 100% as
we can lose the initial cursor, but it works fine once wm starts.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This isn't perfect, it should really do more with bus id matching
and finding the write drm device using sysfs if it can. but it removes
lots of hardcoding of pci ids.