Merge tag 'LA.UM.9.6.2.r1-04100-89xx.0' of https://source.codeaurora.org/quic/la/platform/hardware/qcom/display into 11.0
"LA.UM.9.6.2.r1-04100-89xx.0" Change-Id: If45ab8272c394df5a8ea125f6f5281fbf49210b9
This commit is contained in:
commit
016e5f2b19
|
@ -13,9 +13,14 @@ LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdgralloc\" -Wall -
|
|||
LOCAL_SHARED_LIBRARIES := $(common_libs) libqdMetaData libsync libgrallocutils \
|
||||
android.hardware.graphics.common@1.1
|
||||
ifeq ($(TARGET_KERNEL_VERSION), 4.14)
|
||||
ifneq ($(LIBION_HEADER_PATH_WRAPPER), )
|
||||
include $(LIBION_HEADER_PATH_WRAPPER)
|
||||
LOCAL_C_INCLUDES += $(LIBION_HEADER_PATHS)
|
||||
else
|
||||
LOCAL_C_INCLUDES += system/core/libion/include
|
||||
LOCAL_C_INCLUDES += system/core/libion/kernel-headers/
|
||||
endif
|
||||
LOCAL_C_INCLUDES += external/libcxx/include \
|
||||
system/core/libion/include/ \
|
||||
system/core/libion/kernel-headers/ \
|
||||
$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
|
||||
LOCAL_SHARED_LIBRARIES += libion
|
||||
endif
|
||||
|
@ -49,8 +54,13 @@ LOCAL_VENDOR_MODULE := true
|
|||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes)
|
||||
ifeq ($(TARGET_KERNEL_VERSION), 4.14)
|
||||
LOCAL_C_INCLUDES += system/core/libion/include \
|
||||
system/core/libion/kernel-headers
|
||||
ifneq ($(LIBION_HEADER_PATH_WRAPPER), )
|
||||
include $(LIBION_HEADER_PATH_WRAPPER)
|
||||
LOCAL_C_INCLUDES += $(LIBION_HEADER_PATHS)
|
||||
else
|
||||
LOCAL_C_INCLUDES += system/core/libion/include
|
||||
LOCAL_C_INCLUDES += system/core/libion/kernel-headers/
|
||||
endif
|
||||
endif
|
||||
ifeq ($(TARGET_KERNEL_VERSION), 4.19)
|
||||
LOCAL_C_INCLUDES += $(LIBION_HEADER_PATHS)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2014, 2016, 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2014, 2016, 2018-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -425,3 +425,38 @@ extern "C" int waitForComposerInit() {
|
|||
|
||||
return !status;
|
||||
}
|
||||
|
||||
extern "C" int setStandByMode(int mode) {
|
||||
status_t err = (status_t) FAILED_TRANSACTION;
|
||||
sp<IQService> binder = getBinder();
|
||||
Parcel inParcel, outParcel;
|
||||
|
||||
if(binder != NULL) {
|
||||
inParcel.writeInt32(mode);
|
||||
err = binder->dispatch(IQService::SET_STAND_BY_MODE,
|
||||
&inParcel, &outParcel);
|
||||
if(err) {
|
||||
ALOGE("%s() failed with err %d", __FUNCTION__, err);
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
extern "C" int getPanelResolution(int *width, int *height) {
|
||||
status_t err = (status_t) FAILED_TRANSACTION;
|
||||
sp<IQService> binder = getBinder();
|
||||
Parcel inParcel, outParcel;
|
||||
|
||||
if(binder != NULL) {
|
||||
err = binder->dispatch(IQService::GET_PANEL_RESOLUTION,
|
||||
&inParcel, &outParcel);
|
||||
if(err != 0) {
|
||||
ALOGE_IF(getBinder(), "%s() failed with err %d", __FUNCTION__, err);
|
||||
} else {
|
||||
*width = outParcel.readInt32();
|
||||
*height = outParcel.readInt32();
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013 - 2016, 2018 - 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013 - 2016, 2018 - 2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -165,6 +165,8 @@ uint64_t getDsiClk(int dpy);
|
|||
// Get supported bit clk values.
|
||||
int getSupportedBitClk(int dpy, std::vector<uint64_t>& bit_rates);
|
||||
|
||||
int setStandByMode(int mode);
|
||||
|
||||
}; //namespace
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
* Copyright (C) 2012-2014, 2016-2017, 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2012-2014, 2016-2017, 2018, 2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Not a Contribution, Apache license notifications and license are
|
||||
* retained for attribution purposes only.
|
||||
|
@ -79,6 +79,8 @@ public:
|
|||
GET_DSI_CLK = 37, // Get DSI Clk.
|
||||
GET_SUPPORTED_DSI_CLK = 38, // Get supported DSI Clk.
|
||||
GET_COMPOSER_STATUS = 39, // Get composer init status-true if primary display init is done
|
||||
SET_STAND_BY_MODE = 40, //Set stand by mode for MDP hardware.
|
||||
GET_PANEL_RESOLUTION = 41, // Get Panel Resolution
|
||||
COMMAND_LIST_END = 400,
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@ ifeq ($(TARGET_EXCLUDES_DISPLAY_PP), true)
|
|||
LOCAL_CFLAGS += -DEXCLUDE_DISPLAY_PP
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_EXCLUDES_MULTI_DISPLAY),true)
|
||||
LOCAL_CFLAGS += -DEXCLUDES_MULTI_DISPLAY
|
||||
endif
|
||||
|
||||
LOCAL_CLANG := true
|
||||
|
||||
# TODO: Remove libui after addressing gpu_tonemapper issues
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2018, 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018, 2020-2021 The Linux Foundation. All rights reserved.
|
||||
* Not a Contribution.
|
||||
*
|
||||
* Copyright 2015 The Android Open Source Project
|
||||
|
@ -149,6 +149,9 @@ class HWCDisplay : public DisplayEventHandler {
|
|||
virtual int SetState(bool connected) {
|
||||
return kErrorNotSupported;
|
||||
}
|
||||
virtual DisplayError SetStandByMode(bool enable) {
|
||||
return kErrorNotSupported;
|
||||
}
|
||||
int SetPanelBrightness(int level);
|
||||
void SetIsPrimaryPanel(bool is_primary) {
|
||||
is_primary_ = is_primary;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014 - 2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014 - 2018, 2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -635,4 +635,28 @@ DisplayError HWCDisplayPrimary::GetDynamicDSIClock(uint64_t *bitclk) {
|
|||
return kErrorNotSupported;
|
||||
}
|
||||
|
||||
DisplayError HWCDisplayPrimary::SetStandByMode(bool enable) {
|
||||
if (enable) {
|
||||
if (!display_null_.IsActive()) {
|
||||
stored_display_intf_ = display_intf_;
|
||||
display_intf_ = &display_null_;
|
||||
display_null_.SetActive(true);
|
||||
DLOGD("Null display is connected successfully");
|
||||
} else {
|
||||
DLOGD("Null display is already connected.");
|
||||
}
|
||||
} else {
|
||||
if (display_null_.IsActive()) {
|
||||
display_intf_ = stored_display_intf_;
|
||||
validated_.reset();
|
||||
display_null_.SetActive(false);
|
||||
DLOGD("Display is connected successfully");
|
||||
} else {
|
||||
DLOGD("Display is already connected.");
|
||||
}
|
||||
}
|
||||
|
||||
return kErrorNone;
|
||||
}
|
||||
|
||||
} // namespace sdm
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2016, 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2016, 2018, 2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include "cpuhint.h"
|
||||
#include "hwc_display.h"
|
||||
#include "display_null.h"
|
||||
|
||||
namespace sdm {
|
||||
|
||||
|
@ -70,6 +71,7 @@ class HWCDisplayPrimary : public HWCDisplay {
|
|||
virtual DisplayError ControlPartialUpdate(bool enable, uint32_t *pending);
|
||||
virtual DisplayError SetDynamicDSIClock(uint64_t bitclk);
|
||||
virtual DisplayError GetDynamicDSIClock(uint64_t *bitclk);
|
||||
virtual DisplayError SetStandByMode(bool enable);
|
||||
|
||||
private:
|
||||
HWCDisplayPrimary(CoreInterface *core_intf, BufferAllocator *buffer_allocator,
|
||||
|
@ -105,6 +107,11 @@ class HWCDisplayPrimary : public HWCDisplay {
|
|||
BufferInfo output_buffer_info_ = {};
|
||||
void *output_buffer_base_ = nullptr;
|
||||
int default_mode_status_ = 0;
|
||||
|
||||
//Null display
|
||||
DisplayNull display_null_;
|
||||
DisplayInterface *stored_display_intf_ = NULL;
|
||||
|
||||
};
|
||||
|
||||
} // namespace sdm
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
|
||||
* Not a Contribution.
|
||||
*
|
||||
* Copyright 2015 The Android Open Source Project
|
||||
|
@ -1111,6 +1111,14 @@ android::status_t HWCSession::notifyCallback(uint32_t command, const android::Pa
|
|||
output_parcel->writeInt32(getComposerStatus());
|
||||
break;
|
||||
|
||||
case qService::IQService::SET_STAND_BY_MODE:
|
||||
status = SetStandByMode(input_parcel);
|
||||
break;
|
||||
|
||||
case qService::IQService::GET_PANEL_RESOLUTION:
|
||||
status = GetPanelResolution(input_parcel, output_parcel);
|
||||
break;
|
||||
|
||||
default:
|
||||
DLOGW("QService command = %d is not supported", command);
|
||||
return -EINVAL;
|
||||
|
@ -1699,6 +1707,39 @@ android::status_t HWCSession::GetVisibleDisplayRect(const android::Parcel *input
|
|||
return android::NO_ERROR;
|
||||
}
|
||||
|
||||
android::status_t HWCSession::SetStandByMode(const android::Parcel *input_parcel) {
|
||||
SCOPE_LOCK(locker_[HWC_DISPLAY_PRIMARY]);
|
||||
|
||||
bool enable = (input_parcel->readInt32() > 0);
|
||||
|
||||
if (!hwc_display_[HWC_DISPLAY_PRIMARY]) {
|
||||
DLOGI("Primary display is not initialized");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hwc_display_[HWC_DISPLAY_PRIMARY]->SetStandByMode(enable);
|
||||
|
||||
return android::NO_ERROR;
|
||||
}
|
||||
|
||||
android::status_t HWCSession::GetPanelResolution(const android::Parcel *input_parcel,
|
||||
android::Parcel *output_parcel) {
|
||||
SCOPE_LOCK(locker_[HWC_DISPLAY_PRIMARY]);
|
||||
|
||||
if (!hwc_display_[HWC_DISPLAY_PRIMARY]) {
|
||||
DLOGI("Primary display is not initialized");
|
||||
return -EINVAL;
|
||||
}
|
||||
auto panel_width = 0u;
|
||||
auto panel_height = 0u;
|
||||
|
||||
hwc_display_[HWC_DISPLAY_PRIMARY]->GetPanelResolution(&panel_width, &panel_height);
|
||||
output_parcel->writeInt32(INT32(panel_width));
|
||||
output_parcel->writeInt32(INT32(panel_height));
|
||||
|
||||
return android::NO_ERROR;
|
||||
}
|
||||
|
||||
void HWCSession::Refresh(hwc2_display_t display) {
|
||||
SCOPE_LOCK(callbacks_lock_);
|
||||
callbacks_.Refresh(display);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2019, 2021, The Linux Foundation. All rights reserved.
|
||||
* Not a Contribution.
|
||||
*
|
||||
* Copyright 2015 The Android Open Source Project
|
||||
|
@ -253,6 +253,10 @@ class HWCSession : hwc2_device_t, HWCUEventListener, public qClient::BnQClient,
|
|||
android::status_t GetSupportedDsiClk(const android::Parcel *input_parcel,
|
||||
android::Parcel *output_parcel);
|
||||
android::status_t getComposerStatus();
|
||||
android::status_t SetStandByMode(const android::Parcel *input_parcel);
|
||||
android::status_t GetPanelResolution(const android::Parcel *input_parcel,
|
||||
android::Parcel *output_parcel);
|
||||
|
||||
|
||||
void Refresh(hwc2_display_t display);
|
||||
void HotPlug(hwc2_display_t display, HWC2::Connection state);
|
||||
|
|
|
@ -580,10 +580,16 @@ int HWCSession::DisplayConfigImpl::GetDebugProperty(const std::string prop_name,
|
|||
}
|
||||
|
||||
int HWCSession::DisplayConfigImpl::IsBuiltInDisplay(uint32_t disp_id, bool *is_builtin) {
|
||||
#ifdef EXCLUDES_MULTI_DISPLAY
|
||||
if (HWC_DISPLAY_PRIMARY == disp_id) {
|
||||
*is_builtin = true;
|
||||
}
|
||||
#else
|
||||
if ((HWC_DISPLAY_PRIMARY == disp_id) || (HWC_DISPLAY_BUILTIN_2 == disp_id) ||
|
||||
(HWC_DISPLAY_BUILTIN_3 == disp_id) || (HWC_DISPLAY_BUILTIN_4 == disp_id)) {
|
||||
*is_builtin = true;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
*is_builtin = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue