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