Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1091)

Unified Diff: content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
index 82a91b38021f829167062cb723d4dce1b4c599bd..d4ef90548d1dabacc6fd592d2dc1a9c5404c4b3c 100644
--- a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
@@ -85,6 +85,8 @@ void AddArmTegraGpuWhitelist(std::vector<std::string>* read_whitelist,
static const char kDevNvhostCtrlGpuPath[] = "/dev/nvhost-ctrl-gpu";
static const char kSysDevicesSocIDPath[] = "/sys/devices/soc0/soc_id";
static const char kSysDevicesSocRevPath[] = "/sys/devices/soc0/revision";
+ static const char kDevNvavpPath[] = "/dev/tegra_avpchannel";
+ static const char kDevVicPath[] = "/dev/nvhost-vic";
// TODO(davidung): remove these device nodes before nyan launch.
read_whitelist->push_back(kDevNvhostCtrlPath);
@@ -96,6 +98,8 @@ void AddArmTegraGpuWhitelist(std::vector<std::string>* read_whitelist,
read_whitelist->push_back(kDevNvhostCtrlGpuPath);
read_whitelist->push_back(kSysDevicesSocIDPath);
read_whitelist->push_back(kSysDevicesSocRevPath);
+ read_whitelist->push_back(kDevNvavpPath);
+ read_whitelist->push_back(kDevVicPath);
write_whitelist->push_back(kDevNvhostCtrlPath);
write_whitelist->push_back(kDevNvhostIspPath);
@@ -104,6 +108,8 @@ void AddArmTegraGpuWhitelist(std::vector<std::string>* read_whitelist,
write_whitelist->push_back(kDevNvhostGpuPath);
write_whitelist->push_back(kDevNvhostAsGpuPath);
write_whitelist->push_back(kDevNvhostCtrlGpuPath);
+ write_whitelist->push_back(kDevNvavpPath);
+ write_whitelist->push_back(kDevVicPath);
shivdasp 2014/03/21 10:53:45 This whitelisting is only temporary and a change t
sheu 2014/03/21 23:19:54 I'd be inclined not to add whitelisting, even if t
shivdasp 2014/03/24 03:49:00 There's a race between this CL and another which r
}
void AddArmGpuWhitelist(std::vector<std::string>* read_whitelist,
@@ -222,6 +228,10 @@ bool CrosArmGpuProcessPolicy::PreSandboxHook() {
dlopen("/usr/lib/libnvidia-rmapi-tegra.so", dlopen_flag);
dlopen("/usr/lib/libnvidia-eglcore.so", dlopen_flag);
// TODO(davidung): remove these libraries before nyan launch.
+ dlopen("/usr/lib/libtegrav4l2.so", dlopen_flag);
+ // Resetting errno since platform-specific libraries will fail on other
+ // platforms.
+ errno = 0;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698