6 years agorelease-request-e64ca0c4-2b43-4758-b238-0b8c6fabc365-for-git_oc-mr1-release-4207446... oreo-mr1-release android-8.1.0_r1 android-8.1.0_r10 android-8.1.0_r11 android-8.1.0_r12 android-8.1.0_r13 android-8.1.0_r14 android-8.1.0_r15 android-8.1.0_r16 android-8.1.0_r17 android-8.1.0_r18 android-8.1.0_r19 android-8.1.0_r2 android-8.1.0_r20 android-8.1.0_r21 android-8.1.0_r22 android-8.1.0_r23 android-8.1.0_r25 android-8.1.0_r26 android-8.1.0_r27 android-8.1.0_r28 android-8.1.0_r29 android-8.1.0_r3 android-8.1.0_r30 android-8.1.0_r31 android-8.1.0_r32 android-8.1.0_r33 android-8.1.0_r35 android-8.1.0_r36 android-8.1.0_r37 android-8.1.0_r38 android-8.1.0_r39 android-8.1.0_r4 android-8.1.0_r40 android-8.1.0_r41 android-8.1.0_r42 android-8.1.0_r43 android-8.1.0_r45 android-8.1.0_r46 android-8.1.0_r47 android-8.1.0_r48 android-8.1.0_r5 android-8.1.0_r50 android-8.1.0_r51 android-8.1.0_r6 android-8.1.0_r7 android-8.1.0_r8 android-8.1.0_r9 android-cts-8.1_r1 android-cts-8.1_r10 android-cts-8.1_r11 android-cts-8.1_r2 android-cts-8.1_r3 android-cts-8.1_r4 android-cts-8.1_r5 android-cts-8.1_r6 android-cts-8.1_r7 android-cts-8.1_r8 android-cts-8.1_r9 android-vts-8.1_r3 android-vts-8.1_r4 android-vts-8.1_r5 android-vts-8.1_r6 android-wear-8.1.0_r1
release-request-e64ca0c4-2b43-4758-b238-0b8c6fabc365-for-git_oc-mr1-release-4207446 snap-temp-L19600000085022555
Change-Id: I57dbc6ad18a2f38b9a12318fadbad7129a8c3090
Change-Id: I57dbc6ad18a2f38b9a12318fadbad7129a8c3090
Build libdrm* modules with BOARD_VNDK_VERSION
They are marked as vendor module since they all are depending on libdrm,
which is a vendor lib.
Also, libdrm_platform is newly introduced as the platform version of
libdrm.
Bug: 37342627
Bug: 63741047
Test: BOARD_VNDK_VERSION=current m -j libdrm_amdgpu libdrm_etnaviv
libdrm_freedreno libdrm_intel libdrm_nouveau libdrm_radeon
libdrm_rockchip libdrm_tegra libkms modetest atomictest planetest
Change-Id: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315
Merged-In: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315
(cherry picked from commit ac77138cb1a0afadceab3cbb779c01ab718b5b19)
They are marked as vendor module since they all are depending on libdrm,
which is a vendor lib.
Also, libdrm_platform is newly introduced as the platform version of
libdrm.
Bug: 37342627
Bug: 63741047
Test: BOARD_VNDK_VERSION=current m -j libdrm_amdgpu libdrm_etnaviv
libdrm_freedreno libdrm_intel libdrm_nouveau libdrm_radeon
libdrm_rockchip libdrm_tegra libkms modetest atomictest planetest
Change-Id: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315
Merged-In: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315
(cherry picked from commit ac77138cb1a0afadceab3cbb779c01ab718b5b19)
release-request-e81235f1-b2b4-4de1-b974-255760176f06-for-git_oc-mr1-release-4040405 snap-temp-L68200000067456736
Change-Id: Ifae354a1d6299b26d619c4cdce882e1b47f50f6c
Change-Id: Ifae354a1d6299b26d619c4cdce882e1b47f50f6c
Android's major/minor/makedev live in <sys/sysmacros.h> am: 791d9b9fd9 am: 303fbc61ac am: dd923ad40d
am: 4863587281
Change-Id: Idd504204c34628d513c232696c493d76bb52e9d5
am: 4863587281
Change-Id: Idd504204c34628d513c232696c493d76bb52e9d5
6 years agoAndroid's major/minor/makedev live in <sys/sysmacros.h> am: 791d9b9fd9 am: 303fbc61ac android-o-mr1-preview-1 android-o-mr1-preview-2
Android's major/minor/makedev live in <sys/sysmacros.h> am: 791d9b9fd9 am: 303fbc61ac
am: dd923ad40d
Change-Id: I746f1f09ab74da6923f044d175b36e9572b6908f
am: dd923ad40d
Change-Id: I746f1f09ab74da6923f044d175b36e9572b6908f
Android's major/minor/makedev live in <sys/sysmacros.h> am: 791d9b9fd9
am: 303fbc61ac
Change-Id: I9321a82e9ae0231162f2fed9247420a6ec3df1c7
am: 303fbc61ac
Change-Id: I9321a82e9ae0231162f2fed9247420a6ec3df1c7
Android's major/minor/makedev live in <sys/sysmacros.h>
am: 791d9b9fd9
Change-Id: Ie4fc54ca7c3531c3eebd7f8a42305d7a92fbde91
am: 791d9b9fd9
Change-Id: Ie4fc54ca7c3531c3eebd7f8a42305d7a92fbde91
6 years agoAndroid's major/minor/makedev live in <sys/sysmacros.h> android-o-iot-preview-5 android-o-preview-3 android-o-preview-4
Android's major/minor/makedev live in <sys/sysmacros.h>
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I4fcb9017ef5917890305760e27de164d7daf9685
Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I4fcb9017ef5917890305760e27de164d7daf9685
release-request-323db86e-b638-4d24-8eb1-d2e3bf4a9d1a-for-git_oc-mr1-release-4017779 snap-temp-L47900000064949209
Change-Id: I2d13a0d62826486f976f4e7afbe6ea9b35b67939
Change-Id: I2d13a0d62826486f976f4e7afbe6ea9b35b67939
Merge tag libdrm-2.4.75 into aosp/master am: d8ed302011 am: 3563100fc8 am: da09b3f585
am: 49e280c363
Change-Id: Ia4fdcb0c065c5ade4795d133e8b3fb0f980a2ad0
am: 49e280c363
Change-Id: Ia4fdcb0c065c5ade4795d133e8b3fb0f980a2ad0
Merge tag libdrm-2.4.75 into aosp/master am: d8ed302011 am: 3563100fc8
am: da09b3f585
Change-Id: Idbdea6478d36cae1f8eb41aa5dd76fc8d3ae5f3e
am: da09b3f585
Change-Id: Idbdea6478d36cae1f8eb41aa5dd76fc8d3ae5f3e
Merge tag libdrm-2.4.75 into aosp/master am: d8ed302011
am: 3563100fc8
Change-Id: If3fc1b5949321f3dbb563b7068e102ff83217408
am: 3563100fc8
Change-Id: If3fc1b5949321f3dbb563b7068e102ff83217408
Merge tag libdrm-2.4.75 into aosp/master
am: d8ed302011
Change-Id: I3b70fccf0d6aee975df6ee0ca0b7641c273dcb92
am: d8ed302011
Change-Id: I3b70fccf0d6aee975df6ee0ca0b7641c273dcb92
Merge tag libdrm-2.4.75 into aosp/master
Below is a brief summary of patches pulled in:
0da99b8a (m/master, aosp/master) Move libdrm.so to vendor partition
d4b83443 (tag: libdrm-2.4.75) Bump version for 2.4.75 release
dae413e4 (tag: libdrm-2.4.74) Bump version for release
317bdff1 (tag: libdrm-2.4.73) Bump version for release
8cf43127 (tag: libdrm-2.4.72) Bump version for release
a44c9c31 (tag: libdrm-2.4.71) Bump version for release
20208455 (tag: android-o-preview-1, tag: android-n-mr2-preview-2, tag:
android-n-mr2-preview-1, aosp/sdk-release, aosp/o-preview) add a flag
control that private libdrm can be chosen
Bug: 35871718
Test: aosp_arm-eng compiles
Change-Id: I81985fd41d5c0d8a732705dc2a4bee8eb5d459bb
Below is a brief summary of patches pulled in:
0da99b8a (m/master, aosp/master) Move libdrm.so to vendor partition
d4b83443 (tag: libdrm-2.4.75) Bump version for 2.4.75 release
dae413e4 (tag: libdrm-2.4.74) Bump version for release
317bdff1 (tag: libdrm-2.4.73) Bump version for release
8cf43127 (tag: libdrm-2.4.72) Bump version for release
a44c9c31 (tag: libdrm-2.4.71) Bump version for release
20208455 (tag: android-o-preview-1, tag: android-n-mr2-preview-2, tag:
android-n-mr2-preview-1, aosp/sdk-release, aosp/o-preview) add a flag
control that private libdrm can be chosen
Bug: 35871718
Test: aosp_arm-eng compiles
Change-Id: I81985fd41d5c0d8a732705dc2a4bee8eb5d459bb
Move libdrm.so to vendor partition am: 0da99b8ab0 am: b3939ef816 am: 28cbff6131
am: 7417f861b9
Change-Id: Ib8c225bd06e41849b6487e231f79dbc37072bcbc
am: 7417f861b9
Change-Id: Ib8c225bd06e41849b6487e231f79dbc37072bcbc
Move libdrm.so to vendor partition am: 0da99b8ab0 am: b3939ef816
am: 28cbff6131
Change-Id: If0c3dee26199a6d84bbb219ec29a1cc6a1943a66
am: 28cbff6131
Change-Id: If0c3dee26199a6d84bbb219ec29a1cc6a1943a66
Move libdrm.so to vendor partition am: 0da99b8ab0
am: b3939ef816
Change-Id: I76e6723c1750a83aa44391f7977035f2f99e76dc
am: b3939ef816
Change-Id: I76e6723c1750a83aa44391f7977035f2f99e76dc
Move libdrm.so to vendor partition
am: 0da99b8ab0
Change-Id: I5552c79a61bcbce1756a5424320a10d26cb671e7
am: 0da99b8ab0
Change-Id: I5552c79a61bcbce1756a5424320a10d26cb671e7
6 years agoMove libdrm.so to vendor partition android-o-preview-2 android-wear-o-preview-3 android-wear-o-preview-4
Move libdrm.so to vendor partition
Gralloc from QCOM is using this lib. However, instead of making this lib
as VNDK-SP, it is moved to /vendor partition because no framework
component is using this.
Bug: 37567747
Bug: 37483222
Test: libdrm.so is in /vendor partion
Change-Id: Ib1e9bf6d70e3616e599880d11e8a575d77e4d550
Gralloc from QCOM is using this lib. However, instead of making this lib
as VNDK-SP, it is moved to /vendor partition because no framework
component is using this.
Bug: 37567747
Bug: 37483222
Test: libdrm.so is in /vendor partion
Change-Id: Ib1e9bf6d70e3616e599880d11e8a575d77e4d550
Fix debug info parameter error am: 853f81c361 am: f43ce58fcd am: 87d7bfe2fa
am: 02806e3611
Change-Id: I352618c11aab1436a5477b555893a13fc2e40677
am: 02806e3611
Change-Id: I352618c11aab1436a5477b555893a13fc2e40677
Fix debug info parameter error am: 853f81c361 am: f43ce58fcd
am: 87d7bfe2fa
Change-Id: I067808c145aad049bdc6d6c0c90786ad89ebd457
am: 87d7bfe2fa
Change-Id: I067808c145aad049bdc6d6c0c90786ad89ebd457
Fix debug info parameter error am: 853f81c361
am: f43ce58fcd
Change-Id: I1eda0416cadd11d04334e3f2763165e006700eb3
am: f43ce58fcd
Change-Id: I1eda0416cadd11d04334e3f2763165e006700eb3
Fix debug info parameter error
The func of drm_intel_probe_agp_aperture_size miss a parameter,
just to fix it.
Test: mm -j8
Change-Id: I06e912b8010aa59d77a42b80b81fcaa8c0f158df
The func of drm_intel_probe_agp_aperture_size miss a parameter,
just to fix it.
Test: mm -j8
Change-Id: I06e912b8010aa59d77a42b80b81fcaa8c0f158df
Bump version for 2.4.75 release
For Intel explicit fencing.
Signed-off-by: Chad Versace <chadversary@chromium.org>
For Intel explicit fencing.
Signed-off-by: Chad Versace <chadversary@chromium.org>
intel: fix make distcheck
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Revert "Bump version for 2.4.75 release"
This reverts commit 736970c49beb9de7ab549f076069d52f4e7bc6f2.
This reverts commit 736970c49beb9de7ab549f076069d52f4e7bc6f2.
Bump version for 2.4.75 release
For Intel explicit fencing.
Signed-off-by: Chad Versace <chadversary@chromium.org>
For Intel explicit fencing.
Signed-off-by: Chad Versace <chadversary@chromium.org>
intel: Export a function to re-enable implicit synchronisation
Implicit synchronisation is the default behaviour of the kernel when
rendering with an execobject. It may be disabled with
drm_intel_gem_bo_disable_implicit_sync(), and then to restore it use
drm_intel_gem_bo_enable_implicit_sync().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Implicit synchronisation is the default behaviour of the kernel when
rendering with an execobject. It may be disabled with
drm_intel_gem_bo_disable_implicit_sync(), and then to restore it use
drm_intel_gem_bo_enable_implicit_sync().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel: Clear execobject flags before preserving object in reuse cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel: Support passing of explicit fencing from execbuf
Allow the caller to pass in an fd to an array of fences to control
serialisation of the execbuf in the kernel and on the GPU, and in return
allow creation of a fence fd for signaling the completion (and flushing)
of the batch. When the returned fence is signaled, all writes to the
buffers inside the batch will be complete and coherent from the cpu, or
other consumers. The return fence is a sync_file object and can be
passed to other users (such as atomic modesetting, or other drivers).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Allow the caller to pass in an fd to an array of fences to control
serialisation of the execbuf in the kernel and on the GPU, and in return
allow creation of a fence fd for signaling the completion (and flushing)
of the batch. When the returned fence is signaled, all writes to the
buffers inside the batch will be complete and coherent from the cpu, or
other consumers. The return fence is a sync_file object and can be
passed to other users (such as atomic modesetting, or other drivers).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel: Allow the client to control implicit synchronisation
The kernel allows implicit synchronisation to be disabled on individual
buffers. Use at your own risk.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The kernel allows implicit synchronisation to be disabled on individual
buffers. Use at your own risk.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Import uapi/i915_drm.h from v4.10-rc5-950-g152d5750dda9
To sync with "drm/i915: Support explicit fencing for execbuf"
To sync with "drm/i915: Support explicit fencing for execbuf"
amdgpu: A new option to run tests on render node
Tested:
1. As root, tests passed on primary.
2. As root, tests passed on render node.
BO export/import test was skipped
3. As non-privileged user, tests failed on primary as expected.
4. As non-privileged user, tests passed on render node.
BO export/import test was skipped
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tested:
1. As root, tests passed on primary.
2. As root, tests passed on render node.
BO export/import test was skipped
3. As non-privileged user, tests failed on primary as expected.
4. As non-privileged user, tests passed on render node.
BO export/import test was skipped
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
amdgpu: A new option to choose which device to run most tests
This can be used to test multiple GPUs
v2: Use PCI bus ID and optional PCI device ID to choose device
Add an option to display information of AMDGPU devices
Tested:
./amdgpu_test -p
./amdgpu_test
./amdgpu_test -b 1 #fail as expected
./amdgpu_test -b 6 #pass
./amdgpu_test -b -d 1 #fail as expected
./amdgpu_test -b -d 0 #pass
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This can be used to test multiple GPUs
v2: Use PCI bus ID and optional PCI device ID to choose device
Add an option to display information of AMDGPU devices
Tested:
./amdgpu_test -p
./amdgpu_test
./amdgpu_test -b 1 #fail as expected
./amdgpu_test -b 6 #pass
./amdgpu_test -b -d 1 #fail as expected
./amdgpu_test -b -d 0 #pass
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
amdgpu: verify the tested device
Verify the vender ID and driver name.
Open all AMDGPU devices.
Provide an option to open render node.
Tested as root: PASS
Tested as non-privileged user:
All tests failed as expected
v2: Return value in the ene of function amdgpu_open_devices.
Check the return value of amdgpu_open_devices.
amdgpu_test is not for USB device for the time being.
Get the name of node from function drmGetDevices2.
Drop the legacy drmAvailable() from the test.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Verify the vender ID and driver name.
Open all AMDGPU devices.
Provide an option to open render node.
Tested as root: PASS
Tested as non-privileged user:
All tests failed as expected
v2: Return value in the ene of function amdgpu_open_devices.
Check the return value of amdgpu_open_devices.
amdgpu_test is not for USB device for the time being.
Get the name of node from function drmGetDevices2.
Drop the legacy drmAvailable() from the test.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
tests: Use -pthread in CFLAGS instead of -lpthread
-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/nouveau: automake: fold C and CPP flags
Since we don't have any C++ souces this should be a no-op. Folding the
two seems to be the common practise throughout the repo.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Since we don't have any C++ souces this should be a no-op. Folding the
two seems to be the common practise throughout the repo.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
android: silence ~550 warnings
Analogous to the autoconf build add the following to the build
-Wno-unused-parameter
-Wno-missing-field-initializers
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Analogous to the autoconf build add the following to the build
-Wno-unused-parameter
-Wno-missing-field-initializers
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: add note about command line defines and config.h
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: add HAVE_VISIBILITY to Android.common.mk
Currently only libdrm.so properly annotates its internal/private
symbols. By setting the macro every binary produced will be in the same
boat. This should give is smaller and more secure files
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Currently only libdrm.so properly annotates its internal/private
symbols. By setting the macro every binary produced will be in the same
boat. This should give is smaller and more secure files
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: introduce Android.common.mk to reduce boilerplate
... across the makefiles. Currently this isn't much but that will change
shortly.
As an added bonus this fixes all present and future cases where we've
forgotten to strip out the headers from LOCAL_SRC_FILES.
In a couple of cases (the tests) we start setting
LOCAL_EXPORT_C_INCLUDE_DIRS, which shouldn't be an issue.
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
... across the makefiles. Currently this isn't much but that will change
shortly.
As an added bonus this fixes all present and future cases where we've
forgotten to strip out the headers from LOCAL_SRC_FILES.
In a couple of cases (the tests) we start setting
LOCAL_EXPORT_C_INCLUDE_DIRS, which shouldn't be an issue.
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: remove LOCAL_MODULE_TAGS := optional tag
Seems to be the default option since ~2009 with commit 2f31293ba78 "auto
import from //branches/cupcake/...@137197". Fleshed out from a larger
commit in the AOSP repo/fork.
Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Seems to be the default option since ~2009 with commit 2f31293ba78 "auto
import from //branches/cupcake/...@137197". Fleshed out from a larger
commit in the AOSP repo/fork.
Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
xf86drm: Reuse sysfs_uevent_get()
Recent patches for USB, platform and host1x bus support introduced the
sysfs_uevent_get() function that provides a generic way of parsing the
sysfs uevent file that is associated with each device in Linux.
Open-coded variants of this still exist in other places, so make those
reuse the new function to remove some code duplication.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Recent patches for USB, platform and host1x bus support introduced the
sysfs_uevent_get() function that provides a generic way of parsing the
sysfs uevent file that is associated with each device in Linux.
Open-coded variants of this still exist in other places, so make those
reuse the new function to remove some code duplication.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
tests/drmdevice: Add USB, platform and host1x support
Extend the drmdevice test with support for the newly added USB, platform
and host1x busses.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Extend the drmdevice test with support for the newly added USB, platform
and host1x busses.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drm: Add platform and host1x bus support
ARM SoCs usually have their DRM/KMS devices on the platform bus, so add
support for that to enable these devices to be used with the drmDevice
infrastructure.
NVIDIA Tegra SoCs have an additional level in the hierarchy and DRM/KMS
devices can also be on the host1x bus. This is mostly equivalent to the
platform bus.
v4:
- continue on error to process platform or host1x device
v3:
- guard Linux-specific sysfs parsing code with #ifdef __linux__
v2:
- be careful not to overflow the full name
- read compatible strings into device info
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
ARM SoCs usually have their DRM/KMS devices on the platform bus, so add
support for that to enable these devices to be used with the drmDevice
infrastructure.
NVIDIA Tegra SoCs have an additional level in the hierarchy and DRM/KMS
devices can also be on the host1x bus. This is mostly equivalent to the
platform bus.
v4:
- continue on error to process platform or host1x device
v3:
- guard Linux-specific sysfs parsing code with #ifdef __linux__
v2:
- be careful not to overflow the full name
- read compatible strings into device info
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drm: Add USB support
Allow DRM/KMS devices hosted on USB to be detected by the drmDevice
infrastructure.
v4:
- continue on error to process USB devices
v3:
- guard Linux-specific sysfs parsing code with #ifdef __linux__
v2:
- make sysfs_uevent_get() more flexible using a format string
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Allow DRM/KMS devices hosted on USB to be detected by the drmDevice
infrastructure.
v4:
- continue on error to process USB devices
v3:
- guard Linux-specific sysfs parsing code with #ifdef __linux__
v2:
- make sysfs_uevent_get() more flexible using a format string
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
xf86drm: Factor out drmDeviceAlloc()
Subsequent patches will add support for other bus types to drmDevice and
they will duplicate a lot of the code to allocate a drmDevice. Factor
out the common code so it can be reused.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Subsequent patches will add support for other bus types to drmDevice and
they will duplicate a lot of the code to allocate a drmDevice. Factor
out the common code so it can be reused.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
tests/util: Add support for meson module
Add support for Amlogic Meson DRM driver merged for Linux 4.10.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Add support for Amlogic Meson DRM driver merged for Linux 4.10.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drm: Fix type-punned pointer build warning
CC libdrm_la-xf86drmMode.lo
../xf86drmMode.c: In function 'drmHandleEvent':
../xf86drmMode.c:854:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
e = (struct drm_event *)(&buffer[i]);
^
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99350
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
CC libdrm_la-xf86drmMode.lo
../xf86drmMode.c: In function 'drmHandleEvent':
../xf86drmMode.c:854:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
e = (struct drm_event *)(&buffer[i]);
^
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99350
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drmMode.h: Add DisplayPort MST and DPI encoders/connectors
This brings xf86drmMode.h in sync with include/drm/drm_mode.h.
Eventually we really should only have a single set of definitions rather
than duplicating this in two files.
v2: add DPI encoder and connector types introduced in Linux v4.7
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This brings xf86drmMode.h in sync with include/drm/drm_mode.h.
Eventually we really should only have a single set of definitions rather
than duplicating this in two files.
v2: add DPI encoder and connector types introduced in Linux v4.7
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drmMode.h: Use consistent padding
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
README: Fix grammar
Fix two grammar issues:
- "standard autotools packages ---> "standard autotools package"
- "If you are install" ---> "If you are installing"
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Fix two grammar issues:
- "standard autotools packages ---> "standard autotools package"
- "If you are install" ---> "If you are installing"
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: fix null termination of string buffer
The string written to the buffer by read() is not null-terminated,
but currently drmParsePciBusInfo() places null character only at the end of the buffer, not at the end of the
string.
As a result, the string passed to sscanf() contains an uninitialized value.
This patch changes to places null character at the end of the string.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99045
Signed-off-by: Taro Yamada <archer_ame@yahoo.co.jp>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
The string written to the buffer by read() is not null-terminated,
but currently drmParsePciBusInfo() places null character only at the end of the buffer, not at the end of the
string.
As a result, the string passed to sscanf() contains an uninitialized value.
This patch changes to places null character at the end of the string.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99045
Signed-off-by: Taro Yamada <archer_ame@yahoo.co.jp>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
intel: update global_name before HASH_ADD
bo->global_name should be updated first before a hash value
for the entry is calculated with it by HASH_ADD macro.
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
bo->global_name should be updated first before a hash value
for the entry is calculated with it by HASH_ADD macro.
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
amdgpu: Provide more specific error message if non-privileged user runs amdgpu_test
Before this change, the error message is:
"WARNING - Suite initialization failed..."
People might think this is a driver problem.
Tested with non-privileged user. Now the error message is like:
...
Error:Permission denied. Hint:Try to run this test program as root.
WARNING - Suite initialization failed for 'Basic Tests'.
...
Tested as root with no regression.
amdgpu_test uses CUnit. CUnit outputs warning message to stdout.
To be consistent, this commit outputs error message to stdout.
v2: Use strerror instead of %m. %m is a GNU C Library extension.
v3: Limit code and commit message within 80 characters per line.
Update commit message.
Remove a space before starting parenthesis in function call.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Before this change, the error message is:
"WARNING - Suite initialization failed..."
People might think this is a driver problem.
Tested with non-privileged user. Now the error message is like:
...
Error:Permission denied. Hint:Try to run this test program as root.
WARNING - Suite initialization failed for 'Basic Tests'.
...
Tested as root with no regression.
amdgpu_test uses CUnit. CUnit outputs warning message to stdout.
To be consistent, this commit outputs error message to stdout.
v2: Use strerror instead of %m. %m is a GNU C Library extension.
v3: Limit code and commit message within 80 characters per line.
Update commit message.
Remove a space before starting parenthesis in function call.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Add .editorconfig
This encodes the indentation style for libdrm and can be used with
various editors. See http://editorconfig.org for instructions.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This encodes the indentation style for libdrm and can be used with
various editors. See http://editorconfig.org for instructions.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drm: Fix indentation
libdrm uses spaces for indentation. Fix the two inconsistent lines in
this file.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
libdrm uses spaces for indentation. Fix the two inconsistent lines in
this file.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
xf86drm: don't fatal on per device error in drmGetDevice[s]2
When iterating over all the device nodes if drmProcessPciDevice()
returned an error for any node the function would return an error,
ignoring any valid nodes.
The result of this on OpenBSD where drmProcessPciDevice() results in
device nodes being opened to issue ioctls to get pci data
was that data obtained from /dev/drm0 would be ignored if /dev/drm1
could not be opened.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
When iterating over all the device nodes if drmProcessPciDevice()
returned an error for any node the function would return an error,
ignoring any valid nodes.
The result of this on OpenBSD where drmProcessPciDevice() results in
device nodes being opened to issue ioctls to get pci data
was that data obtained from /dev/drm0 would be ignored if /dev/drm1
could not be opened.
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
xf86drm: add a non-sysfs version of drmGetDeviceNameFromFd2
Implement a generic drmGetDeviceNameFromFd2() to use on non-linux
systems without sysfs.
v2: remove min < base test as requested by Emil
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Implement a generic drmGetDeviceNameFromFd2() to use on non-linux
systems without sysfs.
v2: remove min < base test as requested by Emil
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
xf86drm: adjust device node path for minor base
When constructing a path to a device node the minor number retrieved
from fstat needs to have the offset of the node type subtracted from it.
Control and render node types have the same major as the primary node
but each has their own block of minor types at fixed offsets.
v2: remove min < base test as requested by Emil
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
When constructing a path to a device node the minor number retrieved
from fstat needs to have the offset of the node type subtracted from it.
Control and render node types have the same major as the primary node
but each has their own block of minor types at fixed offsets.
v2: remove min < base test as requested by Emil
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
7 years agoadd a flag control that private libdrm can be chosen am: 20208455f2 am: 77898962bf... android-8.0.0_r1 android-8.0.0_r10 android-8.0.0_r11 android-8.0.0_r12 android-8.0.0_r13 android-8.0.0_r15 android-8.0.0_r16 android-8.0.0_r17 android-8.0.0_r2 android-8.0.0_r28 android-8.0.0_r29 android-8.0.0_r3 android-8.0.0_r30 android-8.0.0_r31 android-8.0.0_r32 android-8.0.0_r35 android-8.0.0_r36 android-8.0.0_r4 android-8.0.0_r7 android-8.0.0_r9 android-cts-8.0_r1 android-cts-8.0_r10 android-cts-8.0_r11 android-cts-8.0_r12 android-cts-8.0_r13 android-cts-8.0_r14 android-cts-8.0_r15 android-cts-8.0_r2 android-cts-8.0_r3 android-cts-8.0_r4 android-cts-8.0_r5 android-cts-8.0_r6 android-cts-8.0_r7 android-cts-8.0_r8 android-cts-8.0_r9 android-vts-8.0_r1 android-vts-8.0_r2 android-vts-8.0_r6 android-vts-8.0_r7 android-vts-8.0_r8 android-vts-8.0_r9
add a flag control that private libdrm can be chosen am: 20208455f2 am: 77898962bf am: a52a7e90aa
am: c00b18c8bb
Change-Id: I505563e84d6e02d200cdcad3485caf9a77470b90
am: c00b18c8bb
Change-Id: I505563e84d6e02d200cdcad3485caf9a77470b90
add a flag control that private libdrm can be chosen am: 20208455f2 am: 77898962bf
am: a52a7e90aa
Change-Id: Ib037cacfe0ead95eb4995cf399a3cd49bd87c3d6
am: a52a7e90aa
Change-Id: Ib037cacfe0ead95eb4995cf399a3cd49bd87c3d6
add a flag control that private libdrm can be chosen am: 20208455f2
am: 77898962bf
Change-Id: If9f30422aa2f9656db542c5b7bd46a3541562f3b
am: 77898962bf
Change-Id: If9f30422aa2f9656db542c5b7bd46a3541562f3b
add a flag control that private libdrm can be chosen
am: 20208455f2
Change-Id: I05328cc69db13bb064260d33974b74d37f06f0b1
am: 20208455f2
Change-Id: I05328cc69db13bb064260d33974b74d37f06f0b1
modetest: Allow the user to specify the plane ID
Devices can have multiple planes, so allow the user to choose between
them.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Devices can have multiple planes, so allow the user to choose between
them.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
libkms/exynos: fix memory leak in error path
This patch fixes memory leak in error path of exynos_bo_create().
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This patch fixes memory leak in error path of exynos_bo_create().
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
autogen.sh: set format.subjectPrefix and sendemail.to if needed
Just set the rules automatically rather than asking each contributor to
update thing locally.
v2: Silence errors if run outside of git repo. (Eric)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Just set the rules automatically rather than asking each contributor to
update thing locally.
v2: Silence errors if run outside of git repo. (Eric)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
xf86drm: fix sign-compare warning
xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (expected < sizeof(match)) {
^
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (expected < sizeof(match)) {
^
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
xf86drm: implement an OpenBSD specific drmGetDevice2
DRI devices on OpenBSD are not in their own directory. They reside in
/dev with a large number of statically generated /dev nodes.
Avoid stat'ing all of /dev on OpenBSD by implementing this custom path.
v2:
- use drmGetMinorType to get node type
- adapt to drmProcessPciDevice changes
- verify drmParseSubsystemType type is PCI
- add a comment describing why this was added
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
DRI devices on OpenBSD are not in their own directory. They reside in
/dev with a large number of statically generated /dev nodes.
Avoid stat'ing all of /dev on OpenBSD by implementing this custom path.
v2:
- use drmGetMinorType to get node type
- adapt to drmProcessPciDevice changes
- verify drmParseSubsystemType type is PCI
- add a comment describing why this was added
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: implement drmParsePciBusInfo for OpenBSD
Implement drmParsePciBusInfo for OpenBSD by using the new
DRM_IOCTL_GET_PCIINFO ioctl.
v2: use drmGetMinorType to get node type instead of always
using DRM_NODE_PRIMARY.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Implement drmParsePciBusInfo for OpenBSD by using the new
DRM_IOCTL_GET_PCIINFO ioctl.
v2: use drmGetMinorType to get node type instead of always
using DRM_NODE_PRIMARY.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: implement drmParsePciDeviceInfo for OpenBSD
Implement drmParsePciDeviceInfo for OpenBSD by using the new
DRM_IOCTL_GET_PCIINFO ioctl.
v2: adapt to drmParsePciDeviceInfo changes and use drmOpenMinor
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Implement drmParsePciDeviceInfo for OpenBSD by using the new
DRM_IOCTL_GET_PCIINFO ioctl.
v2: adapt to drmParsePciDeviceInfo changes and use drmOpenMinor
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: implement drmParseSubsystemType for OpenBSD
Implement drmParseSubsystemType for OpenBSD by always returning
DRM_BUS_PCI. No non-pci drm drivers are in the kernel and this is
unlikely to change anytime soon as the existing ones aren't permissively
licensed.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Implement drmParseSubsystemType for OpenBSD by always returning
DRM_BUS_PCI. No non-pci drm drivers are in the kernel and this is
unlikely to change anytime soon as the existing ones aren't permissively
licensed.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: implement drmGetMinorNameForFD for non-sysfs
Implement drmGetMinorNameForFD for systems without sysfs by
adapting drm_get_device_name_for_fd() from the Mesa loader.
v2: use type parameter to select dev name instead of always
using DRM_DEV_NAME
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Implement drmGetMinorNameForFD for systems without sysfs by
adapting drm_get_device_name_for_fd() from the Mesa loader.
v2: use type parameter to select dev name instead of always
using DRM_DEV_NAME
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests: automake: reorder makefile contents
Purely cosmetic changes.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Purely cosmetic changes.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
configure: remove libudev checks
Library is no longer used.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Library is no longer used.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
kms: remove commented out libudev code
Cc: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
tests: remove useless legacy tests
All of these 'tests' cover UMS functionality which is neither being
worked on or actively maintained.
The only cases where developers touch UMS code is to unwrap it from the
KMS codepaths and ensure that those are secure.
Anyone who feels strong about having these around can revive them, but
in all honestly do consider _seriously_ what you're doing ;-)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
All of these 'tests' cover UMS functionality which is neither being
worked on or actively maintained.
The only cases where developers touch UMS code is to unwrap it from the
KMS codepaths and ensure that those are secure.
Anyone who feels strong about having these around can revive them, but
in all honestly do consider _seriously_ what you're doing ;-)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tests/drmdevice: use drmGetDevice[s]2
Pass along DRM_DEVICE_GET_PCI_REVISION only when the individual nodes
are opened and update the printed messages accordingly.
v2: Attribute for the flag rename, call drmGetDevices2 w/o the flag.
v3: Keep drmParsePciDeviceInfo() hunk in previous patch.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Pass along DRM_DEVICE_GET_PCI_REVISION only when the individual nodes
are opened and update the printed messages accordingly.
v2: Attribute for the flag rename, call drmGetDevices2 w/o the flag.
v3: Keep drmParsePciDeviceInfo() hunk in previous patch.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
xf86drm: introduce drmGetDevice[s]2
Relative to the original version, here one can provide a flags bitmask.
Currently only DRM_DEVICE_IGNORE_PCI_REVISION is supported.
Implementation detail:
If it's set, we will only parse the separate sysfs files and we won't
touch the config one. The latter awakes the device (causing delays)
which is the core reason why this API was introduced.
v2:
- Initialize revision to 0xff if it's unread.
- Change DRM_DEVICE_IGNORE_PCI_REVISION to DRM_DEVICE_GET_PCI_REVISION
- Add explicit note that drmGetDevice[s]2 does not retrieve the
revision by default.
v3:
- Correctly fold drmParsePciDeviceInfo() hunk in this patch.
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Relative to the original version, here one can provide a flags bitmask.
Currently only DRM_DEVICE_IGNORE_PCI_REVISION is supported.
Implementation detail:
If it's set, we will only parse the separate sysfs files and we won't
touch the config one. The latter awakes the device (causing delays)
which is the core reason why this API was introduced.
v2:
- Initialize revision to 0xff if it's unread.
- Change DRM_DEVICE_IGNORE_PCI_REVISION to DRM_DEVICE_GET_PCI_REVISION
- Add explicit note that drmGetDevice[s]2 does not retrieve the
revision by default.
v3:
- Correctly fold drmParsePciDeviceInfo() hunk in this patch.
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
xf86drm: parse the separate sysfs files for vendor... info
Up-to recently (patch should land in 4.10) the kernel did not expose the
PCI device revision field as a separate sysfs file.
Thus one needed too parse the config file to retrieve it. This in
itself wakes up the device, which in some cases can be quite slow.
To avoid that, just check for the separate files and fall-back to the
original if kernel is not new enough.
v3: rework alongside drmGetDevice[s]2
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Up-to recently (patch should land in 4.10) the kernel did not expose the
PCI device revision field as a separate sysfs file.
Thus one needed too parse the config file to retrieve it. This in
itself wakes up the device, which in some cases can be quite slow.
To avoid that, just check for the separate files and fall-back to the
original if kernel is not new enough.
v3: rework alongside drmGetDevice[s]2
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
xf86drm: add plumbing to not retrieve PCI device revision
Will be used with the drmGetDevice[s]2 API.
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Will be used with the drmGetDevice[s]2 API.
Cc: Michel Dänzer <michel@daenzer.net>
Cc: Nicolai Hähnle <nhaehnle@gmail.com>
Cc: Mauro Santos <registo.mailling@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98502
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
xf86drm: use maj/min in drmParsePciDeviceInfo()
Be consistent with drmParsePciBusInfo() and use solely the device
major/minor pair.
Cc: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Be consistent with drmParsePciBusInfo() and use solely the device
major/minor pair.
Cc: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Bump version for release
vc4: Add new GETPARAMs that have been merged to drm-next.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
freedreno: 64bit support
a5xx and later are 64bit devices.. make reloc's handle that. A new
public symbol is introduced to avoid silent problems with new mesa and
old libdrm (since on 64b reloc consumes two dwords).
Signed-off-by: Rob Clark <robclark@freedesktop.org>
a5xx and later are 64bit devices.. make reloc's handle that. A new
public symbol is introduced to avoid silent problems with new mesa and
old libdrm (since on 64b reloc consumes two dwords).
Signed-off-by: Rob Clark <robclark@freedesktop.org>
etnaviv: add etna_pipe_wait_ns(..)
We need to pass through a timeout parameter to implement
pipe->fence_finish() properly. The new fxn accepts a timeout
in nanoseconds. Simplify etna_pipe_wait(..) by using
etna_pipe_wait_ns(..).
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
We need to pass through a timeout parameter to implement
pipe->fence_finish() properly. The new fxn accepts a timeout
in nanoseconds. Simplify etna_pipe_wait(..) by using
etna_pipe_wait_ns(..).
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
etnaviv: change get_abs_timeout(..) to use ns.
Also update all callers.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Also update all callers.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
libdrm: random typo fixes
Just some trivial boring typo fixes all over the tree.
READMEs and comments only.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Just some trivial boring typo fixes all over the tree.
READMEs and comments only.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests: kms: fix shadowed declaration warning
There is no need to maintain the value in the shadowed variable from
what I can see.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
There is no need to maintain the value in the shadowed variable from
what I can see.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm: introduce drmGetDeviceNameFromFd2
The original version considered only card devices, while this will pick
the device/node name regardless - card, control, renderD, other...
Current implementation is "linux" specific, in such that it relies on
sysfs/uevent file. At the same time this gives us the flexibility to
support any nodes even future ones, as long as they're within DRM_MAJOR.
Shamelessly copied from mesa, latter by: Gary Wong <gtw@gnu.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
The original version considered only card devices, while this will pick
the device/node name regardless - card, control, renderD, other...
Current implementation is "linux" specific, in such that it relies on
sysfs/uevent file. At the same time this gives us the flexibility to
support any nodes even future ones, as long as they're within DRM_MAJOR.
Shamelessly copied from mesa, latter by: Gary Wong <gtw@gnu.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
automake: make the build less chatty
Having the "Entering|Leaving directory X" messages it not required nor
useful in vast majority of the cases.
One can always have them printed by `make -w' or by overriding the
AM_MAKEFLAGS variable.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Having the "Entering|Leaving directory X" messages it not required nor
useful in vast majority of the cases.
One can always have them printed by `make -w' or by overriding the
AM_MAKEFLAGS variable.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
intel: Add drm_intel_gem_context_get_id to intel-symbols-check
Fixes make check. Trivial.
Fixes make check. Trivial.
intel: Add a getter for the intel_context ctx_id
Exposing the u32 context ID makes it possible to define new drm kernel
interfaces based on the same IDs that e.g. execbuf uses to identify a
gem context, that aren't themselves abstracted by libdrm but need to be
used by libdrm/drm_intel_context based clients such as (parts of) i-g-t
or Mesa.
For example this can be used to configure an i915-perf stream to collect
metrics for a specific context.
v2: s/drm_intel_gem_context_get_context_id/drm_intel_gem_context_get_id/
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Exposing the u32 context ID makes it possible to define new drm kernel
interfaces based on the same IDs that e.g. execbuf uses to identify a
gem context, that aren't themselves abstracted by libdrm but need to be
used by libdrm/drm_intel_context based clients such as (parts of) i-g-t
or Mesa.
For example this can be used to configure an i915-perf stream to collect
metrics for a specific context.
v2: s/drm_intel_gem_context_get_context_id/drm_intel_gem_context_get_id/
Signed-off-by: Robert Bragg <robert@sixbynine.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
etnaviv: add API to create etna_device from private dup() fd
Like etna_device_new() but creates it's own private dup() of the fd
which is close()d when the device is finalized.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Like etna_device_new() but creates it's own private dup() of the fd
which is close()d when the device is finalized.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
etnaviv: add API to get drm fd from etna_device
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
intel: Add Geminilake PCI IDs
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Bump version for release
xd86drm: read more than 128 bytes of uevent in drmParsePciBusInfo
Some platforms (such as Macs using OF) can have more information in the
uevent file thus reading only the first 128 might not be sufficient.
Bump it to 512, which "should be enough for everybody" ;-)
v2: Use sizeof(data)-1 over hardcoded number (Eric).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98629
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reported-by: Mingcong Bai <jeffbai@aosc.xyz>
Tested-by: Mingcong Bai <jeffbai@aosc.xyz> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Some platforms (such as Macs using OF) can have more information in the
uevent file thus reading only the first 128 might not be sufficient.
Bump it to 512, which "should be enough for everybody" ;-)
v2: Use sizeof(data)-1 over hardcoded number (Eric).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98629
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reported-by: Mingcong Bai <jeffbai@aosc.xyz>
Tested-by: Mingcong Bai <jeffbai@aosc.xyz> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
headers: Add README file
Since we're trying to standardise and make things more consistent in
the area, add a basic README which covers some of the more popular
topics.
v2:
- Drop drm-misc (Daniel Vetter)
v3:
- Elaborate on when and which headers to update
- Add a list of headers and the respective "issues"
- Add file to EXTRA_DIST
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Since we're trying to standardise and make things more consistent in
the area, add a basic README which covers some of the more popular
topics.
v2:
- Drop drm-misc (Daniel Vetter)
v3:
- Elaborate on when and which headers to update
- Add a list of headers and the respective "issues"
- Add file to EXTRA_DIST
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>