1a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson/* 2a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * Copyright (C) 2013, The Linux Foundation. All rights reserved. 3a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * 4a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * Redistribution and use in source and binary forms, with or without 5a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * modification, are permitted provided that the following conditions are 6a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * met: 7a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * * Redistributions of source code must retain the above copyright 8a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * notice, this list of conditions and the following disclaimer. 9a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * * Redistributions in binary form must reproduce the above 10a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * copyright notice, this list of conditions and the following 11a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * disclaimer in the documentation and/or other materials provided 12a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * with the distribution. 13a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * * Neither the name of The Linux Foundation or the names of its 14a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * contributors may be used to endorse or promote products derived 15a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * from this software without specific prior written permission. 16a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * 17a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson */ 29a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 30a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#ifndef _QD_UTIL_MISC_H 31a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#define _QD_UTIL_MISC_H 32a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 33a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <utils/threads.h> 34a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <linux/fb.h> 35a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <ctype.h> 36a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <fcntl.h> 37a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <utils/Errors.h> 38a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <utils/Log.h> 39a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 40a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <linux/fb.h> 41a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <sys/ioctl.h> 42a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <sys/poll.h> 43a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <sys/resource.h> 44a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <cutils/properties.h> 45a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#include <hardware/hwcomposer.h> 46a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 47a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#define EDID_RAW_DATA_SIZE 640 48a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 49a653efede03423aa840da24634f1ec6f20796f1eSimon Wilsonint getEdidRawData(char *buffer); 50a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson 511b9f24cfc5be6361faeb28976d720cf65a7f8285Tatenda Chipeperekwavoid getAspectRatioPosition(int destWidth, int destHeight, int srcWidth, 521b9f24cfc5be6361faeb28976d720cf65a7f8285Tatenda Chipeperekwa int srcHeight, hwc_rect_t& rect); 531b9f24cfc5be6361faeb28976d720cf65a7f8285Tatenda Chipeperekwa 54a653efede03423aa840da24634f1ec6f20796f1eSimon Wilson#endif 55