Skip to content

Commit

Permalink
display: Remove dead metadata code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Tharaga Balachandran authored and Gerrit - the friendly Code Review server committed Feb 13, 2020
1 parent 0bbdfe3 commit ea07c4e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 46 deletions.
27 changes: 1 addition & 26 deletions composer/hwc_layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,6 @@ void HWCLayer::GetUBWCStatsFromMetaData(UBWCStats *cr_stats, UbwcCrStatsVector *
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;
Expand All @@ -893,10 +886,8 @@ DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *la
layer_buffer->format = GetSDMFormat(INT32(linear_format), 0);
}

if ((layer_igc != layer_buffer->igc) || (interlace != layer_buffer->flags.interlace) ||
(frame_rate != layer->frame_rate)) {
if ((interlace != layer_buffer->flags.interlace) || (frame_rate != layer->frame_rate)) {
// Layer buffer metadata has changed.
layer_buffer->igc = layer_igc;
layer->frame_rate = frame_rate;
layer_buffer->flags.interlace = interlace;
layer_->update_mask.set(kMetadataUpdate);
Expand Down Expand Up @@ -924,22 +915,6 @@ DisplayError HWCLayer::SetMetaData(const private_handle_t *pvt_handle, Layer *la
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) {
Expand Down
1 change: 0 additions & 1 deletion composer/hwc_layers.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ class HWCLayer {
uint32_t GetUint32Color(const hwc_color_t &source);
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);
Expand Down
10 changes: 1 addition & 9 deletions libcopybit/copybit.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -529,14 +529,6 @@ static int stretch_copybit(

// 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);
Expand Down
6 changes: 1 addition & 5 deletions libqdutils/display_config.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -53,10 +53,6 @@ int getDisplayAttributes(int /* dpy */, DisplayAttributes_t& /* dpyattr */) {
return FAILED_TRANSACTION;
}

int setHSIC(int /* dpy */, const HSICData_t& /* hsic_data */) {
return FAILED_TRANSACTION;
}

int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect) {
status_t err = (status_t) FAILED_TRANSACTION;
sp<IQService> binder = getBinder();
Expand Down
6 changes: 1 addition & 5 deletions libqdutils/display_config.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -116,10 +116,6 @@ int isExternalConnected(void);
// 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);
Expand Down

0 comments on commit ea07c4e

Please sign in to comment.