mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2025-03-14 09:29:24 +01:00
Merge c32515c11a2f18531cb8ba67a024c1a7255d1462 into 25bef4626e6c5ccf5b433e1c22b6b1bd59e6f1bd
This commit is contained in:
commit
aa20c11397
@ -113,6 +113,8 @@ struct NvKmsKapiDevice {
|
||||
/* Device capabilities */
|
||||
|
||||
struct {
|
||||
NvBool mainLayerSupportsWindowMode;
|
||||
|
||||
struct NvKmsCompositionCapabilities cursorCompositionCaps;
|
||||
struct NvKmsCompositionCapabilities overlayCompositionCaps;
|
||||
|
||||
|
@ -422,6 +422,9 @@ static NvBool KmsAllocateDevice(struct NvKmsKapiDevice *device)
|
||||
|
||||
device->hKmsDevice = paramsAlloc->reply.deviceHandle;
|
||||
|
||||
device->caps.mainLayerSupportsWindowMode =
|
||||
paramsAlloc->reply.layerCaps[NVKMS_MAIN_LAYER].supportsWindowMode;
|
||||
|
||||
device->caps.cursorCompositionCaps =
|
||||
paramsAlloc->reply.cursorCompositionCaps;
|
||||
|
||||
@ -2919,6 +2922,18 @@ static NvBool NvKmsKapiPrimaryLayerConfigToKms(
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
if (layerRequestedConfig->flags.dstXYChanged || bFromKmsSetMode) {
|
||||
/* If the main layer doesn't support window mode,
|
||||
* then return false here to fail the commit/test. */
|
||||
if (!device->caps.mainLayerSupportsWindowMode &&
|
||||
(layerConfig->dstX != 0 || layerConfig->dstY != 0))
|
||||
return NV_FALSE;
|
||||
|
||||
params->layer[NVKMS_MAIN_LAYER].outputPosition.val.x = layerConfig->dstX;
|
||||
params->layer[NVKMS_MAIN_LAYER].outputPosition.val.y = layerConfig->dstY;
|
||||
params->layer[NVKMS_MAIN_LAYER].outputPosition.specified = TRUE;
|
||||
}
|
||||
|
||||
if (layerRequestedConfig->flags.srcXYChanged || bFromKmsSetMode) {
|
||||
params->viewPortIn.point.x = layerConfig->srcX;
|
||||
params->viewPortIn.point.y = layerConfig->srcY;
|
||||
|
@ -321,6 +321,10 @@ static NvBool InitModeOneHeadRequest(
|
||||
pFlip->layer[NVKMS_MAIN_LAYER].sizeOut.val =
|
||||
pFlip->layer[NVKMS_MAIN_LAYER].sizeIn.val;
|
||||
|
||||
pFlip->layer[NVKMS_MAIN_LAYER].outputPosition.specified = TRUE;
|
||||
pFlip->layer[NVKMS_MAIN_LAYER].outputPosition.val.x = 0;
|
||||
pFlip->layer[NVKMS_MAIN_LAYER].outputPosition.val.y = 0;
|
||||
|
||||
/* Disable other layers except Main */
|
||||
for (layer = 0; layer < pDevEvo->apiHead[apiHead].numLayers; layer++) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user