545.23.06

This commit is contained in:
Andy Ritger
2023-10-17 09:25:29 -07:00
parent f59818b751
commit b5bf85a8e3
917 changed files with 132480 additions and 110015 deletions

View File

@@ -454,6 +454,10 @@ namespace DisplayPort
virtual bool getLinkStatusChanged() = 0;
virtual void clearLinkStatusChanged() = 0;
virtual bool isPanelReplayErrorSet() = 0;
virtual void clearPanelReplayError() = 0;
virtual void readPanelReplayError() = 0;
virtual bool getHdmiLinkStatusChanged() = 0;
virtual void clearHdmiLinkStatusChanged() = 0;
@@ -523,6 +527,8 @@ namespace DisplayPort
virtual bool readPsrErrorStatus(vesaPsrErrorStatus *psrErr) = 0;
virtual bool writePsrEvtIndicator(vesaPsrEventIndicator psrErr) = 0;
virtual bool readPsrEvtIndicator(vesaPsrEventIndicator *psrErr) = 0;
virtual bool readPrSinkDebugInfo(panelReplaySinkDebugInfo *prDbgInfo) = 0;
virtual ~DPCDHAL() {}
};

View File

@@ -48,6 +48,34 @@
namespace DisplayPort
{
class EvoInterface;
typedef enum
{
DP_IMP_ERROR_NONE,
DP_IMP_ERROR_ZERO_VALUE_PARAMS,
DP_IMP_ERROR_AUDIO_BEYOND_48K,
DP_IMP_ERROR_DSC_SYNAPTICS_COLOR_FORMAT,
DP_IMP_ERROR_PPS_DSC_DUAL_FORCE,
DP_IMP_ERROR_DSC_PCON_FRL_BANDWIDTH,
DP_IMP_ERROR_DSC_PCON_HDMI2_BANDWIDTH,
DP_IMP_ERROR_DSC_LAST_HOP_BANDWIDTH,
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH,
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH_DSC,
DP_IMP_ERROR_INSUFFICIENT_BANDWIDTH_NO_DSC,
DP_IMP_ERROR_WATERMARK_BLANKING,
DP_IMP_ERROR_PPS_COLOR_FORMAT_NOT_SUPPORTED,
DP_IMP_ERROR_PPS_INVALID_HBLANK,
DP_IMP_ERROR_PPS_INVALID_BPC,
DP_IMP_ERROR_PPS_MAX_LINE_BUFFER_ERROR,
DP_IMP_ERROR_PPS_OVERALL_THROUGHPUT_ERROR,
DP_IMP_ERROR_PPS_DSC_SLICE_ERROR,
DP_IMP_ERROR_PPS_PPS_SLICE_COUNT_ERROR,
DP_IMP_ERROR_PPS_PPS_SLICE_HEIGHT_ERROR,
DP_IMP_ERROR_PPS_PPS_SLICE_WIDTH_ERROR,
DP_IMP_ERROR_PPS_INVALID_PEAK_THROUGHPUT,
DP_IMP_ERROR_PPS_MIN_SLICE_COUNT_ERROR,
DP_IMP_ERROR_PPS_GENERIC_ERROR,
} DP_IMP_ERROR;
typedef enum
{
@@ -125,14 +153,36 @@ namespace DisplayPort
ForceDsc forceDsc; // [IN] - Client telling DP Library to force enable/disable DSC
DSC_INFO::FORCED_DSC_PARAMS* forcedParams; // [IN] - Client telling DP Library to force certain DSC params.
bool bEnableDsc; // [OUT] - DP Library telling client that DSC is needed for this mode.
NvU32 sliceCountMask; // [OUT] - DP Library telling client what all slice counts can be used for the mode.
unsigned bitsPerPixelX16; // [IN/OUT] - Bits per pixel value multiplied by 16
DscOutParams *pDscOutParams; // [OUT] - DSC parameters
DscParams() : bCheckWithDsc(false), forceDsc(DSC_DEFAULT), forcedParams(NULL), bEnableDsc(false), bitsPerPixelX16(0), pDscOutParams(NULL) {}
DscParams() : bCheckWithDsc(false), forceDsc(DSC_DEFAULT), forcedParams(NULL), bEnableDsc(false), sliceCountMask(0), bitsPerPixelX16(0), pDscOutParams(NULL) {}
};
class Group;
struct DpLinkIsModePossibleParams
{
struct
{
Group * pTarget;
DpModesetParams *pModesetParams;
DP_IMP_ERROR *pErrorStatus;
DscParams *pDscParams;
} head[NV_MAX_HEADS];
};
struct DpPreModesetParams
{
struct
{
Group *pTarget;
const DpModesetParams *pModesetParams;
} head[NV_MAX_HEADS];
NvU32 headMask;
};
bool SetConfigSingleHeadMultiStreamMode(Group **targets, // Array of group pointers given for getting configured in single head multistream mode.
NvU32 displayIDs[], // Array of displayIDs given for getting configured in single head multistream mode.
NvU32 numStreams, // Number of streams driven out from single head.
@@ -418,7 +468,7 @@ namespace DisplayPort
// Will tell you if you have sufficient bandwidth to operate
// two panels at 1920x1080 and 1280x1024 assuming all currently
// attached panels are detached.
virtual void beginCompoundQuery() = 0;
virtual void beginCompoundQuery(const bool bForceEnableFEC = false) = 0;
//
// twoChannelAudioHz
@@ -442,14 +492,18 @@ namespace DisplayPort
unsigned rasterHeight,
unsigned rasterBlankStartX,
unsigned rasterBlankEndX,
unsigned depth) = 0;
unsigned depth,
DP_IMP_ERROR *errorStatus = NULL) = 0;
virtual bool compoundQueryAttach(Group * target,
const DpModesetParams &modesetParams, // Modeset info
DscParams *pDscParams) = 0; // DSC parameters
DscParams *pDscParams, // DSC parameters
DP_IMP_ERROR *errorStatus = NULL) = 0; // Error Status code
virtual bool endCompoundQuery() = 0;
virtual bool dpLinkIsModePossible(const DpLinkIsModePossibleParams &params) = 0;
// Interface to indicate if clients need to perform a head shutdown before a modeset
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
unsigned headIndex,
@@ -503,6 +557,9 @@ namespace DisplayPort
// Group of panels we're attaching to this head
virtual bool notifyAttachBegin(Group * target, const DpModesetParams &modesetParams) = 0;
virtual void dpPreModeset(const DpPreModesetParams &modesetParams) = 0;
virtual void dpPostModeset(void) = 0;
virtual void readRemoteHdcpCaps() = 0;
// modeset might be cancelled when NAB failed
@@ -674,6 +731,8 @@ namespace DisplayPort
virtual bool readPsrEvtIndicator(vesaPsrEventIndicator *psrErr) = 0;
virtual bool updatePsrLinkState(bool bTrainLink) = 0;
virtual bool readPrSinkDebugInfo(panelReplaySinkDebugInfo *prDbgInfo) = 0;
protected:
virtual ~Connector() {}
};

