14a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh/* Copyright (c) 2015-2016, The Linux Foundataion. All rights reserved. 24a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* 34a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* Redistribution and use in source and binary forms, with or without 44a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* modification, are permitted provided that the following conditions are 54a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* met: 64a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* * Redistributions of source code must retain the above copyright 74a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* notice, this list of conditions and the following disclaimer. 84a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* * Redistributions in binary form must reproduce the above 94a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* copyright notice, this list of conditions and the following 104a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* disclaimer in the documentation and/or other materials provided 114a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* with the distribution. 124a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* * Neither the name of The Linux Foundation nor the names of its 134a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* contributors may be used to endorse or promote products derived 144a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* from this software without specific prior written permission. 154a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* 164a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 174a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 184a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 194a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 204a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 214a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 224a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 234a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 244a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 254a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 264a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh* 284a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh*/ 294a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 304a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#ifndef __HW_COLOR_MANAGER_H__ 314a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#define __HW_COLOR_MANAGER_H__ 324a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 334a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#include <linux/msm_mdp_ext.h> 344a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#include <linux/msm_mdp.h> 354a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 364a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#include <private/color_params.h> 374a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 384a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhnamespace sdm { 394a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 404a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanhclass HWColorManager { 414a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh public: 424a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetPCC(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 434a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetIGC(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 444a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetPGC(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 454a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetMixerGC(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 464a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetPAV2(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 474a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetDither(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 484a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetGamut(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 494a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError SetPADither(const PPFeatureInfo &feature, msmfb_mdp_pp *kernel_params); 504a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 514a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh static DisplayError (*SetFeature[kMaxNumPPFeatures])(const PPFeatureInfo &feature, 524a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh msmfb_mdp_pp *kernel_params); 534a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 544a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh protected: 554a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh HWColorManager() {} 564a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh}; 574a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 584a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh} // namespace sdm 594a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh 604a1efd0680d2e9b61739e1eaeffd89174d6d2605Alain Vongsouvanh#endif // __HW_COLOR_MANAGER_H__ 61