vpd: Add ICC provisioning task.

Some devices ship with device-specific ICC color calibration
written to the VPD. This data must be provisioned before the
ui starts so that ash can pick it up from a known directory.

This task creates the directory, then invokes vpd_icc, which
provisions the calibration data from the VPD, if any.

BUG=b:155350541
TEST=manual test with cros deploy vpd to volteer
BRANCH=none

Change-Id: I536f80372dddb9dcbbef0af344a4f4cc27d23a65
Cq-Depend: chromium:2705287
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vpd/+/2683043
Commit-Queue: Jao-ke Chin-Lee <jchinlee@chromium.org>
Tested-by: Jao-ke Chin-Lee <jchinlee@chromium.org>
Auto-Submit: Jao-ke Chin-Lee <jchinlee@chromium.org>
Reviewed-by: Stimim Chen <stimim@chromium.org>
diff --git a/init/vpd-icc.conf b/init/vpd-icc.conf
new file mode 100644
index 0000000..f32cff4
--- /dev/null
+++ b/init/vpd-icc.conf
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+description     "Provisions ICC calibration information from VPD"
+author          "chromium-os-dev@chromium.org"
+
+# This starts every time the UI (re)starts to make sure
+# /var/cache/display_profiles/vpd is populated before ash starts.
+start on starting ui
+
+# Stop when the ui terminates so restarts of the ui job trigger
+# a full stop/start cycle.
+stop on stopping ui
+
+kill timeout 1
+pre-start script
+  mkdir -p /var/cache/display_profiles/vpd
+end script
+exec vpd_icc
diff --git a/util/vpd_icc b/util/vpd_icc
index aac0e07..a733f0c 100755
--- a/util/vpd_icc
+++ b/util/vpd_icc
@@ -6,7 +6,7 @@
 # Packs ICC profiles to VPD, or to create local ICC profile files from VPD.
 
 VPD_KEY="display_profiles"
-CACHE_DIR="/var/cache/display_profiles"
+CACHE_DIR="/var/cache/display_profiles/vpd"
 ICC_EXT=".icc"
 
 error() {