Skip to content

Commit ff34b72

Browse files
committed
update to chromiumos r70
1 parent 481c0f2 commit ff34b72

File tree

42 files changed

+15751
-17
lines changed

Some content is hidden

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

42 files changed

+15751
-17
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ This document describes how to build and run Google Chromium OS on Raspberry Pi
4545

4646
This overlay and the document has been tested against Raspberry Pi 3b by the FydeOS team. It doesn't work on Pi 2.
4747

48+
## Change Logs
49+
50+
### Update to ChromiumOS R70
51+
* The overlays is move to fit for ChromiumOS R70.
52+
* Fix poor graphic performance (full hw accelecrate).
53+
* Add firmware for RPI 3B+, patches kernel for brcm, but it still doesn't work (so sad).
54+
* The image released is for testing usage, if you want more efficient, build packages with "cros_embedded" (or uncomment the USE flags in overlay-rpi3/make.conf)
55+
* Some things need explored by yourself
56+
4857
## About this repository
4958
The code and document in this repository is the result of works by the people of the Flint team. We previously worked on this overlay internally and released a few disk images for Raspberry Pi to the public. Now we open this to the public.
5059

baseboard-rpi3/media-libs/mesa/files/17.0-glcpp-Hack-to-handle-expressions-in-line-di.patch

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ Trybot-Ready: Haixia Shi <[email protected]>
5151
(cherry picked from commit 18675d69bcd2a66483fcfc15f4c5fa5db4c257af)
5252
---
5353
src/compiler/glsl/glcpp/glcpp-parse.y | 21 ++++++++++++++++++---
54-
1 file changed, 19 insertions(+), 3 deletions(-)
54+
1 file changed, 18 insertions(+), 3 deletions(-)
55+
5556
diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
56-
index 913bce1fde..c58c8572ed 100644
57+
index 913bce1fde8b..11fbc3bcc5ff 100644
5758
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
5859
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
5960
@@ -225,10 +225,12 @@ expanded_line:
@@ -73,8 +74,8 @@ index 913bce1fde..c58c8572ed 100644
7374
| LINE_EXPANDED integer_constant integer_constant NEWLINE {
7475
parser->has_new_line_number = 1;
7576
@@ -239,6 +241,19 @@ expanded_line:
76-
"#line %" PRIiMAX " %" PRIiMAX "\n",
77-
$2, $3);
77+
"#line %" PRIiMAX " %" PRIiMAX "\n",
78+
$2, $3);
7879
}
7980
+| LINE_EXPANDED '(' expression ')' '(' expression ')' NEWLINE {
8081
+ if (parser->is_gles && $3.undefined_macro)
@@ -93,5 +94,5 @@ index 913bce1fde..c58c8572ed 100644
9394

9495
define:
9596
--
96-
2.14.2
97+
1.9.1
9798

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
commit f94681b6e2f815f19ca817382848a878a77b44c9
2+
Author: David Riley <[email protected]>
3+
Date: Tue Jul 17 17:12:05 2018 -0700
4+
5+
egl/surfaceless: Allow DRMless fallback.
6+
7+
Allow platform_surfaceless to use swrast even if DRM is not available.
8+
To be used to allow a fuzzer for virgl to be run on a jailed VM without
9+
hardware GL or DRM support.
10+
11+
Reviewed-by: Eric Engestrom <[email protected]>
12+
Reviewed-by: Chad Versace <[email protected]>
13+
Signed-off-by: David Riley <[email protected]>
14+
15+
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
16+
index 54bafaee0e..bfc8fb99ea 100644
17+
--- a/src/egl/drivers/dri2/platform_surfaceless.c
18+
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
19+
@@ -293,6 +293,7 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
20+
int fd;
21+
int i;
22+
23+
+ /* Attempt to find DRM device. */
24+
for (i = 0; i < limit; ++i) {
25+
char *card_path;
26+
if (asprintf(&card_path, DRM_RENDER_DEV_NAME, DRM_DIR_NAME, base + i) < 0)
27+
@@ -326,6 +327,24 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
28+
dri2_dpy->loader_extensions = NULL;
29+
}
30+
31+
+ /* No DRM device, so attempt to fall back to software path w/o DRM. */
32+
+ if (swrast) {
33+
+ _eglLog(_EGL_DEBUG, "Falling back to surfaceless swrast without DRM.");
34+
+ dri2_dpy->fd = -1;
35+
+ dri2_dpy->driver_name = strdup("swrast");
36+
+ if (!dri2_dpy->driver_name) {
37+
+ return false;
38+
+ }
39+
+
40+
+ if (dri2_load_driver_swrast(dpy)) {
41+
+ dri2_dpy->loader_extensions = swrast_loader_extensions;
42+
+ return true;
43+
+ }
44+
+
45+
+ free(dri2_dpy->driver_name);
46+
+ dri2_dpy->driver_name = NULL;
47+
+ }
48+
+
49+
return false;
50+
}
51+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
commit b169b84be62b362abb1c94f251a679abba03fd14
2+
Author: David Riley <[email protected]>
3+
Date: Tue Jul 17 17:12:04 2018 -0700
4+
5+
egl/surfaceless: Define DRI_SWRastLoader extension when using swrast.
6+
7+
Signed-off-by: David Riley <[email protected]>
8+
Reviewed-by: Eric Engestrom <[email protected]>
9+
[chadv: Dropped spurious hunk]
10+
Reviewed-by: Chad Versace <[email protected]>
11+
12+
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
13+
index a0348a5e95..54bafaee0e 100644
14+
--- a/src/egl/drivers/dri2/platform_surfaceless.c
15+
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
16+
@@ -260,6 +260,13 @@ static const __DRIimageLoaderExtension image_loader_extension = {
17+
.flushFrontBuffer = surfaceless_flush_front_buffer,
18+
};
19+
20+
+static const __DRIswrastLoaderExtension swrast_loader_extension = {
21+
+ .base = { __DRI_SWRAST_LOADER, 1 },
22+
+ .getDrawableInfo = NULL,
23+
+ .putImage = NULL,
24+
+ .getImage = NULL,
25+
+};
26+
+
27+
#define DRM_RENDER_DEV_NAME "%s/renderD%d"
28+
29+
static const __DRIextension *image_loader_extensions[] = {
30+
@@ -269,6 +276,14 @@ static const __DRIextension *image_loader_extensions[] = {
31+
NULL,
32+
};
33+
34+
+static const __DRIextension *swrast_loader_extensions[] = {
35+
+ &swrast_loader_extension.base,
36+
+ &image_loader_extension.base,
37+
+ &image_lookup_extension.base,
38+
+ &use_invalidate.base,
39+
+ NULL,
40+
+};
41+
+
42+
static bool
43+
surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
44+
{
45+
@@ -288,10 +303,13 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
46+
if (fd < 0)
47+
continue;
48+
49+
- if (swrast)
50+
+ if (swrast) {
51+
dri2_dpy->driver_name = strdup("kms_swrast");
52+
- else
53+
+ dri2_dpy->loader_extensions = swrast_loader_extensions;
54+
+ } else {
55+
dri2_dpy->driver_name = loader_get_driver_for_fd(fd);
56+
+ dri2_dpy->loader_extensions = image_loader_extensions;
57+
+ }
58+
if (!dri2_dpy->driver_name) {
59+
close(fd);
60+
continue;
61+
@@ -305,6 +323,7 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
62+
dri2_dpy->fd = -1;
63+
free(dri2_dpy->driver_name);
64+
dri2_dpy->driver_name = NULL;
65+
+ dri2_dpy->loader_extensions = NULL;
66+
}
67+
68+
return false;
69+
@@ -338,8 +357,6 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
70+
goto cleanup;
71+
}
72+
73+
- dri2_dpy->loader_extensions = image_loader_extensions;
74+
-
75+
if (!dri2_create_screen(disp)) {
76+
err = "DRI2: failed to create screen";
77+
goto cleanup;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 99c6cae2278011309b7ca3d4735c7b341cbb4eef Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <[email protected]>
3+
Date: Sat, 30 Jun 2018 00:57:08 -0400
4+
Subject: glsl/cache: save and restore ExternalSamplersUsed
5+
6+
Shaders that need special code for external samplers were broken if
7+
they were loaded from the cache.
8+
9+
10+
Reviewed-by: Timothy Arceri <[email protected]>
11+
---
12+
src/compiler/glsl/serialize.cpp | 2 ++
13+
1 file changed, 2 insertions(+)
14+
15+
diff --git a/src/compiler/glsl/serialize.cpp b/src/compiler/glsl/serialize.cpp
16+
index 9c21453..889038f 100644
17+
--- a/src/compiler/glsl/serialize.cpp
18+
+++ b/src/compiler/glsl/serialize.cpp
19+
@@ -1044,6 +1044,7 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
20+
blob_write_bytes(metadata, glprog->sh.SamplerTargets,
21+
sizeof(glprog->sh.SamplerTargets));
22+
blob_write_uint32(metadata, glprog->ShadowSamplers);
23+
+ blob_write_uint32(metadata, glprog->ExternalSamplersUsed);
24+
25+
blob_write_bytes(metadata, glprog->sh.ImageAccess,
26+
sizeof(glprog->sh.ImageAccess));
27+
@@ -1096,6 +1097,7 @@ read_shader_metadata(struct blob_reader *metadata,
28+
blob_copy_bytes(metadata, (uint8_t *) glprog->sh.SamplerTargets,
29+
sizeof(glprog->sh.SamplerTargets));
30+
glprog->ShadowSamplers = blob_read_uint32(metadata);
31+
+ glprog->ExternalSamplersUsed = blob_read_uint32(metadata);
32+
33+
blob_copy_bytes(metadata, (uint8_t *) glprog->sh.ImageAccess,
34+
sizeof(glprog->sh.ImageAccess));
35+
--
36+
cgit v1.1
37+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From 9410cd53c376be791dc40aad3ddfc659a3d8313b Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <[email protected]>
3+
Date: Wed, 20 Jun 2018 18:43:36 -0500
4+
Subject: radeonsi: fix occlusion queries with 16x AA without FBO attachments
5+
on Stoney
6+
7+
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
8+
---
9+
src/gallium/drivers/radeonsi/si_state.c | 10 +++++++++-
10+
1 file changed, 9 insertions(+), 1 deletion(-)
11+
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
12+
index 675b1adbe6..35168b8c6f 100644
13+
--- a/src/gallium/drivers/radeonsi/si_state.c
14+
+++ b/src/gallium/drivers/radeonsi/si_state.c
15+
@@ -1373,9 +1373,17 @@ static void si_emit_db_render_state(struct si_context *sctx)
16+
bool perfect = sctx->num_perfect_occlusion_queries > 0;
17+
18+
if (sctx->chip_class >= CIK) {
19+
+ unsigned log_sample_rate = sctx->framebuffer.log_samples;
20+
+
21+
+ /* Stoney doesn't increment occlusion query counters
22+
+ * if the sample rate is 16x. Use 8x sample rate instead.
23+
+ */
24+
+ if (sctx->family == CHIP_STONEY)
25+
+ log_sample_rate = MIN2(log_sample_rate, 3);
26+
+
27+
radeon_emit(cs,
28+
S_028004_PERFECT_ZPASS_COUNTS(perfect) |
29+
- S_028004_SAMPLE_RATE(sctx->framebuffer.log_samples) |
30+
+ S_028004_SAMPLE_RATE(log_sample_rate) |
31+
S_028004_ZPASS_ENABLE(1) |
32+
S_028004_SLICE_EVEN_ENABLE(1) |
33+
S_028004_SLICE_ODD_ENABLE(1));
34+
--
35+
cgit v1.1
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
From 28b8c18d841795dc158233b7aaf986c7f73068ae Mon Sep 17 00:00:00 2001
2+
From: Bas Nieuwenhuizen <[email protected]>
3+
Date: Tue, 24 Jul 2018 14:57:42 +0200
4+
Subject: [PATCH] radv: Still enable inmemory & API level caching if disk cache
5+
is not enabled.
6+
7+
That we don't have a background disk cache does not mean we should
8+
prevent the app caching anything.
9+
10+
11+
Reviewed-by: Samuel Pitoiset <[email protected]>
12+
---
13+
src/amd/vulkan/radv_pipeline_cache.c | 3 +--
14+
1 file changed, 1 insertion(+), 2 deletions(-)
15+
16+
diff --git a/src/amd/vulkan/radv_pipeline_cache.c b/src/amd/vulkan/radv_pipeline_cache.c
17+
index 6858d37eba8..7e2c305b1a0 100644
18+
--- a/src/amd/vulkan/radv_pipeline_cache.c
19+
+++ b/src/amd/vulkan/radv_pipeline_cache.c
20+
@@ -248,7 +248,6 @@ radv_is_cache_disabled(struct radv_device *device)
21+
* MESA_GLSL_CACHE_DISABLE=1, and when VK_AMD_shader_info is requested.
22+
*/
23+
return (device->instance->debug_flags & RADV_DEBUG_NO_CACHE) ||
24+
- !device->physical_device->disk_cache ||
25+
device->keep_shader_info;
26+
}
27+
28+
@@ -271,7 +270,7 @@ radv_create_shader_variants_from_pipeline_cache(struct radv_device *device,
29+
/* Don't cache when we want debug info, since this isn't
30+
* present in the cache.
31+
*/
32+
- if (radv_is_cache_disabled(device)) {
33+
+ if (radv_is_cache_disabled(device) || !device->physical_device->disk_cache) {
34+
pthread_mutex_unlock(&cache->mutex);
35+
return false;
36+
}
37+
--
38+
2.18.0.233.g985f88cf7e-goog
39+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
From patchwork Wed Jul 18 12:01:49 2018
2+
Content-Type: text/plain; charset="utf-8"
3+
MIME-Version: 1.0
4+
Content-Transfer-Encoding: 7bit
5+
Subject: util/disk_cache: Fix disk_cache_get_function_timestamp with disabled
6+
cache.
7+
From: Bas Nieuwenhuizen <[email protected]>
8+
X-Patchwork-Id: 239597
9+
Message-Id: <[email protected]>
10+
11+
Cc: Bas Nieuwenhuizen <[email protected]>
12+
Date: Wed, 18 Jul 2018 14:01:49 +0200
13+
14+
radv always needs it, so just check the header instead. Also
15+
do not declare the function if the variable is not set, so we
16+
get a nice compile error instead of failing to open a device
17+
at runtime.
18+
19+
Fixes: b87ef9e606a "util: fix MSVC build issue in disk_cache.h"
20+
---
21+
configure.ac | 1 +
22+
meson.build | 2 +-
23+
src/util/disk_cache.h | 8 +++-----
24+
3 files changed, 5 insertions(+), 6 deletions(-)
25+
26+
diff --git a/configure.ac b/configure.ac
27+
index c946454cfae..ffb8424a07b 100644
28+
--- a/configure.ac
29+
+++ b/configure.ac
30+
@@ -872,6 +872,7 @@ AC_HEADER_MAJOR
31+
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
32+
AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
33+
AC_CHECK_HEADERS([endian.h])
34+
+AC_CHECK_HEADER([dlfcn.h], [DEFINES="$DEFINES -DHAVE_DLFCN_H"])
35+
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
36+
AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"])
37+
AC_CHECK_FUNC([timespec_get], [DEFINES="$DEFINES -DHAVE_TIMESPEC_GET"])
38+
diff --git a/meson.build b/meson.build
39+
index e05645cbf39..86a4a4ce6da 100644
40+
--- a/meson.build
41+
+++ b/meson.build
42+
@@ -960,7 +960,7 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major')
43+
pre_args += '-DMAJOR_IN_MKDEV'
44+
endif
45+
46+
-foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h']
47+
+foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h']
48+
if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
49+
pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
50+
endif
51+
diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h
52+
index f84840fb5ca..50bd9f41ac4 100644
53+
--- a/src/util/disk_cache.h
54+
+++ b/src/util/disk_cache.h
55+
@@ -24,7 +24,7 @@
56+
#ifndef DISK_CACHE_H
57+
#define DISK_CACHE_H
58+
59+
-#ifdef ENABLE_SHADER_CACHE
60+
+#ifdef HAVE_DLFCN_H
61+
#include <dlfcn.h>
62+
#endif
63+
#include <assert.h>
64+
@@ -88,10 +88,10 @@ disk_cache_format_hex_id(char *buf, const uint8_t *hex_id, unsigned size)
65+
return buf;
66+
}
67+
68+
+#ifdef HAVE_DLFCN_H
69+
static inline bool
70+
disk_cache_get_function_timestamp(void *ptr, uint32_t* timestamp)
71+
{
72+
-#ifdef ENABLE_SHADER_CACHE
73+
Dl_info info;
74+
struct stat st;
75+
if (!dladdr(ptr, &info) || !info.dli_fname) {
76+
@@ -102,10 +102,8 @@ disk_cache_get_function_timestamp(void *ptr, uint32_t* timestamp)
77+
}
78+
*timestamp = st.st_mtime;
79+
return true;
80+
-#else
81+
- return false;
82+
-#endif
83+
}
84+
+#endif
85+
86+
/* Provide inlined stub functions if the shader cache is disabled. */
87+

0 commit comments

Comments
 (0)