Bug: 7124159 --External disabled --MDP comp coded but disabled. --Videos via overlay, so that secure videos can work. Change-Id: Ie48b264143d5e4237ab9724e28930e3f68ba49ee Signed-off-by: Iliyan Malchev <malchev@google.com>
74 lines
2.1 KiB
C++
74 lines
2.1 KiB
C++
/*
|
|
* Copyright (C) 2010 The Android Open Source Project
|
|
* Copyright (C) 2012, The Linux Foundation. All rights reserved.
|
|
*
|
|
* Not a Contribution, Apache license notifications and license are
|
|
* retained for attribution purposes only.
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef HWC_EXTERNAL_DISPLAY_H
|
|
#define HWC_EXTERNAL_DISPLAY_H
|
|
|
|
#include <utils/threads.h>
|
|
#include <linux/fb.h>
|
|
|
|
struct hwc_context_t;
|
|
|
|
namespace qhwc {
|
|
|
|
class ExternalDisplay
|
|
{
|
|
public:
|
|
ExternalDisplay(hwc_context_t* ctx);
|
|
~ExternalDisplay();
|
|
int getModeCount() const;
|
|
void getEDIDModes(int *out) const;
|
|
void setExternalDisplay(int connected);
|
|
bool post();
|
|
void setHPD(uint32_t startEnd);
|
|
void setEDIDMode(int resMode);
|
|
void setActionSafeDimension(int w, int h);
|
|
|
|
private:
|
|
bool readResolution();
|
|
int parseResolution(char* edidStr, int* edidModes);
|
|
void setResolution(int ID);
|
|
bool openFramebuffer();
|
|
bool closeFrameBuffer();
|
|
bool writeHPDOption(int userOption) const;
|
|
bool isValidMode(int ID);
|
|
void handleUEvent(char* str, int len);
|
|
int getModeOrder(int mode);
|
|
int getBestMode();
|
|
void resetInfo();
|
|
void setDpyAttr();
|
|
void getAttrForMode(int& width, int& height, int& fps);
|
|
|
|
mutable android::Mutex mExtDispLock;
|
|
int mFd;
|
|
int mCurrentMode;
|
|
int mExternalDisplay;
|
|
int mResolutionMode;
|
|
char mEDIDs[128];
|
|
int mEDIDModes[64];
|
|
int mModeCount;
|
|
hwc_context_t *mHwcContext;
|
|
fb_var_screeninfo mVInfo;
|
|
};
|
|
|
|
}; //qhwc
|
|
// ---------------------------------------------------------------------------
|
|
#endif //HWC_EXTERNAL_DISPLAY_H
|