summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h36
-rw-r--r--graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp24
2 files changed, 28 insertions, 32 deletions
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index 4ae94c00..eb9d6605 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -32,6 +32,8 @@ namespace impl {
32constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE; 32constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE;
33constexpr int AP_POWER_STATE_REQ = (int)VehicleProperty::AP_POWER_STATE_REQ; 33constexpr int AP_POWER_STATE_REQ = (int)VehicleProperty::AP_POWER_STATE_REQ;
34constexpr int AP_POWER_STATE_REPORT = (int)VehicleProperty::AP_POWER_STATE_REPORT; 34constexpr int AP_POWER_STATE_REPORT = (int)VehicleProperty::AP_POWER_STATE_REPORT;
35constexpr int DOOR_1_LEFT = (int)VehicleAreaDoor::ROW_1_LEFT;
36constexpr int DOOR_1_RIGHT = (int)VehicleAreaDoor::ROW_1_RIGHT;
35constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME; 37constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME;
36constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME; 38constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME;
37constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO; 39constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO;
@@ -440,13 +442,13 @@ const ConfigDeclaration kVehicleProperties[]{
440 }, 442 },
441 }, 443 },
442 444
443 {.config = 445 {.config = {.prop = toInt(VehicleProperty::DOOR_LOCK),
444 { 446 .access = VehiclePropertyAccess::READ,
445 .prop = toInt(VehicleProperty::DOOR_LOCK), 447 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
446 .access = VehiclePropertyAccess::READ, 448 .areaConfigs = {VehicleAreaConfig{.areaId = DOOR_1_LEFT},
447 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 449 VehicleAreaConfig{.areaId = DOOR_1_RIGHT}}},
448 }, 450 .initialAreaValues = {{DOOR_1_LEFT, {.int32Values = {1}}},
449 .initialValue = {.int32Values = {1}}}, 451 {DOOR_1_RIGHT, {.int32Values = {1}}}}},
450 452
451 {.config = 453 {.config =
452 { 454 {
@@ -459,23 +461,15 @@ const ConfigDeclaration kVehicleProperties[]{
459 }, 461 },
460 .initialValue = {.int64Values = {0, 100000, 200000, 300000, 400000}}}, 462 .initialValue = {.int64Values = {0, 100000, 200000, 300000, 400000}}},
461 463
462 { 464 {.config = {.prop = ABS_ACTIVE,
463 .config =
464 {
465 .prop = ABS_ACTIVE,
466 .access = VehiclePropertyAccess::READ, 465 .access = VehiclePropertyAccess::READ,
467 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 466 .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
468 }, 467 .initialValue = {.int32Values = {0}}},
469 },
470 468
471 { 469 {.config = {.prop = TRACTION_CONTROL_ACTIVE,
472 .config =
473 {
474 .prop = TRACTION_CONTROL_ACTIVE,
475 .access = VehiclePropertyAccess::READ, 470 .access = VehiclePropertyAccess::READ,
476 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 471 .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
477 }, 472 .initialValue = {.int32Values = {0}}},
478 },
479 473
480 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ), 474 {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
481 .access = VehiclePropertyAccess::READ, 475 .access = VehiclePropertyAccess::READ,
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
index 77f06bbb..6551a99a 100644
--- a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
+++ b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp
@@ -858,18 +858,20 @@ Error HWC2On1Adapter::Display::setColorMode(android_color_mode_t mode) {
858 return Error::Unsupported; 858 return Error::Unsupported;
859 } 859 }
860 860
861 uint32_t hwc1Config = 0; 861 if (mDevice.mHwc1MinorVersion >= 4) {
862 auto error = mActiveConfig->getHwc1IdForColorMode(mode, &hwc1Config); 862 uint32_t hwc1Config = 0;
863 if (error != Error::None) { 863 auto error = mActiveConfig->getHwc1IdForColorMode(mode, &hwc1Config);
864 return error; 864 if (error != Error::None) {
865 } 865 return error;
866 }
866 867
867 ALOGV("[%" PRIu64 "] Setting HWC1 config %u", mId, hwc1Config); 868 ALOGV("[%" PRIu64 "] Setting HWC1 config %u", mId, hwc1Config);
868 int intError = mDevice.mHwc1Device->setActiveConfig(mDevice.mHwc1Device, 869 int intError =
869 mHwc1Id, hwc1Config); 870 mDevice.mHwc1Device->setActiveConfig(mDevice.mHwc1Device, mHwc1Id, hwc1Config);
870 if (intError != 0) { 871 if (intError != 0) {
871 ALOGE("[%" PRIu64 "] Failed to set HWC1 config (%d)", mId, intError); 872 ALOGE("[%" PRIu64 "] Failed to set HWC1 config (%d)", mId, intError);
872 return Error::Unsupported; 873 return Error::Unsupported;
874 }
873 } 875 }
874 876
875 mActiveColorMode = mode; 877 mActiveColorMode = mode;