| commit 21f9825219834f276e63437ffda59fdd34458c06
|
| Author: John Galt <johngaltfirstrun@gmail.com>
|
| Date: Wed Jan 14 08:14:01 2026 -0500
|
|
|
| Support pixelworks hw iris 7 color calibration
|
|
|
| diff --git a/composer/Android.bp b/composer/Android.bp
|
| index ca4c8a84f..dfb454190 100644
|
| --- a/composer/Android.bp
|
| +++ b/composer/Android.bp
|
| @@ -24,6 +24,11 @@ cc_binary {
|
| "-DSUPPORTS_PXLW",
|
| ],
|
| default: [],
|
| + }) + select(soong_config_variable("qtidisplay", "pxlw_hw_iris7"), {
|
| + "true": [
|
| + "-DSUPPORTS_PXLW_IRIS7",
|
| + ],
|
| + default: [],
|
| }),
|
|
|
| shared_libs: [
|
| diff --git a/composer/hwc_display_builtin.cpp b/composer/hwc_display_builtin.cpp
|
| index 33fa4d815..cfca80a6f 100644
|
| --- a/composer/hwc_display_builtin.cpp
|
| +++ b/composer/hwc_display_builtin.cpp
|
| @@ -486,9 +486,14 @@ HWC3::Error HWCDisplayBuiltIn::SetColorModeWithRenderIntent(ColorMode mode, Rend
|
| #ifdef SUPPORTS_PXLW
|
| auto *iris_wrapper = pxlw::PxlwIrisWrapper::GetInstance();
|
| if (iris_wrapper) {
|
| +#ifdef SUPPORTS_PXLW_IRIS7
|
| + reinterpret_cast<pxlw::PxlwIris7AidlWrapper *>(iris_wrapper)->SetColorModeWithRenderIntent(
|
| + 0, 0, static_cast<int32_t>(mode), static_cast<int32_t>(intent));
|
| +#else
|
| reinterpret_cast<pxlw::PxlwSoftirisWrapper*>(iris_wrapper)->SetColorModeWithRenderIntent(
|
| 0, 0, static_cast<android::hardware::graphics::common::V1_2::ColorMode>(mode),
|
| static_cast<android::hardware::graphics::common::V1_1::RenderIntent>(intent));
|
| +#endif
|
| }
|
| #endif
|
|
|
| diff --git a/composer/hwc_session.cpp b/composer/hwc_session.cpp
|
| index e5e602f82..0cd2a6bfe 100644
|
| --- a/composer/hwc_session.cpp
|
| +++ b/composer/hwc_session.cpp
|
| @@ -2920,6 +2920,17 @@ int HWCSession::CreatePrimaryDisplay() {
|
| map_active_displays_.insert(std::make_pair(client_id, &map_info_primary_));
|
|
|
| #ifdef SUPPORTS_PXLW
|
| +#ifdef SUPPORTS_PXLW_IRIS7
|
| + // HW Iris7 devices ship the Iris service + rc, so just initialize the Iris7 wrapper
|
| + // for the primary panel during bring-up.
|
| + auto *iris_wrapper = pxlw::PxlwIrisWrapper::GetInstance();
|
| + if (iris_wrapper) {
|
| + DisplayConfigVariableInfo config = {};
|
| + hwc_display[0]->GetDisplayAttributesForConfig(0, &config);
|
| + reinterpret_cast<pxlw::PxlwIris7AidlWrapper *>(iris_wrapper)
|
| + ->InitPrimaryDisplay(config.vsync_period_ns, config.x_pixels, config.y_pixels);
|
| + }
|
| +#else
|
| // This indirectly invokes IrisService constructor which is helpful in devices that uses
|
| // soft-iris where some device don't ship with vendor.pixelworks.hardware.display.iris-service
|
| // or it's .rc file
|
| @@ -2927,10 +2938,12 @@ int HWCSession::CreatePrimaryDisplay() {
|
| auto iris_feature = pxlw::IrisFeature::getInstance();
|
| DisplayConfigVariableInfo config = {};
|
| hwc_display[0]->GetDisplayAttributesForConfig(0, &config);
|
| +
|
| if (iris_wrapper && iris_feature->hasSoftIris()) {
|
| reinterpret_cast<pxlw::PxlwSoftirisWrapper *>(iris_wrapper)
|
| ->InitPrimaryDisplay(config.vsync_period_ns, config.x_pixels, config.y_pixels);
|
| }
|
| +#endif
|
| #endif
|
| } else {
|
| DLOGE("Primary display creation has failed! status = %d", status);
|
| diff --git a/include/pxlw_iris_wrapper.h b/include/pxlw_iris_wrapper.h
|
| index 5fb75092e..8da72c56c 100644
|
| --- a/include/pxlw_iris_wrapper.h
|
| +++ b/include/pxlw_iris_wrapper.h
|
| @@ -5,6 +5,8 @@
|
|
|
| #pragma once
|
|
|
| +#include <cstdint>
|
| +
|
| namespace android {
|
| namespace hardware {
|
| namespace graphics {
|
| @@ -31,6 +33,18 @@ private:
|
| PxlwIrisWrapper() = default;
|
| };
|
|
|
| +// HW Iris 7 (AIDL-based) wrapper entry points exported by vendor libpwirishalwrapper.so.
|
| +// Only used when SUPPORTS_PXLW_IRIS7 is defined.
|
| +class PxlwIris7AidlWrapper {
|
| +public:
|
| + int InitPrimaryDisplay(int param_1, unsigned int param_2, unsigned int param_3);
|
| + void SetColorModeWithRenderIntent(int param_1, int param_2, int32_t param_3, int32_t param_4);
|
| +
|
| +private:
|
| + PxlwIris7AidlWrapper() = default;
|
| + friend class PxlwIrisWrapper;
|
| +};
|
| +
|
| class PxlwSoftirisWrapper {
|
| public:
|
| int InitPrimaryDisplay(int param_1, unsigned int param_2, unsigned int param_3);
|
| diff --git a/sdm/libs/core/Android.bp b/sdm/libs/core/Android.bp
|
| index b28371d1a..c41bb2142 100644
|
| --- a/sdm/libs/core/Android.bp
|
| +++ b/sdm/libs/core/Android.bp
|
| @@ -19,6 +19,11 @@ cc_library_shared {
|
| "-DSUPPORTS_PXLW",
|
| ],
|
| default: [],
|
| + }) + select(soong_config_variable("qtidisplay", "pxlw_hw_iris7"), {
|
| + "true": [
|
| + "-DSUPPORTS_PXLW_IRIS7",
|
| + ],
|
| + default: [],
|
| }),
|
| shared_libs: [
|
| "libdl",
|