graphics.common: add HSV format definition to 1.2

Adds HSV format used in some color sampling engines to the list
of pixel formats. Rev the sampling engine in composer to reference
the new format revision.

Test: built image, with new format reported in vendor code.
Test: VtsHalGraphicsComposerV2_3TargetTest
Fixes: 122943743

Roll-forward of build-breaking topic commit. No changes were
needed in this patch. see bug 123404649 for breakage details.
This reverts commit e2f69f22289ffadc8dcfdbb476422e194442253a.

Change-Id: I38ac5cafeb6a07e683352c8d297892a681e24702
diff --git a/graphics/composer/2.3/IComposerClient.hal b/graphics/composer/2.3/IComposerClient.hal
index cf78dea..a3b7792 100644
--- a/graphics/composer/2.3/IComposerClient.hal
+++ b/graphics/composer/2.3/IComposerClient.hal
@@ -17,7 +17,7 @@
 package android.hardware.graphics.composer@2.3;
 
 import android.hardware.graphics.common@1.1::RenderIntent;
-import android.hardware.graphics.common@1.1::PixelFormat;
+import android.hardware.graphics.common@1.2::PixelFormat;
 import android.hardware.graphics.common@1.2::ColorMode;
 import android.hardware.graphics.common@1.2::Dataspace;
 import android.hardware.graphics.common@1.2::Hdr;
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
index edc203e..a272e72 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
@@ -123,7 +123,7 @@
     Return<void> getDisplayedContentSamplingAttributes(
         uint64_t display,
         IComposerClient::getDisplayedContentSamplingAttributes_cb hidl_cb) override {
-        common::V1_1::PixelFormat format;
+        PixelFormat format;
         common::V1_2::Dataspace dataspace;
         hidl_bitfield<IComposerClient::FormatColorComponent> componentMask;
         Error error =
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
index 882621f..a0812ad 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
@@ -25,11 +25,11 @@
 namespace V2_3 {
 namespace hal {
 
-using common::V1_1::PixelFormat;
 using common::V1_1::RenderIntent;
 using common::V1_2::ColorMode;
 using common::V1_2::Dataspace;
 using common::V1_2::Hdr;
+using common::V1_2::PixelFormat;
 using V2_1::Display;
 using V2_1::Error;
 using V2_1::Layer;
diff --git a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
index 9fb6d4b..41e333a 100644
--- a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
+++ b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
@@ -34,11 +34,11 @@
 
 namespace detail {
 
-using common::V1_1::PixelFormat;
 using common::V1_1::RenderIntent;
 using common::V1_2::ColorMode;
 using common::V1_2::Dataspace;
 using common::V1_2::Hdr;
+using common::V1_2::PixelFormat;
 using V2_1::Display;
 using V2_1::Error;
 
@@ -91,14 +91,16 @@
 
     Error getClientTargetSupport_2_3(Display display, uint32_t width, uint32_t height,
                                      PixelFormat format, Dataspace dataspace) override {
-        return getClientTargetSupport_2_2(display, width, height, format,
+        return getClientTargetSupport_2_2(display, width, height,
+                                          static_cast<common::V1_1::PixelFormat>(format),
                                           static_cast<common::V1_1::Dataspace>(dataspace));
     }
 
     Error getReadbackBufferAttributes_2_3(Display display, PixelFormat* outFormat,
                                           Dataspace* outDataspace) override {
         return getReadbackBufferAttributes(
-            display, outFormat, reinterpret_cast<common::V1_1::Dataspace*>(outDataspace));
+                display, reinterpret_cast<common::V1_1::PixelFormat*>(outFormat),
+                reinterpret_cast<common::V1_1::Dataspace*>(outDataspace));
     }
 
     Error getDisplayIdentificationData(Display display, uint8_t* outPort,
diff --git a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
index 7add322..ad4ef0b 100644
--- a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
+++ b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
@@ -32,11 +32,11 @@
 namespace V2_3 {
 namespace vts {
 
-using common::V1_1::PixelFormat;
 using common::V1_1::RenderIntent;
 using common::V1_2::ColorMode;
 using common::V1_2::Dataspace;
 using common::V1_2::Hdr;
+using common::V1_2::PixelFormat;
 using V2_1::Display;
 using V2_1::Error;
 using V2_3::IComposer;
diff --git a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
index dca7406..de74e28 100644
--- a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
+++ b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
@@ -36,10 +36,10 @@
 namespace {
 
 using common::V1_0::BufferUsage;
-using common::V1_1::PixelFormat;
 using common::V1_1::RenderIntent;
 using common::V1_2::ColorMode;
 using common::V1_2::Dataspace;
+using common::V1_2::PixelFormat;
 using mapper::V2_0::IMapper;
 using mapper::V2_0::vts::Gralloc;
 
@@ -492,9 +492,6 @@
 }
 
 TEST_F(GraphicsComposerHidlTest, GetDisplayedContentSamplingAttributes) {
-    using common::V1_1::PixelFormat;
-    using common::V1_2::Dataspace;
-
     int constexpr invalid = -1;
     auto format = static_cast<PixelFormat>(invalid);
     auto dataspace = static_cast<Dataspace>(invalid);