xref: /freebsd-src/stand/efi/include/Protocol/EdidOverride.h (revision 2a63c3be158216222d89a073dcbd6a72ee4aab5a)
1*65641822SToomas Soome /** @file
2*65641822SToomas Soome   EDID Override Protocol from the UEFI 2.0 specification.
3*65641822SToomas Soome 
4*65641822SToomas Soome   Allow platform to provide EDID information to the producer of the Graphics Output
5*65641822SToomas Soome   protocol.
6*65641822SToomas Soome 
7*65641822SToomas Soome   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
8*65641822SToomas Soome   This program and the accompanying materials
9*65641822SToomas Soome   are licensed and made available under the terms and conditions of the BSD License
10*65641822SToomas Soome   which accompanies this distribution.  The full text of the license may be found at
11*65641822SToomas Soome   http://opensource.org/licenses/bsd-license.php
12*65641822SToomas Soome 
13*65641822SToomas Soome   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14*65641822SToomas Soome   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15*65641822SToomas Soome 
16*65641822SToomas Soome **/
17*65641822SToomas Soome 
18*65641822SToomas Soome #ifndef __EDID_OVERRIDE_H__
19*65641822SToomas Soome #define __EDID_OVERRIDE_H__
20*65641822SToomas Soome 
21*65641822SToomas Soome #define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
22*65641822SToomas Soome   { \
23*65641822SToomas Soome     0x48ecb431, 0xfb72, 0x45c0, {0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 } \
24*65641822SToomas Soome   }
25*65641822SToomas Soome 
26*65641822SToomas Soome typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL;
27*65641822SToomas Soome 
28*65641822SToomas Soome #define EFI_EDID_OVERRIDE_DONT_OVERRIDE   0x01
29*65641822SToomas Soome #define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02
30*65641822SToomas Soome 
31*65641822SToomas Soome /**
32*65641822SToomas Soome   Returns policy information and potentially a replacement EDID for the specified video output device.
33*65641822SToomas Soome 
34*65641822SToomas Soome   @param  This              The EFI_EDID_OVERRIDE_PROTOCOL instance.
35*65641822SToomas Soome   @param  ChildHandle       A child handle produced by the Graphics Output EFI
36*65641822SToomas Soome                             driver that represents a video output device.
37*65641822SToomas Soome   @param  Attributes        The attributes associated with ChildHandle video output device.
38*65641822SToomas Soome   @param  EdidSize          A pointer to the size, in bytes, of the Edid buffer.
39*65641822SToomas Soome   @param  Edid              A pointer to callee allocated buffer that contains the EDID that
40*65641822SToomas Soome                             should be used for ChildHandle. A value of NULL
41*65641822SToomas Soome                             represents no EDID override for ChildHandle.
42*65641822SToomas Soome 
43*65641822SToomas Soome   @retval EFI_SUCCESS       Valid overrides returned for ChildHandle.
44*65641822SToomas Soome   @retval EFI_UNSUPPORTED   ChildHandle has no overrides.
45*65641822SToomas Soome 
46*65641822SToomas Soome **/
47*65641822SToomas Soome typedef
48*65641822SToomas Soome EFI_STATUS
49*65641822SToomas Soome (EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID)(
50*65641822SToomas Soome   IN  EFI_EDID_OVERRIDE_PROTOCOL          *This,
51*65641822SToomas Soome   IN  EFI_HANDLE                          *ChildHandle,
52*65641822SToomas Soome   OUT UINT32                              *Attributes,
53*65641822SToomas Soome   IN OUT UINTN                            *EdidSize,
54*65641822SToomas Soome   IN OUT UINT8                            **Edid
55*65641822SToomas Soome   );
56*65641822SToomas Soome 
57*65641822SToomas Soome ///
58*65641822SToomas Soome /// This protocol is produced by the platform to allow the platform to provide
59*65641822SToomas Soome /// EDID information to the producer of the Graphics Output protocol.
60*65641822SToomas Soome ///
61*65641822SToomas Soome struct _EFI_EDID_OVERRIDE_PROTOCOL {
62*65641822SToomas Soome   EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID   GetEdid;
63*65641822SToomas Soome };
64*65641822SToomas Soome 
65*65641822SToomas Soome extern EFI_GUID gEfiEdidOverrideProtocolGuid;
66*65641822SToomas Soome 
67*65641822SToomas Soome #endif
68