Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I766eb41d83ed2020ac890f03f012bcadaaa9ff35
Change-Id: I766eb41d83ed2020ac890f03f012bcadaaa9ff35
Merge pi-dr1-dev to aosp-master
Change-Id: I685b523f3c89dd0efb6aa491251c3e0200ec2083
Change-Id: I685b523f3c89dd0efb6aa491251c3e0200ec2083
Merge stage-dr1-aosp-master into stage-aosp-master
Bug: 112535855
Change-Id: I1f1f2f8f6588c49411186404505841bbca8119a4
Bug: 112535855
Change-Id: I1f1f2f8f6588c49411186404505841bbca8119a4
Make libdrm recovery_available am: d9aac04d6c
am: 8b8d0170f7
Change-Id: I948476189241b69ede29bb62cef7f3a413caca0f
am: 8b8d0170f7
Change-Id: I948476189241b69ede29bb62cef7f3a413caca0f
Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master
am: 52368c4ddf
Change-Id: I4acd63bbb2d1bb60c71a9bd7b93dafc5f5fdc636
am: 52368c4ddf
Change-Id: I4acd63bbb2d1bb60c71a9bd7b93dafc5f5fdc636
Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master
Bug: 111615259
Change-Id: I25a175251a1c1240604bf79c8e12f221b4ab1374
Bug: 111615259
Change-Id: I25a175251a1c1240604bf79c8e12f221b4ab1374
libdrm: reduce number of reallocations in drmModeAtomicAddProperty
am: c5371788ed
Change-Id: I3815cd86f4bdc41b5c7553e9ca237d8cc8cfd88f
am: c5371788ed
Change-Id: I3815cd86f4bdc41b5c7553e9ca237d8cc8cfd88f
Make libdrm recovery_available
Bug: 110380063
Test: Compiles, recovery works
Change-Id: I07b36484c1a13783ae32f63a8c05dff130524817
Bug: 110380063
Test: Compiles, recovery works
Change-Id: I07b36484c1a13783ae32f63a8c05dff130524817
libdrm: reduce number of reallocations in drmModeAtomicAddProperty
When calling drmModeAtomicAddProperty allocation of memory happens as
needed in increments of 16 elements. This can be very slow if there are
multiple properties to be updated in an Atomic Commit call.
Increase this to as many as can fit in a memory PAGE to avoid having to
reallocate memory too often.
Bug: 111047515
Change-Id: I043db1e7608b0a606adf1a6e468c90734372f363
When calling drmModeAtomicAddProperty allocation of memory happens as
needed in increments of 16 elements. This can be very slow if there are
multiple properties to be updated in an Atomic Commit call.
Increase this to as many as can fit in a memory PAGE to avoid having to
reallocate memory too often.
Bug: 111047515
Change-Id: I043db1e7608b0a606adf1a6e468c90734372f363
omap: Add DRM_RDWR flag to dmabuf export am: ad03011fcb
am: 3c65100f3e
Change-Id: I940f13f2a9e5c9a30c54304474b3747871a16879
am: 3c65100f3e
Change-Id: I940f13f2a9e5c9a30c54304474b3747871a16879
omap: Add DRM_RDWR flag to dmabuf export
am: ad03011fcb
Change-Id: I24ca6dd0bc75b92b00b07d4c20f7368020b41636
am: ad03011fcb
Change-Id: I24ca6dd0bc75b92b00b07d4c20f7368020b41636
omap: Add DRM_RDWR flag to dmabuf export
Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE.
This fixes boot failures caused due to mmap() returning error
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
[picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/]
Bug: 74437007
Change-Id: I8ed3ed3ecb8a5005b3aa69a852e3c0f29ef9f43d
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Alistair Strachan <astrachan@google.com>
Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE.
This fixes boot failures caused due to mmap() returning error
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
[picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/]
Bug: 74437007
Change-Id: I8ed3ed3ecb8a5005b3aa69a852e3c0f29ef9f43d
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Alistair Strachan <astrachan@google.com>
libdrm: Add rotation property fields am: 7551405900
am: a9e7af11ef
Change-Id: I661dfa858c52749f730d241222f576992aca0a42
am: a9e7af11ef
Change-Id: I661dfa858c52749f730d241222f576992aca0a42
libdrm: Add rotation property fields
am: 7551405900
Change-Id: I72368485f2294befe5283be11932dda6d182a5f1
am: 7551405900
Change-Id: I72368485f2294befe5283be11932dda6d182a5f1
libdrm: Add rotation property fields
From drm_crtc.h, for use with the plane "rotation" property
NOTE: These are legacy definitions for old code, similar
DRM_MODE_* mask values are defined in the upstream code.
Change-Id: I9240dede6a53817e6d8cedb31f6877312078b5ab
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[jstultz: Added note about legacy definitions ]
Signed-off-by: John Stultz <john.stultz@linaro.org>
From drm_crtc.h, for use with the plane "rotation" property
NOTE: These are legacy definitions for old code, similar
DRM_MODE_* mask values are defined in the upstream code.
Change-Id: I9240dede6a53817e6d8cedb31f6877312078b5ab
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[jstultz: Added note about legacy definitions ]
Signed-off-by: John Stultz <john.stultz@linaro.org>
libdrm: amdgpu: Fix Android.bp build issues am: dffc3a32a1
am: bae5e71e53
Change-Id: Ib257a7ae060da26fc973295e1487583249a64bc6
am: bae5e71e53
Change-Id: Ib257a7ae060da26fc973295e1487583249a64bc6
libdrm: amdgpu: Initialize unions with memset rather than "= {0}" am: a428014f95
am: a719d8b000
Change-Id: I5b0c0b5740161459e0832dd2559fb4a4d734e0a0
am: a719d8b000
Change-Id: I5b0c0b5740161459e0832dd2559fb4a4d734e0a0
libdrm: Switch to Android.bp for omap driver am: 898243f460
am: 3e48fd62c1
Change-Id: Icf991273a6d1644ca9c4d372d054e191b2ed7f77
am: 3e48fd62c1
Change-Id: Icf991273a6d1644ca9c4d372d054e191b2ed7f77
libdrm: planetest/atomictest: Fix up build issue missed in rebasing am: 843b239004
am: 1ba95114c2
Change-Id: Ie0cbf6979440565a012802443a061f80679de840
am: 1ba95114c2
Change-Id: Ie0cbf6979440565a012802443a061f80679de840
Merge remote-tracking branch 'aosp/upstream-aosp-merge-fdo-master' into libdrm am: 16adcbf47e
am: c06fca4106
Change-Id: Id94ce953b15d915ea6e2a56f0574bece45bea241
am: c06fca4106
Change-Id: Id94ce953b15d915ea6e2a56f0574bece45bea241
libdrm: amdgpu: Fix Android.bp build issues
am: dffc3a32a1
Change-Id: Ie48f80d96f099127ec2b82c5935df043cda9d32e
am: dffc3a32a1
Change-Id: Ie48f80d96f099127ec2b82c5935df043cda9d32e
libdrm: amdgpu: Initialize unions with memset rather than "= {0}"
am: a428014f95
Change-Id: Ib145107df1b05ed524918d19421250b8049e4f2a
am: a428014f95
Change-Id: Ib145107df1b05ed524918d19421250b8049e4f2a
libdrm: Switch to Android.bp for omap driver
am: 898243f460
Change-Id: I7e105925a3183f8e837c260c1b0bde25645b07f6
am: 898243f460
Change-Id: I7e105925a3183f8e837c260c1b0bde25645b07f6
libdrm: planetest/atomictest: Fix up build issue missed in rebasing
am: 843b239004
Change-Id: Id6d6384184d495753a65e3bd17e8d8fbe21c85ae
am: 843b239004
Change-Id: Id6d6384184d495753a65e3bd17e8d8fbe21c85ae
Merge remote-tracking branch 'aosp/upstream-aosp-merge-fdo-master' into libdrm
am: 16adcbf47e
Change-Id: I01b8c6af2316c0f7e0ad7cdd18d491a040a5abb3
am: 16adcbf47e
Change-Id: I01b8c6af2316c0f7e0ad7cdd18d491a040a5abb3
libdrm: amdgpu: Fix Android.bp build issues
Add missing files and required build time defines
Change-Id: I4c417ebeef390f2e64c6b019954829cda93c0ec9
Signed-off-by: John Stultz <john.stultz@linaro.org>
Add missing files and required build time defines
Change-Id: I4c417ebeef390f2e64c6b019954829cda93c0ec9
Signed-off-by: John Stultz <john.stultz@linaro.org>
libdrm: amdgpu: Initialize unions with memset rather than "= {0}"
Clang complains when initializing unions using "= {0}"
so instead use memset.
Change-Id: Ib2fba6226ac4adfde7f0d271b3c953ac66cb84ee
Signed-off-by: John Stultz <john.stultz@linaro.org>
Clang complains when initializing unions using "= {0}"
so instead use memset.
Change-Id: Ib2fba6226ac4adfde7f0d271b3c953ac66cb84ee
Signed-off-by: John Stultz <john.stultz@linaro.org>
libdrm: Switch to Android.bp for omap driver
The omap driver got missed in forward porting
the change to the Android.bp make files, so fix
that.
Change-Id: I94dee0852f418090f861a0930c862512083a46ee
Signed-off-by: John Stultz <john.stultz@linaro.org>
The omap driver got missed in forward porting
the change to the Android.bp make files, so fix
that.
Change-Id: I94dee0852f418090f861a0930c862512083a46ee
Signed-off-by: John Stultz <john.stultz@linaro.org>
libdrm: planetest/atomictest: Fix up build issue missed in rebasing
We dropped commit 5a6afa130317 (BACKPORT: libdrm: atomic mode set)
when moving forward to upstream libdrm, as it should be redundent.
Unfortunately, the API in that commit is slightly different
upstream, and thus the planetest and atomictest tests needed some
updates to use the upstream API
Change-Id: I76cd52f12f6679792a0cedb529973e426932c98c
Signed-off-by: John Stultz <john.stultz@linaro.org>
We dropped commit 5a6afa130317 (BACKPORT: libdrm: atomic mode set)
when moving forward to upstream libdrm, as it should be redundent.
Unfortunately, the API in that commit is slightly different
upstream, and thus the planetest and atomictest tests needed some
updates to use the upstream API
Change-Id: I76cd52f12f6679792a0cedb529973e426932c98c
Signed-off-by: John Stultz <john.stultz@linaro.org>
Merge remote-tracking branch 'aosp/upstream-aosp-merge-fdo-master' into libdrm
Change-Id: Ifff1b65a81b838a6ab77c9f33eb5c3c514c250db
Change-Id: Ifff1b65a81b838a6ab77c9f33eb5c3c514c250db
Android.bp: Add include exports for android dir
This forward ports Stefan Schake's patch
32ee9c0e0566 "android: Add missing include exports" to the
Android.bp file.
Change-Id: Ie07582b87ae3bda0d49073c524e5c0a394e614bb
Signed-off-by: John Stultz <john.stultz@linaro.org>
This forward ports Stefan Schake's patch
32ee9c0e0566 "android: Add missing include exports" to the
Android.bp file.
Change-Id: Ie07582b87ae3bda0d49073c524e5c0a394e614bb
Signed-off-by: John Stultz <john.stultz@linaro.org>
Merge remote-tracking branch 'freedesktop/master' into aosp/master
This merges the freedesktop/master branch into aosp/master
Change-Id: I3104d45924f67d37808154d04c15518394204478
Signed-off-by: John Stultz <john.stultz@linaro.org>
This merges the freedesktop/master branch into aosp/master
Change-Id: I3104d45924f67d37808154d04c15518394204478
Signed-off-by: John Stultz <john.stultz@linaro.org>
libdrm: gralloc_handle.h: Fix build issue with Android
In trying to integrate the new gralloc_handle.h with the
drm_hwcomposer, I started seeing the following compilation
errors:
In file included from external/drm_hwcomposer/platformdrmgeneric.cpp:28:
external/libdrm/android/gralloc_handle.h:108:9: error: cannot initialize return object of type 'native_handle_t *' (aka 'native_handle *') with an lvalue of type 'struct gralloc_handle_t *'
return handle;
^~~~~~
1 error generated.
This seems to be due to the gralloc_handle_create() definition
needs to return a native_handle_t * type, rather then a
gralloc_handle_t *, which is what the code actually returns.
After talking w/ Rob Herring, having the code return the
native handle should be the proper fix, so that is what
this patch changes.
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
In trying to integrate the new gralloc_handle.h with the
drm_hwcomposer, I started seeing the following compilation
errors:
In file included from external/drm_hwcomposer/platformdrmgeneric.cpp:28:
external/libdrm/android/gralloc_handle.h:108:9: error: cannot initialize return object of type 'native_handle_t *' (aka 'native_handle *') with an lvalue of type 'struct gralloc_handle_t *'
return handle;
^~~~~~
1 error generated.
This seems to be due to the gralloc_handle_create() definition
needs to return a native_handle_t * type, rather then a
gralloc_handle_t *, which is what the code actually returns.
After talking w/ Rob Herring, having the code return the
native handle should be the proper fix, so that is what
this patch changes.
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
headers: Update README
Nouveau has made a very deliberate choice to hide its actual kernel ABI
behind libdrm. i915 is no longer out of date.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Nouveau has made a very deliberate choice to hide its actual kernel ABI
behind libdrm. i915 is no longer out of date.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
headers: Sync with drm-next
Taken from the drm-next pull for 4.17-rc1 (694f54f680f7), and manually
reconciled:
core:
- Dropped DRM_MODE_TYPE_ALL and DRM_MODE_FLAG_ALL; these are purely
internal details of the bits accepted by the currently running
kernel, and can not be generally relied on by userspace
- Add HDCP flags
- Note CTM entry representation is sign-magnitude format, not
two's-complement
amdgpu:
- Add QUERY_STATE2 context op
- Add VCN firmware version query
etnaviv:
- Add more GPU feature flags
i915:
- Add caps, params and ioctls for PMU / perf-stream
- Add support for explicit fencing
nouveau:
- Add TILE_COMP layout
vc4:
- Add perfmon ioctls
virtgpu:
- Add capset-fix param
vmware:
- Add handle-close ioctl and explicit-fencing support
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Taken from the drm-next pull for 4.17-rc1 (694f54f680f7), and manually
reconciled:
core:
- Dropped DRM_MODE_TYPE_ALL and DRM_MODE_FLAG_ALL; these are purely
internal details of the bits accepted by the currently running
kernel, and can not be generally relied on by userspace
- Add HDCP flags
- Note CTM entry representation is sign-magnitude format, not
two's-complement
amdgpu:
- Add QUERY_STATE2 context op
- Add VCN firmware version query
etnaviv:
- Add more GPU feature flags
i915:
- Add caps, params and ioctls for PMU / perf-stream
- Add support for explicit fencing
nouveau:
- Add TILE_COMP layout
vc4:
- Add perfmon ioctls
virtgpu:
- Add capset-fix param
vmware:
- Add handle-close ioctl and explicit-fencing support
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
headers: sync up amdgpu_drm.h with drm-next
Add sensor_info type
AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK
AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Add sensor_info type
AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK
AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Revert "libdrm: intel/Android.mk: Filter libdrm_intel library requirements on x86/x86_64"
This reverts commit ed07718ae7bab596297abf210bb0c37c6dba58ed.
The commit added a guard since libpciaccess may be missing on some
setups. As of last commit there are no traces of the project, from
Android POV.
Hence, we can revert this workaround - which caused similar breakage to
the one it's trying to fix. This time in Mesa.
Cc: Rob Herring <rob.herring@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
This reverts commit ed07718ae7bab596297abf210bb0c37c6dba58ed.
The commit added a guard since libpciaccess may be missing on some
setups. As of last commit there are no traces of the project, from
Android POV.
Hence, we can revert this workaround - which caused similar breakage to
the one it's trying to fix. This time in Mesa.
Cc: Rob Herring <rob.herring@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
intel: Do not use libpciaccess on Android
This patch makes the code not rely anymore on libpciaccess when compiled
for Android to eliminate ioperm() and iopl() syscalls required by that
library. As a side effect, the mappable aperture size is hardcoded to 64
MiB on Android, however nothing seems to rely on this value anyway, as
checked be grepping relevant code in drm_gralloc and Mesa.
Cc: Rob Herring <rob.herring@linaro.org>
Signed-off-by: Tomasz Figa <tfiga@google.com>
[Emil Velikov: rebase against master. add missing __func__, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: John Stultz <john.stultz@linaro.org>
This patch makes the code not rely anymore on libpciaccess when compiled
for Android to eliminate ioperm() and iopl() syscalls required by that
library. As a side effect, the mappable aperture size is hardcoded to 64
MiB on Android, however nothing seems to rely on this value anyway, as
checked be grepping relevant code in drm_gralloc and Mesa.
Cc: Rob Herring <rob.herring@linaro.org>
Signed-off-by: Tomasz Figa <tfiga@google.com>
[Emil Velikov: rebase against master. add missing __func__, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: John Stultz <john.stultz@linaro.org>
xf86drmMode: merge successive mutually-exclusive #ifs
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
libdrm: Use readdir instead of readdir_r to avoid build warnings
Building libdrm under AOSP, we see the following build warning:
external/libdrm/xf86drm.c:2861:12: warning: 'readdir_r' is deprecated: readdir_r is deprecated; use readdir instead [-Wdeprecated-declarations]
while (readdir_r(sysdir, pent, &ent) == 0 && ent != NULL) {
^
Building on Linux with glibc produces the same warning.
Thus, this patch replaces readdir_r with readdir.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102031
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: remove unused variables, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Building libdrm under AOSP, we see the following build warning:
external/libdrm/xf86drm.c:2861:12: warning: 'readdir_r' is deprecated: readdir_r is deprecated; use readdir instead [-Wdeprecated-declarations]
while (readdir_r(sysdir, pent, &ent) == 0 && ent != NULL) {
^
Building on Linux with glibc produces the same warning.
Thus, this patch replaces readdir_r with readdir.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102031
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
[Emil Velikov: remove unused variables, Eric]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
android: Add missing include exports
They were set for the static library but not the shared variant.
Signed-off-by: Stefan Schake <stschake@gmail.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
They were set for the static library but not the shared variant.
Signed-off-by: Stefan Schake <stschake@gmail.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
omap: add Android build support
Add Android.mk file to build libdrm_omap library.
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Add Android.mk file to build libdrm_omap library.
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
libdrm: amdgpu: Adding DRM_RDWR flag in amdgpu_bo_export
Currently while exporting prime handle to fd read write access is
not granted. mmap fails because of this. mmap was not supported on
prime initially.
Here is link to related discussion
https://lists.freedesktop.org/archives/dri-devel/2017-February/131840.html
Adding the DRM_RDWR flag in amdgpu_bo_export to support mmap.
Signed-off-by: Satyajit <satyajit.sahu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Currently while exporting prime handle to fd read write access is
not granted. mmap fails because of this. mmap was not supported on
prime initially.
Here is link to related discussion
https://lists.freedesktop.org/archives/dri-devel/2017-February/131840.html
Adding the DRM_RDWR flag in amdgpu_bo_export to support mmap.
Signed-off-by: Satyajit <satyajit.sahu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
meson: drop unnecessary variable
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
meson: move line to allow using `config` earlier
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
meson: drop unneeded dependency to libudev
libdrm only needed libudev for a few days 3 years ago,
between fde4969176822fe54197 and its revert 5b0e76f143887c4ec7db.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
libdrm only needed libudev for a few days 3 years ago,
between fde4969176822fe54197 and its revert 5b0e76f143887c4ec7db.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
meson,configure: include config.h automatically
This will prevent any more missing `#include "config.h"` bug, at the
cost of having to recompile some files that didn't need to be when
changing build options.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This will prevent any more missing `#include "config.h"` bug, at the
cost of having to recompile some files that didn't need to be when
changing build options.
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
meson: replace `if(compiles) have=true` with `have=compiles`
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson,configure: always define UDEV
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson,configure: always define HAVE_VISIBILITY
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson,configure: always define HAVE_OPEN_MEMSTREAM
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
tests: fix memory leak issue
Fixed memory leak issue to drmModeRes and drmModePlaneRes objects.
These objects were allocated by drmModeGetResources and
drmModeGetPlaneResources functions but not freed properly.
So this patch frees them by calling drmModeFreeResources
drmModeFreePlaneResources functions at failure case.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Fixed memory leak issue to drmModeRes and drmModePlaneRes objects.
These objects were allocated by drmModeGetResources and
drmModeGetPlaneResources functions but not freed properly.
So this patch frees them by calling drmModeFreeResources
drmModeFreePlaneResources functions at failure case.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
libdrm: intel/Android.mk: Filter libdrm_intel library requirements on x86/x86_64
When building AOSP after updating libdrm project to the
freedesktop/master branch, I've seen the following build errors:
external/libdrm/intel/Android.mk: error: libdrm_intel
(SHARED_LIBRARIES android-arm64) missing libpciaccess
(SHARED_LIBRARIES android-arm64) You can set
ALLOW_MISSING_DEPENDENCIES=true in your environment if this is
intentional, but that may defer real problems until later in the
build.
Using ALLOW_MISSING_DEPENDENCIES=true when building allows
things to function properly, but is not ideal.
So basically, while I'm not including the libdrm_intel package
into the build, just the fact that the Android.mk file references
libpciaccess which isn't a repo included in AOSP causes the build
failure.
So it seems we need some sort of conditional filter in the
Android.mk to skip over it if we're not building for intel.
Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Marissa Wall <marissaw@google.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Tomasz Figa <tfiga@google.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
When building AOSP after updating libdrm project to the
freedesktop/master branch, I've seen the following build errors:
external/libdrm/intel/Android.mk: error: libdrm_intel
(SHARED_LIBRARIES android-arm64) missing libpciaccess
(SHARED_LIBRARIES android-arm64) You can set
ALLOW_MISSING_DEPENDENCIES=true in your environment if this is
intentional, but that may defer real problems until later in the
build.
Using ALLOW_MISSING_DEPENDENCIES=true when building allows
things to function properly, but is not ideal.
So basically, while I'm not including the libdrm_intel package
into the build, just the fact that the Android.mk file references
libpciaccess which isn't a repo included in AOSP causes the build
failure.
So it seems we need some sort of conditional filter in the
Android.mk to skip over it if we're not building for intel.
Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Marissa Wall <marissaw@google.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Tomasz Figa <tfiga@google.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
tests/exynos: remove dead condition
There is already condition checking input values between 2 and 4096
so condition checking 0 is always false. Remove the dead condition.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
There is already condition checking input values between 2 and 4096
so condition checking 0 is always false. Remove the dead condition.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
meson: detect alloca.h
amdgpu makes use of it
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
amdgpu makes use of it
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson: make it easy to add headers to check
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
meson: don't use compiler.has_header
Meson's compiler.has_header is completely useless, it only checks that a
header exists, not whether it's usable. This creates problems if a
header contains a conditional #error declaration, like so:
> #if __x86_64__
> # error "Doesn't work with x86_64!"
> #endif
Compiler.has_header will return true in this case, even when compiling
for x86_64. This is useless.
Instead, we'll do a compile check so that any #error declarations will
be treated as errors, and compilation will work.
Fixes compilation on x32 architecture.
Gentoo Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=649746
meson bug: https://github.com/mesonbuild/meson/issues/2246
CC: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Meson's compiler.has_header is completely useless, it only checks that a
header exists, not whether it's usable. This creates problems if a
header contains a conditional #error declaration, like so:
> #if __x86_64__
> # error "Doesn't work with x86_64!"
> #endif
Compiler.has_header will return true in this case, even when compiling
for x86_64. This is useless.
Instead, we'll do a compile check so that any #error declarations will
be treated as errors, and compilation will work.
Fixes compilation on x32 architecture.
Gentoo Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=649746
meson bug: https://github.com/mesonbuild/meson/issues/2246
CC: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
meson: use pkg-config to detect libatomic_ops
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
drm/amdgpu: Remove IB count checking
Signed-off-by: Sabre Shao <Sabre.Shao@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Sabre Shao <Sabre.Shao@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Revert "amdgpu:support 16 ibs per submit for PAL/SRIOV"
This reverts commit 924f856a9047b87e8bfdc2867f7fe484e3f71343.
Wrong patch.
This reverts commit 924f856a9047b87e8bfdc2867f7fe484e3f71343.
Wrong patch.
amdgpu:support 16 ibs per submit for PAL/SRIOV
to support SRIOV and MCBP, need 16 IBs per submit
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
to support SRIOV and MCBP, need 16 IBs per submit
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
freedreno: add missing symbols to symbol-check
Fixes: 1384c081233751569473 "freedreno: add interface to get buffer address"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Fixes: 1384c081233751569473 "freedreno: add interface to get buffer address"
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
drm/atomic: Refuse to add invalid objects to requests
Object and property IDs cannot be zero. Prevent them from being added to
the request stream at all, rather than breaking at commit time.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Object and property IDs cannot be zero. Prevent them from being added to
the request stream at all, rather than breaking at commit time.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
intel/intel_chipset.h: Sync Cannonlake IDs.
Let's sync CNL ids with Spec and kernel.
Sync with kernel commit '3f43031b1693 ("drm/i915/cnl:
Add Cannonlake PCI IDs for another SKU.")' and
commit 'e3890d05b342 ("drm/i915/cnl: Sync PCI ID with Spec.")'
Cc: James Ausmus <james.ausmus@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
Let's sync CNL ids with Spec and kernel.
Sync with kernel commit '3f43031b1693 ("drm/i915/cnl:
Add Cannonlake PCI IDs for another SKU.")' and
commit 'e3890d05b342 ("drm/i915/cnl: Sync PCI ID with Spec.")'
Cc: James Ausmus <james.ausmus@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
bump version for release
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
meson: add configuration summary
The message block printed is the same as the one in configure.ac
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
The message block printed is the same as the one in configure.ac
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
tests/amdgpu: Fix misspellings of "suite"
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
test/amdgpu: disable bo eviction test by default
if some system has no swap space and memory is less, than the test
could fail.
And bo eviction test takes much more time in some system, which effects
automation test result and efficiency.
So disable it by default now, only be used by developer manually.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
if some system has no swap space and memory is less, than the test
could fail.
And bo eviction test takes much more time in some system, which effects
automation test result and efficiency.
So disable it by default now, only be used by developer manually.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
amdgpu: fix "add AMDGPU_VA_RANGE_HIGH"
The range is stored as exclusive, not inclusive. Subtracts one to get
the inclusive interval for the calculation. This fixes crashes when 32bit
addresses are in use.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
The range is stored as exclusive, not inclusive. Subtracts one to get
the inclusive interval for the calculation. This fixes crashes when 32bit
addresses are in use.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
amdgpu: add AMDGPU_VA_RANGE_HIGH
Return high addresses if requested and available.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Return high addresses if requested and available.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
amdgpu: mostly revert "use the high VA range if possible v2"
This reverts commit 07ea20d5beb24315b721adf83bbfa72ce016e146.
Unfortunately it turned out that this change broke some corner cases in
Mesa.
Revert it for now, but keep the high range in separate VA managers.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This reverts commit 07ea20d5beb24315b721adf83bbfa72ce016e146.
Unfortunately it turned out that this change broke some corner cases in
Mesa.
Revert it for now, but keep the high range in separate VA managers.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
freedreno: add interface to get buffer address
Needed for clover/OpenCL. Fortunately the kernel interface is already
in place.
Include a stub _put_iova() so mesa can tell us when it no longer needs
the buffer to be pinned. There is no kernel interface for this (yet),
but at least if we want to unpin buffers we won't need mesa changes.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Needed for clover/OpenCL. Fortunately the kernel interface is already
in place.
Include a stub _put_iova() so mesa can tell us when it no longer needs
the buffer to be pinned. There is no kernel interface for this (yet),
but at least if we want to unpin buffers we won't need mesa changes.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
*-symbol-check: Don't hard-code nm executable
Helpful if your nm executable has a prefix based on the
architecture, for example.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Cc: Timo Gurr <timo.gurr@gmail.com>
[Eric: v2: rebase and add Meson support]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Helpful if your nm executable has a prefix based on the
architecture, for example.
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Cc: Timo Gurr <timo.gurr@gmail.com>
[Eric: v2: rebase and add Meson support]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
android: fix gralloc_handle_create() problems
There's a number of problems with gralloc_handle_create starting with it
doesn't even compile. More importantly, it doesn't really create (i.e.
allocate) a handle. It allocates a native_handle_t, copies it to a
struct gralloc_handle_t on the stack and returns the struct (not a ptr).
So the caller still has to allocate a struct gralloc_handle_t to hold
the returned struct.
Rework gralloc_handle_create() to allocate a new handle and return the
pointer to the allocated handle. Callers should free the handle with
native_handle_close() and native_handle_delete(). In the interest of
making gralloc_handle_t opaque, return a native_handle_t ptr instead.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
There's a number of problems with gralloc_handle_create starting with it
doesn't even compile. More importantly, it doesn't really create (i.e.
allocate) a handle. It allocates a native_handle_t, copies it to a
struct gralloc_handle_t on the stack and returns the struct (not a ptr).
So the caller still has to allocate a struct gralloc_handle_t to hold
the returned struct.
Rework gralloc_handle_create() to allocate a new handle and return the
pointer to the allocated handle. Callers should free the handle with
native_handle_close() and native_handle_delete(). In the interest of
making gralloc_handle_t opaque, return a native_handle_t ptr instead.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
android: add helper to convert buffer_handle_t to gralloc_handle_t ptr
Clients frequently need to convert a buffer_handle_t (aka
native_handle_t *) to a gralloc_handle_t ptr. This is a simple cast, but
add an inline function to do the conversion.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Clients frequently need to convert a buffer_handle_t (aka
native_handle_t *) to a gralloc_handle_t ptr. This is a simple cast, but
add an inline function to do the conversion.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
android: fix mis-named alloc_handle_t
Fix a typo where alloc_handle_t should be gralloc_handle_t. One still
remains in gralloc_handle_create, but a subsequent commit will fix that
along with other problems in gralloc_handle_create.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Fix a typo where alloc_handle_t should be gralloc_handle_t. One still
remains in gralloc_handle_create, but a subsequent commit will fix that
along with other problems in gralloc_handle_create.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
android: revert making handle magic and version members const
Const members are problematic for dynamically allocating struct
gralloc_handle_t, so just drop the const modifier.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Const members are problematic for dynamically allocating struct
gralloc_handle_t, so just drop the const modifier.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
meson/configure.ac: pthread-stubs not present on OpenBSD
pthread-stubs is no longer required on OpenBSD and has been removed.
libpthread parts involved moved to libc.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Eric: add meson equivalent]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
pthread-stubs is no longer required on OpenBSD and has been removed.
libpthread parts involved moved to libc.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
[Eric: add meson equivalent]
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
meson: do not use cairo/valgrind if disabled
-Dcairo-tests=false currently results into enabling cairo support if it
was found. Same for valgrind.
v2:
* Use underscore-prefixed variables to not change type of variable
* Use empty array for "fake" dependency instead of real empty object
v3:
* Fix typo
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
-Dcairo-tests=false currently results into enabling cairo support if it
was found. Same for valgrind.
v2:
* Use underscore-prefixed variables to not change type of variable
* Use empty array for "fake" dependency instead of real empty object
v3:
* Fix typo
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
amdgpu: Fix mistake in initial hole size calculation.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
drm/tegra: Sanitize format modifiers
The existing format modifier definitions were merged prematurely, and
recent work has unveiled that the definitions are suboptimal in several
ways:
- The format specifiers, except for one, are not Tegra specific, but
the names don't reflect that.
- The number space is split into two, reserving 32 bits for some
"parameter" which most of the modifiers are not going to have.
- Symbolic names for the modifiers are not using the standard
DRM_FORMAT_MOD_* prefix, which makes them awkward to use.
- The vendor prefix NV is somewhat ambiguous.
Fortunately, nobody's started using these modifiers, so we can still fix
the above issues. Do so by using the standard prefix. Also, remove TEGRA
from the name of those modifiers that exist on NVIDIA GPUs as well. In
case of the block linear modifiers, make the "parameter" smaller (4
bits, though only 6 values are valid) and don't let that leak into any
of the other modifiers.
Finally, also use the more canonical NVIDIA instead of the ambiguous NV
prefix.
This is based on commit 5843f4e02fbe86a59981e35adc6cabebee46fdc0 from
Linux v4.16-rc1 and also updates modetest to use the new defines.
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
The existing format modifier definitions were merged prematurely, and
recent work has unveiled that the definitions are suboptimal in several
ways:
- The format specifiers, except for one, are not Tegra specific, but
the names don't reflect that.
- The number space is split into two, reserving 32 bits for some
"parameter" which most of the modifiers are not going to have.
- Symbolic names for the modifiers are not using the standard
DRM_FORMAT_MOD_* prefix, which makes them awkward to use.
- The vendor prefix NV is somewhat ambiguous.
Fortunately, nobody's started using these modifiers, so we can still fix
the above issues. Do so by using the standard prefix. Also, remove TEGRA
from the name of those modifiers that exist on NVIDIA GPUs as well. In
case of the block linear modifiers, make the "parameter" smaller (4
bits, though only 6 values are valid) and don't let that leak into any
of the other modifiers.
Finally, also use the more canonical NVIDIA instead of the ambiguous NV
prefix.
This is based on commit 5843f4e02fbe86a59981e35adc6cabebee46fdc0 from
Linux v4.16-rc1 and also updates modetest to use the new defines.
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drm/fourcc: Fix fourcc_mod_code() definition
Avoid compiler warnings when the val parameter is an expression.
This is based on commit 5843f4e02fbe86a59981e35adc6cabebee46fdc0 from
Linux v4.16-rc1.
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Avoid compiler warnings when the val parameter is an expression.
This is based on commit 5843f4e02fbe86a59981e35adc6cabebee46fdc0 from
Linux v4.16-rc1.
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
RELEASING: mention meson
meson: bump the version number
configure.ac: bump version to 2.4.90
android: Change gralloc_handle_t members to be fixed width
In order to lessen future alignment issues, lets switch to
fixed width integers where possible.
This excludes the data_owner since it is a pid_t which
in theory could be larger than 32 bits.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
In order to lessen future alignment issues, lets switch to
fixed width integers where possible.
This excludes the data_owner since it is a pid_t which
in theory could be larger than 32 bits.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: Remove member name from gralloc_handle_t
The name member of gralloc_handle_t is no longer needed and has been removed.
The version field has also been bumped.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
The name member of gralloc_handle_t is no longer needed and has been removed.
The version field has also been bumped.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: Mark gralloc_handle_t magic variable as const
Mark magic member of gralloc_handle_t as const.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Mark magic member of gralloc_handle_t as const.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: Add version variable to gralloc_handle_t
The version variable will be used for versioning of this
struct and the corresponding accessor functions.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
The version variable will be used for versioning of this
struct and the corresponding accessor functions.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
android: Move gralloc handle struct to libdrm
This struct is used in mesa and drm_hwcomposer.
Versions of if have been implemented in several grallocs:
drm_gralloc, gbm_gralloc, minigbm and intel-minigbm.
Other than the 1:1 move of the struct a new generic name
has been chosen and variables have had comments added to them.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
This struct is used in mesa and drm_hwcomposer.
Versions of if have been implemented in several grallocs:
drm_gralloc, gbm_gralloc, minigbm and intel-minigbm.
Other than the 1:1 move of the struct a new generic name
has been chosen and variables have had comments added to them.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
amdgpu: Add amdgpu_query_sw_info to amdgpu-symbol-check
Fixes make check. Trivial.
Fixes make check. Trivial.
amdgpu: add amdgpu_query_sw_info for querying high bits of 32-bit address space
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
meson: include headers in root directory in ext_libdrm
Which is used in wraps.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Which is used in wraps.
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
amdgpu: clean up non list code path for vamgr v2
v2: Add missing "goto out"
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
v2: Add missing "goto out"
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Revert "amdgpu: clean up non list code path for vamgr"
This reverts commit 41b94a3fb6e87d057fad78568d920d29489e5060.
It caused crashes with radeonsi in at least glxgears and Xorg.
This reverts commit 41b94a3fb6e87d057fad78568d920d29489e5060.
It caused crashes with radeonsi in at least glxgears and Xorg.
tests/amdgpu: add bo eviction test
for(( i=1; i < 100; i++))
do
echo "Hello, Welcome $i times "
sudo ./amdgpu_test -s 1 -t 5
done
with above stricpt, run in two terminals, will reproduce Felix's swap leeking issue.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
for(( i=1; i < 100; i++))
do
echo "Hello, Welcome $i times "
sudo ./amdgpu_test -s 1 -t 5
done
with above stricpt, run in two terminals, will reproduce Felix's swap leeking issue.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
amdgpu: clean up non list code path for vamgr
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
amdgpu: fix inefficient vamgr algorithm
issue: UMD allocates top 4GB, but don't do anything, just reserve top 4GB space,
but the performance of VP13 drops from 162fps to 99fps.
root cause:
our va hole list of vamgr is too long by time going.
fix:
reusing old hole as much as possible can make the list shortest.
result:
performance recovers as non-list path, next patch will remove non-list code path.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
issue: UMD allocates top 4GB, but don't do anything, just reserve top 4GB space,
but the performance of VP13 drops from 162fps to 99fps.
root cause:
our va hole list of vamgr is too long by time going.
fix:
reusing old hole as much as possible can make the list shortest.
result:
performance recovers as non-list path, next patch will remove non-list code path.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
fix return value for syncobj wait
otherwise -ETIME is missed.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
otherwise -ETIME is missed.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>