View File

@@ -76,6 +76,13 @@ namespace DisplayPort
DP_TRANSPORT_MODE_MULTI_STREAM = 2,
} DP_TRANSPORT_MODE;
// Information required during compound query attach for MST
typedef struct _CompoundQueryAttachMSTInfo
{
ModesetInfo localModesetInfo;
LinkConfiguration lc;
} CompoundQueryAttachMSTInfo;
struct ConnectorImpl : public Connector, DiscoveryManager::DiscoveryManagerEventSink, Timer::TimerCallback, MessageManager::MessageReceiver::MessageReceiverEventSink
{
// DPCD HAL Layer - We should use this in place of direct register accesses
@@ -93,12 +100,14 @@ namespace DisplayPort
unsigned cachedSourceOUI;
char cachedSourceModelName[NV_DPCD_SOURCE_DEV_ID_STRING__SIZE + 1];
NvU8 cachedSourceChipRevision;
bool bOuiCached;
unsigned ouiId; // Sink ouiId
char modelName[NV_DPCD_SOURCE_DEV_ID_STRING__SIZE + 1]; // Device Model-name
bool bIgnoreSrcOuiHandshake; // Skip writing source OUI
LinkPolicy linkPolicy;
LinkPolicy linkPolicy;
bool linkGuessed; // True when link was "guessed" during HPD in TMDS mode
bool isLinkQuiesced; // True when link was set to quiet mode by TMDS modeset
@@ -176,11 +185,14 @@ namespace DisplayPort
LinkedList<GroupImpl> addStreamMSTIntransitionGroups;
List inactiveGroups;
LinkedList<Device> dscEnabledDevices;
// Compound query
bool compoundQueryActive;
bool compoundQueryResult;
unsigned compoundQueryCount;
unsigned compoundQueryLocalLinkPBN;
bool compoundQueryForceEnableFEC;
unsigned freeSlots, maximumSlots;
@@ -334,13 +346,8 @@ namespace DisplayPort
//
bool bPowerDownPhyBeforeD3;
//
// Reset the MSTM_CTRL registers on Synaptics branch device irrespective of
// IRQ VECTOR register having stale message. Synaptics device needs to reset
// the topology before issue of new LAM message if previous LAM was not finished
// bug 3928070
//
bool bForceClearPendingMsg;
Group *perHeadAttachedGroup[NV_MAX_HEADS];
NvU32 inTransitionHeadMask;
void sharedInit();
ConnectorImpl(MainLink * main, AuxBus * auxBus, Timer * timer, Connector::EventSink * sink);
@@ -386,6 +393,7 @@ namespace DisplayPort
}
void populateAllDpConfigs();
virtual LinkRates* importDpLinkRates();
//
// Suspend resume API
@@ -403,7 +411,7 @@ namespace DisplayPort
virtual Device * enumDevices(Device * previousDevice) ;
virtual void beginCompoundQuery() ;
virtual void beginCompoundQuery(const bool bForceEnableFEC = false) ;
virtual bool compoundQueryAttach(Group * target,
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
unsigned eightChannelAudioHz, // Same setting for multi channel audio.
@@ -413,14 +421,56 @@ namespace DisplayPort
unsigned rasterHeight,
unsigned rasterBlankStartX,
unsigned rasterBlankEndX,
unsigned depth);
unsigned depth,
DP_IMP_ERROR *errorStatus = NULL);
virtual bool compoundQueryAttach(Group * target,
const DpModesetParams &modesetParams, // Modeset info
DscParams *pDscParams = NULL); // DSC parameters
DscParams *pDscParams = NULL, // DSC parameters
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
virtual bool endCompoundQuery();
virtual bool dpLinkIsModePossible(const DpLinkIsModePossibleParams &params);
virtual bool compoundQueryAttachMST(Group * target,
const DpModesetParams &modesetParams, // Modeset info
DscParams *pDscParams = NULL, // DSC parameters
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
virtual bool compoundQueryAttachMSTIsDscPossible
(
Group * target,
const DpModesetParams &modesetParams, // Modeset info
DscParams *pDscParams = NULL // DSC parameters
);
// Calculate and Configure SW state based on DSC
virtual bool compoundQueryAttachMSTDsc
(
Group * target,
const DpModesetParams &modesetParams, // Modeset info
CompoundQueryAttachMSTInfo * info, // local info to update for later use
DscParams *pDscParams = NULL, // DSC parameters
DP_IMP_ERROR *pErrorCode = NULL // Error Status code
);
// General part of CQA MST for DSC/non-DSC
virtual bool compoundQueryAttachMSTGeneric
(
Group * target,
const DpModesetParams &modesetParams, // Modeset info
CompoundQueryAttachMSTInfo * info, // local info with updates for DSC
DscParams *pDscParams = NULL, // DSC parameters
DP_IMP_ERROR *pErrorCode = NULL // Error Status code
);
virtual bool compoundQueryAttachSST(Group * target,
const DpModesetParams &modesetParams, // Modeset info
DscParams *pDscParams = NULL, // DSC parameters
DP_IMP_ERROR *pErrorCode = NULL); // Error Status code
//
// Timer callback tags.
// (we pass the address of these variables as context to ::expired)
@@ -458,6 +508,11 @@ namespace DisplayPort
virtual bool notifyAttachBegin(Group * target, // Group of panels we're attaching to this head
const DpModesetParams &modesetParams);
bool needToEnableFEC(const DpPreModesetParams &params);
virtual void dpPreModeset(const DpPreModesetParams &modesetParams);
virtual void dpPostModeset(void);
virtual bool isHeadShutDownNeeded(Group * target, // Group of panels we're attaching to this head
unsigned headIndex,
unsigned twoChannelAudioHz, // if you need 192khz stereo specify 192000 here
@@ -559,6 +614,7 @@ namespace DisplayPort
void handleHdmiLinkStatusChanged();
void sortActiveGroups(bool ascending);
void configInit();
void handlePanelReplayError();
virtual DeviceImpl* findDeviceInList(const Address & address);
virtual void disconnectDeviceList();
@@ -584,6 +640,7 @@ namespace DisplayPort
virtual void setDp11ProtocolForced();
virtual void resetDp11ProtocolForced();
virtual bool isDp11ProtocolForced();
bool isAcpiInitDone();
virtual void notifyAcpiInitDone();
Group * createFirmwareGroup();
@@ -609,6 +666,8 @@ namespace DisplayPort
virtual bool readPsrState(vesaPsrState *psrState);
virtual bool updatePsrLinkState(bool bTrainLink);
virtual bool readPrSinkDebugInfo(panelReplaySinkDebugInfo *prDbgInfo);
// for dp test utility. pBuffer is the request buffer of type DP_STATUS_REQUEST_xxxx
DP_TESTMESSAGE_STATUS sendDPTestMessage(void *pBuffer,
NvU32 requestSize,

View File

@@ -255,13 +255,13 @@ namespace DisplayPort
virtual bool isLoop()
{
DP_LOG(("isLoop implementation is pending (bug 791059)"));
// implementation is pending (bug 791059)
return false;
}
virtual bool isRedundant()
{
DP_LOG(("isRedundant implementation is pending (bug 791059)"));
// implementation is pending (bug 791059)
return false;
}

View File

@@ -43,7 +43,6 @@
#define HDCP_DUMMY_CN (0x1)
#define HDCP_DUMMY_CKSV (0xFFFFF)
namespace DisplayPort
{
class EvoInterface
@@ -148,8 +147,7 @@ namespace DisplayPort
// Bit mask for GPU supported DP versions.
// Defines the same as NV0073_CTRL_CMD_DP_GET_CAPS_PARAMS.dpVersionsSupported
//
NvU32 _gpuSupportedDpVersions;
NvU32 _gpuSupportedDpVersions;
bool _isStreamCloningEnabled;
bool _needForceRmEdid;
bool _skipPowerdownEDPPanelWhenHeadDetach;
@@ -160,7 +158,6 @@ namespace DisplayPort
bool _applyLinkBwOverrideWarRegVal;
bool _isDynamicMuxCapable;
bool _enableMSAOverrideOverMST;
bool _enableFecCheckForDDS;
bool _isLTPhyRepeaterSupported;
//
@@ -208,7 +205,6 @@ namespace DisplayPort
{
return _gpuSupportedDpVersions;
}
virtual bool isFECSupported()
{
return _isFECSupported;

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2010-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2010-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -36,40 +36,66 @@
#include "ctrl/ctrl0073/ctrl0073specific.h" // NV0073_CTRL_HDCP_VPRIME_SIZE
#include "displayport.h"
namespace DisplayPort
{
typedef NvU64 LinkRate;
class LinkRates : virtual public Object
{
public:
NvU8 entries;
virtual void clear() = 0;
virtual bool import(NvU8 linkBw)
{
DP_ASSERT(0);
return false;
}
virtual LinkRate getLowerRate(LinkRate rate) = 0;
virtual LinkRate getMaxRate() = 0;
virtual NvU8 getNumElements() = 0;
NvU8 getNumLinkRates()
{
return entries;
}
};
class LinkRates1x : virtual public LinkRates
{
public:
// Store link rate in multipler of 270MBPS to save space
NvU8 element[NV_DPCD_SUPPORTED_LINK_RATES__SIZE];
NvU8 entries;
NvU8 element[NV_SUPPORTED_DP1X_LINK_RATES__SIZE];
LinkRates()
LinkRates1x()
{
entries = 0;
for (int i = 0; i < NV_DPCD_SUPPORTED_LINK_RATES__SIZE; i++)
for (int i = 0; i < NV_SUPPORTED_DP1X_LINK_RATES__SIZE; i++)
{
element[i] = 0;
}
}
void clear()
virtual void clear()
{
entries = 0;
for (int i = 0; i < NV_DPCD_SUPPORTED_LINK_RATES__SIZE; i++)
for (int i = 0; i < NV_SUPPORTED_DP1X_LINK_RATES__SIZE; i++)
{
element[i] = 0;
}
}
bool import(NvU8 linkBw)
virtual bool import(NvU8 linkBw)
{
if (entries < NV_DPCD_SUPPORTED_LINK_RATES__SIZE)
if (!IS_VALID_LINKBW(linkBw))
{
DP_ASSERT(0 && "Unsupported Link Bandwidth");
return false;
}
if (entries < NV_SUPPORTED_DP1X_LINK_RATES__SIZE)
{
element[entries] = linkBw;
entries++;
@@ -79,12 +105,7 @@ namespace DisplayPort
return false;
}
NvU8 getNumLinkRates()
{
return entries;
}
LinkRate getLowerRate(LinkRate rate)
virtual LinkRate getLowerRate(LinkRate rate)
{
int i;
NvU8 linkBw = (NvU8)(rate / DP_LINK_BW_FREQ_MULTI_MBPS);
@@ -102,24 +123,29 @@ namespace DisplayPort
return rate;
}
LinkRate getMaxRate()
virtual LinkRate getMaxRate()
{
LinkRate rate = 0;
if ((entries > 0) &&
(entries <= NV_DPCD_SUPPORTED_LINK_RATES__SIZE))
(entries <= NV_SUPPORTED_DP1X_LINK_RATES__SIZE))
{
rate = (LinkRate)element[entries - 1] * DP_LINK_BW_FREQ_MULTI_MBPS;
}
return rate;
}
virtual NvU8 getNumElements()
{
return NV_SUPPORTED_DP1X_LINK_RATES__SIZE;
}
};
class LinkPolicy : virtual public Object
{
bool bNoFallback; // No fallback when LT fails
LinkRates linkRates;
protected:
bool bNoFallback; // No fallback when LT fails
LinkRates1x linkRates;
public:
LinkPolicy() : bNoFallback(false)
{
@@ -138,13 +164,25 @@ namespace DisplayPort
return &linkRates;
}
};
enum
{
totalTimeslots = 64,
totalUsableTimeslots = totalTimeslots - 1
};
// in 10bps
//
// Link Data Rate per DP Lane, in MBPS,
// For 8b/10b channel coding:
// Link Data Rate = link rate * (8 / 10) / 8
// = link rate * 0.1
// For 128b/132b channel coding:
// Link Data Rate = link rate * (128 / 132) / 8
// = link rate * 4 / 33
// ~= link rate * 0.12
//
// Link Bandwidth = Lane Count * Link Data Rate
//
enum
{
RBR = 162000000,

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -172,7 +172,6 @@ namespace DisplayPort
virtual bool hasMultistream() = 0;
virtual bool isPC2Disabled() = 0;
virtual NvU32 getGpuDpSupportedVersions() = 0;
virtual bool isStreamCloningEnabled() = 0;
virtual NvU32 maxLinkRateSupported() = 0;
virtual bool isLttprSupported() = 0;

View File

@@ -59,9 +59,6 @@
#define NV_DP_REGKEY_FORCE_EDP_ILR "DP_BYPASS_EDP_ILR_REV_CHECK"
// Regkey to make sure enable FEC only when RM notified sink successfully
#define NV_DP_CHECK_FEC_FOR_DDS_DSC_PANEL "DP_DDS_CHECK_FEC_TO_ENABLE"
// Message to power down video stream before power down link (set D3)
#define NV_DP_REGKEY_POWER_DOWN_PHY "DP_POWER_DOWN_PHY"
@@ -77,7 +74,6 @@
//
#define NV_DP_DSC_MST_CAP_BUG_3143315 "DP_DSC_MST_CAP_BUG_3143315"
//
// Data Base used to store all the regkey values.
// The actual data base is declared statically in dp_evoadapter.cpp.
@@ -110,7 +106,6 @@ struct DP_REGKEY_DATABASE
bool bBypassEDPRevCheck;
bool bDscMstCapBug3143315;
bool bPowerDownPhyBeforeD3;
bool bCheckFECForDynamicMuxDSCPanel;
bool bReassessMaxLink;
};