Skip to content

Commit 8e1071c

Browse files
committed
update rpi4 to r96 with hdmi audio issue
1 parent 7376fa4 commit 8e1071c

File tree

71 files changed

+29050
-500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+29050
-500
lines changed

baseboard-rpi3/chromeos-base/baseboard-bsp/files/powerd/never-suspend.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ description "Setup power manager policy to block suspend"
22
author "yang@fydeos.io"
33

44
start on started system-services or started smbproviderd
5-
5+
oom score -100
66

77
script
88
logger -t "${UPSTART_JOB}" "setup power manager policy to block suspend"

baseboard-rpi3/chromeos-base/bluetooth-input-fix/files/bluetooth-input-fix.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ author "yang@fydeos.io"
77

88
start on started udev-boot
99
task
10+
oom score -100
1011

1112
exec modprobe -q uhid

baseboard-rpi3/media-libs/libcamera/libcamera-0.0.1-r489.ebuild renamed to baseboard-rpi3/media-libs/libcamera/libcamera-0.0.1-r662.ebuild

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33

44
EAPI=7
55

6-
CXXEXCEPTIONS_FLAGS="-fno-exceptions"
7-
CROS_WORKON_COMMIT="e56f1f493560e0b641bbe36a528a13767817afed"
8-
CROS_WORKON_TREE="c8e597e8dc3dc91766fd0b28b32b1588bab63173"
6+
CROS_WORKON_COMMIT="962df634bd0afe12e6f38464f5e602cf1460c430"
7+
CROS_WORKON_TREE="c66f4eadb3ce21b120447bb910bc9606c3fc499b"
98
CROS_WORKON_PROJECT="chromiumos/third_party/libcamera"
10-
CROS_WORKON_INCREMENTAL_BUILD="1"
9+
#CROS_WORKON_INCREMENTAL_BUILD="1"
1110

12-
inherit cros-workon meson
11+
inherit cros-camera cros-workon meson
1312

1413
DESCRIPTION="Camera support library for Linux"
1514
HOMEPAGE="https://www.libcamera.org"
@@ -23,11 +22,13 @@ RDEPEND="
2322
chromeos-base/cros-camera-libs
2423
dev? ( dev-libs/libevent[threads] )
2524
dev-libs/libyaml
25+
media-libs/libcamera-configs
2626
media-libs/libjpeg-turbo
2727
media-libs/libexif
2828
>=net-libs/gnutls-3.3:=
2929
media-libs/libyuv
3030
udev? ( virtual/libudev )
31+
dev-libs/boost
3132
"
3233

3334
DEPEND="
@@ -57,10 +58,11 @@ src_configure() {
5758
-Dandroid="enabled"
5859
-Dandroid_platform="cros"
5960
-Dpipelines="$(pipeline_list "${pipelines[@]}")"
61+
-Dipas="raspberrypi"
6062
--buildtype "$(usex debug debug plain)"
6163
--sysconfdir /etc/camera
6264
)
63-
cros_enable_cxx_exceptions
65+
# append-flags '-Wno-error=shadow' '-std=c99'
6466
meson_src_configure
6567
}
6668

