1 /* 2 * SPDX-FileCopyrightText: Copyright (c) 2013-2015 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 * SPDX-License-Identifier: MIT 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #ifndef __NVKMS_DPY_H__ 25 #define __NVKMS_DPY_H__ 26 27 #include "nvkms-types.h" 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 void nvDpyProbeMaxPixelClock(NVDpyEvoPtr pDpyEvo); 34 NVEvoPassiveDpDongleType nvDpyGetPassiveDpDongleType( 35 const NVDpyEvoRec *pDpyEvo, 36 NvU32 *passiveDpDongleMaxPclkKHz); 37 void nvDpySetValidSyncsEvo(const NVDpyEvoRec *pDpyEvo, 38 struct NvKmsModeValidationValidSyncs *pValidSyncs); 39 NVDpyEvoPtr nvAllocDpyEvo(NVDispEvoPtr pDispEvo, 40 NVConnectorEvoPtr pConnectorEvo, 41 NVDpyId dpyId, const char *dpAddress); 42 void nvFreeDpyEvo(NVDispEvoPtr pDispEvo, NVDpyEvoPtr pDpyEvo); 43 NVConnectorEvoPtr nvGetConnectorFromDisp(NVDispEvoPtr pDispEvo, NVDpyId dpyId); 44 45 void nvUpdateInfoFrames(NVDpyEvoRec *pDpyEvo); 46 47 NvBool nvDpyRequiresDualLinkEvo(const NVDpyEvoRec *pDpyEvo, 48 const NVHwModeTimingsEvo *pTimings); 49 50 NVDpyEvoPtr nvGetDpyEvoFromDispEvo(const NVDispEvoRec *pDispEvo, NVDpyId dpyId); 51 52 NVDpyEvoPtr nvGetDPMSTDpyEvo(NVConnectorEvoPtr pConnectorEvo, 53 const char *address, NvBool *pDynamicDpyCreated); 54 55 typedef enum { 56 NVKMS_EDID_READ_MODE_DEFAULT, 57 NVKMS_EDID_READ_MODE_ACPI, 58 } NvKmsEdidReadMode; 59 60 NvBool nvDpyReadAndParseEdidEvo( 61 const NVDpyEvoRec *pDpyEvo, 62 const struct NvKmsQueryDpyDynamicDataRequest *pRequest, 63 NvKmsEdidReadMode readMode, 64 NVEdidRec *pEdid, 65 NVParsedEdidEvoPtr *ppParsedEdid, 66 NVEvoInfoStringPtr pInfoString); 67 68 char *nvGetDpyIdListStringEvo(NVDispEvoPtr pDispEvo, 69 const NVDpyIdList dpyIdList); 70 71 NvBool nvDpyGetDynamicData( 72 NVDpyEvoPtr pDpyEvo, 73 struct NvKmsQueryDpyDynamicDataParams *pParams); 74 75 void nvDpyUpdateCurrentAttributes(NVDpyEvoRec *pDpyEvo); 76 77 NvBool nvDpyIsAdaptiveSync(const NVDpyEvoRec *pDpyEvo); 78 79 NvBool nvDpyIsAdaptiveSyncDefaultlisted(const NVDpyEvoRec *pDpyEvo); 80 81 enum NvKmsDpyAttributeDigitalSignalValue 82 nvGetDefaultDpyAttributeDigitalSignalValue(const NVConnectorEvoRec *pConnectorEvo); 83 84 NVColorFormatInfoRec nvGetColorFormatInfo(const NVDpyEvoRec *pDpyEvo); 85 86 #ifdef __cplusplus 87 }; 88 #endif 89 90 #endif /* __NVKMS_DPY_H__ */ 91