mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-24 00:43:57 +00:00
520.56.06
This commit is contained in:
@@ -5200,11 +5200,13 @@ static NvBool EvoSetViewportInOut3(NVDevEvoPtr pDevEvo, const int head,
|
||||
const NVHwModeViewPortEvo *pViewPortMin,
|
||||
const NVHwModeViewPortEvo *pViewPort,
|
||||
const NVHwModeViewPortEvo *pViewPortMax,
|
||||
NVEvoUpdateState *updateState)
|
||||
NVEvoUpdateState *updateState,
|
||||
NvU32 setWindowUsageBounds)
|
||||
{
|
||||
const NVEvoCapabilitiesPtr pEvoCaps = &pDevEvo->gpus[0].capabilities;
|
||||
NVEvoChannelPtr pChannel = pDevEvo->core;
|
||||
struct NvKmsScalingUsageBounds scalingUsageBounds = { };
|
||||
NvU32 win;
|
||||
|
||||
/* These methods should only apply to a single pDpy */
|
||||
nvAssert(pDevEvo->subDevMaskStackDepth > 0);
|
||||
@@ -5250,6 +5252,35 @@ static NvBool EvoSetViewportInOut3(NVDevEvoPtr pDevEvo, const int head,
|
||||
DRF_NUM(C37D, _HEAD_SET_MAX_OUTPUT_SCALE_FACTOR, _VERTICAL,
|
||||
scalingUsageBounds.maxVDownscaleFactor));
|
||||
|
||||
/*
|
||||
* Program MAX_PIXELS_FETCHED_PER_LINE window usage bounds
|
||||
* for each window that is attached to the head.
|
||||
*
|
||||
* Precomp will clip the post-scaled window to the input viewport, reverse-scale
|
||||
* this cropped size back to the input surface domain, and isohub will fetch
|
||||
* this cropped size. This function assumes that there's no window scaling yet,
|
||||
* so the MAX_PIXELS_FETCHED_PER_LINE will be bounded by the input viewport
|
||||
* width. SetScalingUsageBoundsOneWindow5() will take care of updating
|
||||
* MAX_PIXELS_FETCHED_PER_LINE, if window scaling is enabled later.
|
||||
*
|
||||
* Program MAX_PIXELS_FETCHED_PER_LINE for each window that is attached to
|
||||
* head. For Turing+, SetScalingUsageBoundsOneWindow5() will take care of
|
||||
* programming window usage bounds only for the layers/windows in use.
|
||||
*/
|
||||
setWindowUsageBounds |=
|
||||
DRF_NUM(C37D, _WINDOW_SET_WINDOW_USAGE_BOUNDS, _MAX_PIXELS_FETCHED_PER_LINE,
|
||||
GetMaxPixelsFetchedPerLine(pViewPort->in.width,
|
||||
NV_EVO_SCALE_FACTOR_1X));
|
||||
|
||||
for (win = 0; win < pDevEvo->numWindows; win++) {
|
||||
if (head != pDevEvo->headForWindow[win]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nvDmaSetStartEvoMethod(pChannel, NVC37D_WINDOW_SET_WINDOW_USAGE_BOUNDS(win), 1);
|
||||
nvDmaSetEvoMethodData(pChannel, setWindowUsageBounds);
|
||||
}
|
||||
|
||||
return scalingUsageBounds.vUpscalingAllowed;
|
||||
}
|
||||
|
||||
@@ -5260,11 +5291,10 @@ static void EvoSetViewportInOutC3(NVDevEvoPtr pDevEvo, const int head,
|
||||
NVEvoUpdateState *updateState)
|
||||
{
|
||||
NVEvoChannelPtr pChannel = pDevEvo->core;
|
||||
NvU32 win;
|
||||
NvU32 setWindowUsageBounds = NV_EVO3_DEFAULT_WINDOW_USAGE_BOUNDS_C3;
|
||||
NvBool verticalUpscalingAllowed =
|
||||
EvoSetViewportInOut3(pDevEvo, head, pViewPortMin, pViewPort,
|
||||
pViewPortMax, updateState);
|
||||
pViewPortMax, updateState,
|
||||
NV_EVO3_DEFAULT_WINDOW_USAGE_BOUNDS_C3);
|
||||
|
||||
nvDmaSetStartEvoMethod(pChannel,
|
||||
NVC37D_HEAD_SET_HEAD_USAGE_BOUNDS(head), 1);
|
||||
@@ -5274,34 +5304,6 @@ static void EvoSetViewportInOutC3(NVDevEvoPtr pDevEvo, const int head,
|
||||
(verticalUpscalingAllowed ?
|
||||
DRF_DEF(C37D, _HEAD_SET_HEAD_USAGE_BOUNDS, _UPSCALING_ALLOWED, _TRUE) :
|
||||
DRF_DEF(C37D, _HEAD_SET_HEAD_USAGE_BOUNDS, _UPSCALING_ALLOWED, _FALSE)));
|
||||
/*
|
||||
* Program MAX_PIXELS_FETCHED_PER_LINE window usage bounds
|
||||
* for each window that is attached to the head.
|
||||
*
|
||||
* Precomp will clip the post-scaled window to the input viewport, reverse-scale
|
||||
* this cropped size back to the input surface domain, and isohub will fetch
|
||||
* this cropped size. This function assumes that there's no window scaling yet,
|
||||
* so the MAX_PIXELS_FETCHED_PER_LINE will be bounded by the input viewport
|
||||
* width. SetScalingUsageBoundsOneWindow5() will take care of updating
|
||||
* MAX_PIXELS_FETCHED_PER_LINE, if window scaling is enabled later.
|
||||
* On Volta, Program for each window that is attached to head. For turing+,
|
||||
* SetScalingUsageBoundsOneWindow5() will take care of programming window
|
||||
* usage bounds only for the layers/windows in use.
|
||||
*/
|
||||
|
||||
setWindowUsageBounds |=
|
||||
DRF_NUM(C37D, _WINDOW_SET_WINDOW_USAGE_BOUNDS, _MAX_PIXELS_FETCHED_PER_LINE,
|
||||
GetMaxPixelsFetchedPerLine(pViewPort->in.width,
|
||||
NV_EVO_SCALE_FACTOR_1X));
|
||||
|
||||
for (win = 0; win < pDevEvo->numWindows; win++) {
|
||||
if (head != pDevEvo->headForWindow[win]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nvDmaSetStartEvoMethod(pChannel, NVC37D_WINDOW_SET_WINDOW_USAGE_BOUNDS(win), 1);
|
||||
nvDmaSetEvoMethodData(pChannel, setWindowUsageBounds);
|
||||
}
|
||||
}
|
||||
|
||||
static void EvoSetViewportInOutC5(NVDevEvoPtr pDevEvo, const int head,
|
||||
@@ -5311,9 +5313,13 @@ static void EvoSetViewportInOutC5(NVDevEvoPtr pDevEvo, const int head,
|
||||
NVEvoUpdateState *updateState)
|
||||
{
|
||||
NVEvoChannelPtr pChannel = pDevEvo->core;
|
||||
NvU32 setWindowUsageBounds =
|
||||
(NV_EVO3_DEFAULT_WINDOW_USAGE_BOUNDS_C5 |
|
||||
DRF_DEF(C57D, _WINDOW_SET_WINDOW_USAGE_BOUNDS, _INPUT_SCALER_TAPS, _TAPS_2) |
|
||||
DRF_DEF(C57D, _WINDOW_SET_WINDOW_USAGE_BOUNDS, _UPSCALING_ALLOWED, _FALSE));
|
||||
NvU32 verticalUpscalingAllowed =
|
||||
EvoSetViewportInOut3(pDevEvo, head, pViewPortMin, pViewPort,
|
||||
pViewPortMax, updateState);
|
||||
pViewPortMax, updateState, setWindowUsageBounds);
|
||||
|
||||
nvDmaSetStartEvoMethod(pChannel,
|
||||
NVC57D_HEAD_SET_HEAD_USAGE_BOUNDS(head), 1);
|
||||
|
||||
Reference in New Issue
Block a user