@@ -71,7 +73,7 @@ src_compile() {
7173
src_install() {
7274
meson_src_install
7375

74-
dosym ../libcamera.so "/usr/$(get_libdir)/camera_hal/libcamera.so"
76+
cros-camera_dohal "${D}/usr/$(get_libdir)/libcamera-hal.so" libcamera-hal.so
7577

7678
dostrip -x "/usr/$(get_libdir)/libcamera/"
7779
}

baseboard-rpi3/media-libs/libcamera/libcamera-9999.ebuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ EAPI=7
66
CROS_WORKON_PROJECT="chromiumos/third_party/libcamera"
77
CROS_WORKON_INCREMENTAL_BUILD="1"
88

9-
inherit cros-workon meson
9+
inherit cros-camera cros-workon meson
1010

1111
DESCRIPTION="Camera support library for Linux"
1212
HOMEPAGE="https://www.libcamera.org"
@@ -67,7 +67,7 @@ src_compile() {
6767
src_install() {
6868
meson_src_install
6969

70-
dosym ../libcamera.so "/usr/$(get_libdir)/camera_hal/libcamera.so"
70+
cros-camera_dohal "${D}/usr/$(get_libdir)/libcamera-hal.so" libcamera-hal.so
7171

7272
dostrip -x "/usr/$(get_libdir)/libcamera/"
7373
}

baseboard-rpi3/media-libs/mesa/OWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
anholt@chromium.org
2+
chadversary@chromium.org
3+
ihf@chromium.org
4+
hoegsberg@chromium.org
5+
marcheu@chromium.org
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
From 5b6f9e4821a48a1abedf6082ab7a7cb06e7b7905 Mon Sep 17 00:00:00 2001
2+
From: John Bates <jbates@chromium.org>
3+
Date: Tue, 13 Oct 2020 14:17:53 -0700
4+
Subject: [PATCH] BACKPORT: disk_cache: build option for disabled-by-default
5+
6+
On some systems it is problematic to have the shader cache enabled
7+
by default. This adds a build option to support the disk cache but
8+
keep it disabled unless the environment variable
9+
MESA_GLSL_CACHE_DISABLE=false.
10+
11+
For example, on Chrome OS, Chrome already has it's own shader
12+
disk cache implementation so it disables the mesa feature. Tests
13+
do not want the shader disk cache enabled because it can cause
14+
inconsistent performance results and the default 1GB for the
15+
disk cache could lead to problems that require more effort to
16+
work around. The Mesa shader disk cache is useful for VMs though,
17+
where it is easy to configure the feature with environment
18+
variables. With the current version of Mesa, Chrome OS would need
19+
to have a system-wide environment variable to disable the disk
20+
cache everywhere except where needed. More elegant to just build
21+
Mesa with the cache feature disabled by default.
22+
23+
Reviewed-by: Rob Clark <robdclark@chromium.org>
24+
Reviewed-by: Eric Anholt <eric@anholt.net>
25+
---
26+
docs/envvars.rst | 4 +++-
27+
meson.build | 5 ++++-
28+
meson_options.txt | 4 ++--
29+
src/compiler/glsl/tests/cache_test.c | 21 +++++++++++++++++++++
30+
src/util/disk_cache.c | 8 +++++++-
31+
5 files changed, 37 insertions(+), 5 deletions(-)
32+
33+
diff --git a/docs/envvars.rst b/docs/envvars.rst
34+
index 76397eec041..872463e7ccb 100644
35+
--- a/docs/envvars.rst
36+
+++ b/docs/envvars.rst
37+
@@ -141,7 +141,9 @@ Core Mesa environment variables
38+
features of the given language version if it's higher than what's
39+
normally reported. (for developers only)
40+
``MESA_GLSL_CACHE_DISABLE``
41+
- if set to ``true``, disables the GLSL shader cache
42+
+ if set to ``true``, disables the GLSL shader cache. If set to
43+
+ ``false``, enables the GLSL shader cache when it is disabled by
44+
+ default.
45+
``MESA_GLSL_CACHE_MAX_SIZE``
46+
if set, determines the maximum size of the on-disk cache of compiled
47+
GLSL programs. Should be set to a number optionally followed by
48+
diff --git a/meson.build b/meson.build
49+
index e8b641c6b1d..46844e8a1e3 100644
50+
--- a/meson.build
51+
+++ b/meson.build
52+
@@ -901,11 +901,14 @@ elif _shader_cache == 'false'
53+
endif
54+
if _shader_cache != 'disabled'
55+
if host_machine.system() == 'windows'
56+
- if _shader_cache == 'enabled'
57+
+ if ['enabled', 'default-disabled'].contains(_shader_cache)
58+
error('Shader Cache does not currently work on Windows')
59+
endif
60+
else
61+
pre_args += '-DENABLE_SHADER_CACHE'
62+
+ if _shader_cache == 'default-disabled'
63+
+ pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
64+
+ endif
65+
with_shader_cache = true
66+
endif
67+
endif
68+
diff --git a/meson_options.txt b/meson_options.txt
69+
index 2d39d13b6ad..ed93d545cc0 100644
70+
--- a/meson_options.txt
71+
+++ b/meson_options.txt
72+
@@ -173,8 +173,8 @@ option(
73+
'shader-cache',
74+
type : 'combo',
75+
value : 'auto',
76+
- choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
77+
- description : 'Build with on-disk shader cache support'
78+
+ choices : ['auto', 'true', 'false', 'enabled', 'disabled', 'default-disabled'],
79+
+ description : 'Build with on-disk shader cache support. If set to default-disabled, the feature is only activated when environment variable MESA_GLSL_CACHE_DISABLE is set to false'
80+
)
81+
option(
82+
'vulkan-icd-dir',
83+
diff --git a/src/compiler/glsl/tests/cache_test.c b/src/compiler/glsl/tests/cache_test.c
84+
index a1db67a5845..926b5e458cc 100644
85+
--- a/src/compiler/glsl/tests/cache_test.c
86+
+++ b/src/compiler/glsl/tests/cache_test.c
87+
@@ -193,6 +193,19 @@ test_disk_cache_create(void)
88+
89+
unsetenv("MESA_GLSL_CACHE_DISABLE");
90+
91+
+#ifdef SHADER_CACHE_DISABLE_BY_DEFAULT
92+
+ /* With SHADER_CACHE_DISABLE_BY_DEFAULT, ensure that with
93+
+ * MESA_GLSL_CACHE_DISABLE set to nothing, disk_cache_create returns NULL.
94+
+ */
95+
+ unsetenv("MESA_GLSL_CACHE_DISABLE");
96+
+ cache = disk_cache_create("test", "make_check", 0);
97+
+ expect_null(cache, "disk_cache_create with MESA_GLSL_CACHE_DISABLE unset "
98+
+ " and SHADER_CACHE_DISABLE_BY_DEFAULT build option");
99+
+
100+
+ /* For remaining tests, ensure that the cache is enabled. */
101+
+ setenv("MESA_GLSL_CACHE_DISABLE", "false", 1);
102+
+#endif /* SHADER_CACHE_DISABLE_BY_DEFAULT */
103+
+
104+
/* For the first real disk_cache_create() clear these environment
105+
* variables to test creation of cache in home directory.
106+
*/
107+
@@ -266,6 +279,10 @@ test_put_and_get(void)
108+
uint8_t one_KB_key[20], one_MB_key[20];
109+
int count;
110+
111+
+#ifdef SHADER_CACHE_DISABLE_BY_DEFAULT
112+
+ setenv("MESA_GLSL_CACHE_DISABLE", "false", 1);
113+
+#endif /* SHADER_CACHE_DISABLE_BY_DEFAULT */
114+
+
115+
cache = disk_cache_create("test", "make_check", 0);
116+
117+
disk_cache_compute_key(cache, blob, sizeof(blob), blob_key);
118+
@@ -437,6 +454,10 @@ test_put_key_and_get_key(void)
119+
{ 0, 1, 42, 43, 44, 45, 46, 47, 48, 49,
120+
50, 55, 52, 53, 54, 55, 56, 57, 58, 59};
121+
122+
+#ifdef SHADER_CACHE_DISABLE_BY_DEFAULT
123+
+ setenv("MESA_GLSL_CACHE_DISABLE", "false", 1);
124+
+#endif /* SHADER_CACHE_DISABLE_BY_DEFAULT */
125+
+
126+
cache = disk_cache_create("test", "make_check", 0);
127+
128+
/* First test that disk_cache_has_key returns false before disk_cache_put_key */
129+
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
130+
index a92d621927a..90310b85463 100644
131+
--- a/src/util/disk_cache.c
132+
+++ b/src/util/disk_cache.c
133+
@@ -210,6 +210,12 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
134+
uint8_t cache_version = CACHE_VERSION;
135+
size_t cv_size = sizeof(cache_version);
136+
137+
+#ifdef SHADER_CACHE_DISABLE_BY_DEFAULT
138+
+ bool disable_by_default = true;
139+
+#else
140+
+ bool disable_by_default = false;
141+
+#endif
142+
+
143+
/* If running as a users other than the real user disable cache */
144+
if (geteuid() != getuid())
145+
return NULL;
146+
@@ -220,7 +226,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
147+
goto fail;
148+
149+
/* At user request, disable shader cache entirely. */
150+
- if (env_var_as_boolean("MESA_GLSL_CACHE_DISABLE", false))
151+
+ if (env_var_as_boolean("MESA_GLSL_CACHE_DISABLE", disable_by_default))
152+
goto fail;
153+
154+
cache = rzalloc(NULL, struct disk_cache);
155+
--
156+
2.28.0.1011.ga647a8990f-goog
157+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From df76963a5cd56c677f189ad89d75935a76fca090 Mon Sep 17 00:00:00 2001
2+
From: Robin Ole Heinemann <robin.ole.heinemann@t-online.de>
3+
Date: Sun, 13 Dec 2020 02:22:57 +0100
4+
Subject: [PATCH] anv: Add DRM_RDWR flag in anv_gem_handle_to_fd
5+
6+
The DRM_RDWR flag is needed for mmap with PROT_WRITE to work.
7+
8+
Cc: mesa-stable
9+
Signed-off-by: Robin Ole Heinemann <robin.ole.heinemann@gmail.com>
10+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
11+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8075>
12+
---
13+
src/intel/vulkan/anv_gem.c | 2 +-
14+
1 file changed, 1 insertion(+), 1 deletion(-)
15+
16+
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
17+
index 81e22428e18..4c43f5f77b4 100644
18+
--- a/src/intel/vulkan/anv_gem.c
19+
+++ b/src/intel/vulkan/anv_gem.c
20+
@@ -437,7 +437,7 @@ anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle)
21+
{
22+
struct drm_prime_handle args = {
23+
.handle = gem_handle,
24+
- .flags = DRM_CLOEXEC,
25+
+ .flags = DRM_CLOEXEC | DRM_RDWR,
26+
};
27+
28+
int ret = gen_ioctl(device->fd, DRM_IOCTL_PRIME_HANDLE_TO_FD, &args);
29+
--
30+
2.29.2
31+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 276e3927b54292b2c0687b1f9bbcc0d69e314de7 Mon Sep 17 00:00:00 2001
2+
From: Abhishek Kumar <abhishek4.kumar@intel.com>
3+
Date: Mon, 18 Jan 2021 10:24:23 +0530
4+
Subject: [PATCH 002/188] intel: change urb max shader geometry for CML GT1
5+
6+
Below deqp cts failure is seen on CML GT1 only , GT2 all test
7+
passes, changing the max shader geometry to 256 (previous 640)
8+
fixes all failure tests.Similar issue on BDW GT1
9+
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3173
10+
11+
dEQP-GLES31.functional.geometry_shading.layered.
12+
render_with_default_layer_cubemap
13+
render_with_default_layer_3d
14+
render_with_default_layer_2d_array
15+
16+
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4102
17+
18+
Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
19+
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
20+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550>
21+
---
22+
src/intel/dev/gen_device_info.c | 1 +
23+
1 file changed, 1 insertion(+)
24+
25+
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
26+
index 5e26dc10b8c7..242251564658 100644
27+
--- a/src/intel/dev/gen_device_info.c
28+
+++ b/src/intel/dev/gen_device_info.c
29+
@@ -764,6 +764,7 @@ static const struct gen_device_info gen_device_info_cfl_gt1 = {
30+
* leading to some vertices to go missing if we use too much URB.
31+
*/
32+
.urb.max_entries[MESA_SHADER_VERTEX] = 928,
33+
+ .urb.max_entries[MESA_SHADER_GEOMETRY] = 256,
34+
.simulator_id = 24,
35+
};
36+
static const struct gen_device_info gen_device_info_cfl_gt2 = {
37+
--
38+
2.7.4
39+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 26c9574bdb16d7f6cbe06cd5ef5d1ce258afc1ba Mon Sep 17 00:00:00 2001
2+
From: Abhishek Kumar <abhishek4.kumar@intel.com>
3+
Date: Tue, 26 Jan 2021 23:50:13 +0530
4+
Subject: [PATCH] intel: change urb max shader geometry for KBL GT1
5+
6+
Below Deqp CTS failure is seen on KBL GT1(tested on 0x5906) only ,
7+
GT2 all test passes, changing the max shader geometry to 256
8+
(previous 640) fixes all failure tests.Similar issues on
9+
CML GT1 (Gen9) is fixed
10+
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8550
11+
12+
dEQP-GLES31.functional.geometry_shading.layered.
13+
render_with_default_layer_cubemap
14+
render_with_default_layer_3d
15+
render_with_default_layer_2d_array
16+
17+
Signed-off-by: Abhishek Kumar <abhishek4.kumar@intel.com>
18+
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
19+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8731>
20+
---
21+
src/intel/dev/gen_device_info.c | 1 +
22+
1 file changed, 1 insertion(+)
23+
24+
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
25+
index 242251564658..b29cc3d51a50 100644
26+
--- a/src/intel/dev/gen_device_info.c
27+
+++ b/src/intel/dev/gen_device_info.c
28+
@@ -675,6 +675,7 @@ static const struct gen_device_info gen_device_info_kbl_gt1 = {
29+
* leading to some vertices to go missing if we use too much URB.
30+
*/
31+
.urb.max_entries[MESA_SHADER_VERTEX] = 928,
32+
+ .urb.max_entries[MESA_SHADER_GEOMETRY] = 256,
33+
.simulator_id = 16,
34+
};
35+
36+
--
37+
2.17.1
38+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mesa-21.1.ebuild

0 commit comments

Comments
 (0)