- May 26, 2020
-
-
Dave Airlie authored
Signed-off-by: Dave Airlie <airlied@redhat.com>
-
- May 19, 2020
-
-
This option finds all connected connector and then sets its preferred mode on it. If no preferred mode is available, first mode is used. This option must be set w/o any mode or plane. This allows for a quick test on all connected outputs. Loosely based on the work by Ezequiel Garcia <ezequiel@collabora.com> Changes since Ezequiel's work: - implement atomic codepath - set all connectors - pick correct crtc - don't set -r by default - nearly identical output in atomic and non-atomic codepaths v2: - Use the crtc->crtc_id, instead of the plane's current crtc_id Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Makes the code a tiny bit more symmetrical. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
The very final drmModeAtommicCommit tears down the existing mode/plane setup. Following it we clean up other misc state laying around. Chances are that it will not fail, but in the extremely unlikely case it does, there's nothing one can do. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Move the hunk of code into a function, making the overall flow easier to follow and providing some symmetry to the non-atomic path. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
The function is closely related to pipe_find_crtc_and_mode() so we might as well keep them together. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Move the function above set_mode, since we'll be using it from there as of next commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Instead of duplicating the exact same code across the two functions, fold them into one. For some strange reason git diff may show atomic_clear_mode() as changed The function in untouched, despite the misleading output. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Emil Velikov authored
Makes the code shorter and easier to read. Currently if the user has not set the crtc_id, we fetch the crtc yet do not "bother" setting the id - do so. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Let's make the code shorter, this avoid crashes (when drmModeGetCrtc() fails) by using a couple of helpers. As get_resources() considers the drmModeGetCrtc() fail non-fatal, we might as well handle it properly. v2: Add a comment above the unreachable abort() (Eze) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Emil Velikov authored
There's no point in keeping these around since we already fetch the complete data set. Add respective count_ variables and greatly simplify the existing code. Extra brownie points for: - using the inverse order in free_resources() - don't memory leak the connector properties - free the properties themselves, instead of only the objects Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Flesh out the bo_create + drmModeAddFB2 dance into a helper and use it. Currently we're duplicating that in 4 places, many of which leaking et al. As a bonus point this highlights that the atomic_set_plane() seems tad buggy. That'll be fixed with separate commit. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Don't bother opening the device node, if the args combination is invalid Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
The two functions have been stubs for ages. The alluded generic ioctls never came to be, assumingly because all new drivers support those. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
-
- May 07, 2020
-
-
Freedreno uses VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE that was introduced in Valgrind 3.10.0 Raspbian Buster includes Valgrind 3.7.0, so when valgrind is installed as freedreno is build by default the build becomes broken. So lets require 3.10 to enable valgrind when freedreno is built. v2: Keep the arguments listed in the same order (Emil Velikov) Closes: #37 Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- May 06, 2020
-
-
Karol Herbst authored
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
-
- May 05, 2020
-
-
Closes: #5 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-
- May 04, 2020
-
-
Emmanuel Vadot authored
Since we now always returns the /dev/dri/ node for drmGet<nodetype>DeviceNameFromFd, be consistant with the names returned in drmGetDeviceNameFromFd. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
-
Emmanuel Vadot authored
Fix the FreeBSD variant by getting the node type represented by fd to deduce the target minor name. We then return the full /dev/dri/<minorname><id> version. Fix: #41 Fixes: 6818a50b Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
-
Karol Herbst authored
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-
- Apr 30, 2020
-
-
This is similar to b81d44d5: the DRM_RDWR flag is needed for mmap to work. Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Apr 27, 2020
-
-
Nicholas Bishop authored
The sed was incorrectly modifying e.g. "nicholasbishop" to "nicholasbop". The updated pattern will only match `.sh` at the end of the string. Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Apr 26, 2020
-
-
Leo Liu authored
Renoir is the same family as Raven, but it's with VCN2.0, so it has to use VCN2.0 reg set Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-By: Thong Thai <thong.thai@amd.com>
-
- Apr 24, 2020
-
-
Currently the code expects that the device found at /sys/char/$maj:$min/device for USB devices is a "usb_device". However, at least for some devices, such as for the udl driver, they are instead a "usb_interface". A usb_interface is a child of the usb_device we're interested in, so we walk up one in the /sys path to get there. For example, with a USB device I have, trimmed to show the relevant information: ``` $ udevadm info /dev/dri/card1 P: /devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4/1-4:1.0/drm/card1 E: DEVTYPE=drm_minor $ udevadm info /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4/1-4:1.0 E: DEVTYPE=usb_interface E: DRIVER=udl $ udevadm info /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.0/usb1/1-4 E: DEVTYPE=usb_device E: DRIVER=usb E: BUSNUM=001 E: DEVNUM=009 ``` Signed-off-by: Scott Anderson <scott@anderso.nz>
-
This fixes bug in drmParseSubsystemType() that cases situation when subsequent call to readlink() from get_subsystem_type() will result in EACCESS. Signed-off-by: Mikhail Golubev <mikhail.golubev@opensynergy.com>
-
- Apr 23, 2020
-
-
Peter Seiderer authored
Signed-off-by: Peter Seiderer <ps.report@gmx.net> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Apr 21, 2020
-
-
Just like the other tests (tools really) install drmdevice. It is a simple tool which is useful for basic check/testing. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Eric Engestrom <eric@engestrom.ch>
-
Emmanuel Vadot authored
FreeBSD also use (int, unsigned long int, ...) like GLIBC. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
The FreeBSD kernel expose a pseudo-device /dev/pci to obtain information about present PCI device. Uee the PCIOCGETCONF ioctl on this device to look up the desired device information. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
Emmanuel Vadot authored
Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
The FreeBSD drm driver expose a sysctl hw.dri.%d.busid which contain the busid. Use this sysctl to parse the busid information based on the major/minor that allow us to implement FreeBSD support for drmParsePciBusInfo. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
Emmanuel Vadot authored
FreeBSD only support up to 10 GPUs not 16. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
Remove some useless busid rewritting. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
The FreeBSD variant of drmGetDeviceNameFromFd can already handle the different node type so just call it. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
FreeBSD have some support for DRM on !PCI device but no code is currently upstream. Default to PCI for now. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
Use the FreeBSD variant function to obtain the minor name and the device node. Return the correct path based on where the node is (drm/ versus dri/). Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
Get the major/minor via fstat and after checking that this is a drm node construct the full device node name using devname. Note that we should be able to use fdevname to avoid calling fstat + devname but for some reason it doesn't work on drm node (probably due to how the device node are created in the linux compat code for drm on FreeBSD). Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-