display: Remove dead metadata code
The IGC field in the metadata struct is not set, so getting will
just return the default value. The helper for HSIC is only called
in a legacy test.
CRs-Fixed: 2606686
Change-Id: Ie7786e42d917c076439ac62f5a351272ce5882a3
diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp
index bd49edc..22e6972 100644
--- a/libcopybit/copybit.cpp
+++ b/libcopybit/copybit.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 The Android Open Source Project
- * Copyright (c) 2010 - 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 - 2014, 2020 The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are retained
* for attribution purposes only.
@@ -529,14 +529,6 @@
// Set Color Space for MDP to configure CSC matrix
req->color_space = ITU_R_601;
- MetaData_t *metadata = NULL;
-
- if (src_hnd != NULL)
- metadata = (MetaData_t *)src_hnd->base_metadata;
-
- if (metadata && (metadata->operation & UPDATE_COLOR_SPACE)) {
- req->color_space = metadata->colorSpace;
- }
set_infos(ctx, req, flags);
set_image(&req->dst, dst);
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index f9e7e33..c283b38 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2013-2014, 2016, 2018, 2019, The Linux Foundation. All rights reserved.
+* Copyright (c) 2013-2014, 2016, 2018-2020, 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
@@ -85,23 +85,6 @@
return err;
}
-int setHSIC(int dpy, const HSICData_t& hsic_data) {
- status_t err = (status_t) FAILED_TRANSACTION;
- sp<IQService> binder = getBinder();
- Parcel inParcel, outParcel;
- inParcel.writeInt32(dpy);
- inParcel.writeInt32(hsic_data.hue);
- inParcel.writeFloat(hsic_data.saturation);
- inParcel.writeInt32(hsic_data.intensity);
- inParcel.writeFloat(hsic_data.contrast);
- if(binder != NULL) {
- err = binder->dispatch(IQService::SET_HSIC_DATA, &inParcel, &outParcel);
- }
- if(err)
- ALOGE("%s: Failed to get external status err=%d", __FUNCTION__, err);
- return err;
-}
-
int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect) {
status_t err = (status_t) FAILED_TRANSACTION;
sp<IQService> binder = getBinder();
diff --git a/libqdutils/display_config.h b/libqdutils/display_config.h
index ad41ed7..21aea60 100644
--- a/libqdutils/display_config.h
+++ b/libqdutils/display_config.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 - 2016, 2018, 2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 - 2016, 2018 - 2020, 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
@@ -116,10 +116,6 @@
// Returns 0 on success, negative values on errors
int getDisplayAttributes(int dpy, DisplayAttributes_t& dpyattr);
-// Set HSIC data on a given display ID
-// Returns 0 on success, negative values on errors
-int setHSIC(int dpy, const HSICData_t& hsic_data);
-
// get the active visible region for the display
// Returns 0 on success, negative values on errors
int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect);
diff --git a/sdm/libs/hwc2/hwc_layers.cpp b/sdm/libs/hwc2/hwc_layers.cpp
index f8d79ab..d8c8c4e 100644
--- a/sdm/libs/hwc2/hwc_layers.cpp
+++ b/sdm/libs/hwc2/hwc_layers.cpp
@@ -812,13 +812,6 @@
DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *layer) {
LayerBuffer *layer_buffer = &layer->input_buffer;
private_handle_t *handle = const_cast<private_handle_t *>(pvt_handle);
- IGC_t igc = {};
- LayerIGC layer_igc = layer_buffer->igc;
- if (getMetaData(handle, GET_IGC, &igc) == 0) {
- if (SetIGC(igc, &layer_igc) != kErrorNone) {
- return kErrorNotSupported;
- }
- }
float fps = 0;
uint32_t frame_rate = layer->frame_rate;
@@ -847,10 +840,9 @@
s3d_format = GetS3DFormat(s3d);
}
- if ((layer_igc != layer_buffer->igc) || (interlace != layer_buffer->flags.interlace) ||
+ if ((interlace != layer_buffer->flags.interlace) ||
(frame_rate != layer->frame_rate) || (s3d_format != layer_buffer->s3d_format)) {
// Layer buffer metadata has changed.
- layer_buffer->igc = layer_igc;
layer->frame_rate = frame_rate;
layer_buffer->s3d_format = s3d_format;
layer_buffer->flags.interlace = interlace;
@@ -879,22 +871,6 @@
return kErrorNone;
}
-DisplayError HWCLayer::SetIGC(IGC_t source, LayerIGC *target) {
- switch (source) {
- case IGC_NotSpecified:
- *target = kIGCNotSpecified;
- break;
- case IGC_sRGB:
- *target = kIGCsRGB;
- break;
- default:
- DLOGE("Unsupported IGC: %d", source);
- return kErrorNotSupported;
- }
-
- return kErrorNone;
-}
-
bool HWCLayer::IsDataSpaceSupported() {
if (client_requested_ != HWC2::Composition::Device &&
client_requested_ != HWC2::Composition::Cursor) {
diff --git a/sdm/libs/hwc2/hwc_layers.h b/sdm/libs/hwc2/hwc_layers.h
index d95f02d..10d7156 100644
--- a/sdm/libs/hwc2/hwc_layers.h
+++ b/sdm/libs/hwc2/hwc_layers.h
@@ -149,7 +149,6 @@
LayerBufferS3DFormat GetS3DFormat(uint32_t s3d_format);
void GetUBWCStatsFromMetaData(UBWCStats *cr_stats, UbwcCrStatsVector *cr_vec);
DisplayError SetMetaData(const private_handle_t *pvt_handle, Layer *layer);
- DisplayError SetIGC(IGC_t source, LayerIGC *target);
uint32_t RoundToStandardFPS(float fps);
void ValidateAndSetCSC(const private_handle_t *handle);
void SetDirtyRegions(hwc_region_t surface_damage);