1 From e7b779035f0d7ff1ba5bf59ea2f314f364493928 Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Thu, 4 May 2023 10:42:06 +0200
4 Subject: [PATCH 06/33] [agl] Don't use DRI for renesas
6 This adds the use_dri flag that defauls to true and
7 can be disabled if we are building CEF using ozone + wayland
9 Upstream-Status: Inappropriate, specific to the renesas boards supported
11 Signed-off-by: Roger Zanoni <rzanoni@igalia.com>
13 content/gpu/BUILD.gn | 4 ++--
14 media/gpu/sandbox/BUILD.gn | 5 +++--
15 media/media_options.gni | 3 +++
16 3 files changed, 8 insertions(+), 4 deletions(-)
18 diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
19 index 93559f6092c7a..cef8415be7ab1 100644
20 --- a/content/gpu/BUILD.gn
21 +++ b/content/gpu/BUILD.gn
22 @@ -139,8 +139,8 @@ target(link_target_type, "gpu_sources") {
25 # Use DRI on desktop Linux builds.
26 - if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
28 + if (use_dri && current_cpu != "s390x" && current_cpu != "ppc64" &&
29 + is_linux && !is_castos) {
30 configs += [ "//build/config/linux/dri" ]
33 diff --git a/media/gpu/sandbox/BUILD.gn b/media/gpu/sandbox/BUILD.gn
34 index cfcb7fa80ef89..6ba37d06b29c8 100644
35 --- a/media/gpu/sandbox/BUILD.gn
36 +++ b/media/gpu/sandbox/BUILD.gn
39 import("//build/config/chromeos/ui_mode.gni")
40 import("//media/gpu/args.gni")
41 +import("//media/media_options.gni")
43 source_set("sandbox") {
45 @@ -30,8 +31,8 @@ source_set("sandbox") {
47 deps += [ "//media/gpu/v4l2" ]
49 - if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
51 + if (use_dri && (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux &&
54 configs += [ "//build/config/linux/dri" ]
56 diff --git a/media/media_options.gni b/media/media_options.gni
57 index 61d5046d0cb0e..4898c9034d448 100644
58 --- a/media/media_options.gni
59 +++ b/media/media_options.gni
60 @@ -117,6 +117,9 @@ declare_args() {
61 # Enable inclusion of VVC/H.266 parser/demuxer, and also enable VVC/H.266 decoding
62 # with hardware acceleration provided by platform. Disabled by default for all builds.
63 enable_platform_vvc = false
65 + # used to disable dri on renesas boards
69 # Use another declare_args() to allow dependence on args defined above.