TianoCore EDK2 master
Loading...
Searching...
No Matches
Gop.c File Reference

Go to the source code of this file.

Data Structures

struct  GOP_RESOLUTION
 

Macros

#define VGPU_GOP_FROM_GOP(GopPointer)    CR (GopPointer, VGPU_GOP, Gop, VGPU_GOP_SIG)
 

Functions

VOID ReleaseGopResources (IN OUT VGPU_GOP *VgpuGop, IN BOOLEAN DisableHead)
 
STATIC VOID EFIAPI GopNativeResolution (IN VGPU_GOP *VgpuGop, OUT UINT32 *XRes, OUT UINT32 *YRes)
 
STATIC VOID EFIAPI GopInitialize (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This)
 
STATIC EFI_STATUS EFIAPI GopQueryMode (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber, OUT UINTN *SizeOfInfo, OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info)
 
STATIC EFI_STATUS EFIAPI GopSetMode (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN UINT32 ModeNumber)
 
STATIC EFI_STATUS EFIAPI GopBlt (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
 

Variables

STATIC CONST GOP_RESOLUTION mGopResolutions []
 
CONST EFI_GRAPHICS_OUTPUT_PROTOCOL mGopTemplate
 

Detailed Description

EFI_GRAPHICS_OUTPUT_PROTOCOL member functions for the VirtIo GPU driver.

Copyright (C) 2016, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Gop.c.

Macro Definition Documentation

◆ VGPU_GOP_FROM_GOP

#define VGPU_GOP_FROM_GOP (   GopPointer)     CR (GopPointer, VGPU_GOP, Gop, VGPU_GOP_SIG)

Definition at line 193 of file Gop.c.

Function Documentation

◆ GopBlt()

STATIC EFI_STATUS EFIAPI GopBlt ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer  OPTIONAL,
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION  BltOperation,
IN UINTN  SourceX,
IN UINTN  SourceY,
IN UINTN  DestinationX,
IN UINTN  DestinationY,
IN UINTN  Width,
IN UINTN  Height,
IN UINTN Delta  OPTIONAL 
)

Definition at line 549 of file Gop.c.

◆ GopInitialize()

STATIC VOID EFIAPI GopInitialize ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL This)

Definition at line 240 of file Gop.c.

◆ GopNativeResolution()

STATIC VOID EFIAPI GopNativeResolution ( IN VGPU_GOP VgpuGop,
OUT UINT32 *  XRes,
OUT UINT32 *  YRes 
)

Definition at line 199 of file Gop.c.

◆ GopQueryMode()

STATIC EFI_STATUS EFIAPI GopQueryMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL This,
IN UINT32  ModeNumber,
OUT UINTN SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **  Info 
)

Definition at line 303 of file Gop.c.

◆ GopSetMode()

STATIC EFI_STATUS EFIAPI GopSetMode ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL This,
IN UINT32  ModeNumber 
)

Definition at line 344 of file Gop.c.

◆ ReleaseGopResources()

VOID ReleaseGopResources ( IN OUT VGPU_GOP VgpuGop,
IN BOOLEAN  DisableHead 
)

Release guest-side and host-side resources that are related to an initialized VGPU_GOP.Gop.

param[in,out] VgpuGop The VGPU_GOP object to release resources for.

                   On input, the caller is responsible for having called
                   VgpuGop->Gop.SetMode() at least once successfully.
                   (This is equivalent to the requirement that
                   VgpuGop->BackingStore be non-NULL. It is also
                   equivalent to the requirement that VgpuGop->ResourceId
                   be nonzero.)

                   On output, resources will be released, and
                   VgpuGop->BackingStore and VgpuGop->ResourceId will be
                   nulled.

param[in] DisableHead Whether this head (scanout) currently references the resource identified by VgpuGop->ResourceId. Only pass FALSE when VgpuGop->Gop.SetMode() calls this function while switching between modes, and set it to TRUE every other time.

Definition at line 40 of file Gop.c.

Variable Documentation

◆ mGopResolutions

STATIC CONST GOP_RESOLUTION mGopResolutions[]

Definition at line 150 of file Gop.c.

◆ mGopTemplate

Initial value:
= {
GopQueryMode,
GopSetMode,
GopBlt,
}
#define NULL
Definition: Base.h:319

Definition at line 770 of file Gop.c.