blob: 9ff58505f44f2e17ba4e505a86d13e89adfd376f [file] [log] [blame]
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.display;
using fuchsia.images2;
using fuchsia.hardware.display.types;
/// Description for a display device attached to the system.
///
/// Display devices include external monitors and internal panels.
type Info = struct {
/// Uniquely identifies the display in a Controller connection.
///
/// See [`fuchsia.hardware.display.types/DisplayId`].
id fuchsia.hardware.display.types.DisplayId;
/// Operational modes supported by the described display device.
///
/// The first entry is the device's preferred mode.
modes vector<fuchsia.hardware.display.types.Mode>:MAX;
/// Pixel formats that can be directly displayed on the attached display.
///
/// This field will be revised to better reflect the subtleties around
/// modern display hardware, such as multiple layer types, and around
/// pixel format modifiers, such as tiling and framebuffer compression
/// formats. See https://fxbug.dev/42072347 and https://fxbug.dev/42076907.
///
/// The formats listed here reflect support from both the display engine
/// hardware and the display device. This means some of the formats may be
/// subject to conversion inside the display engine hardware.
///
/// The first entry in the list is the display's preferred format. This
/// format is likely to be supported for transferring data between the
/// display engine and the display hardware, and not require any conversion
/// inside the display engine.
///
/// Format conversion inside the display engine is likely to be
/// significantly more power-efficient than a GPU render stage or software
/// conversion. So, using any format in this list is better than using the
/// GPU to convert to the preferred format.
pixel_format vector<fuchsia.images2.PixelFormat>:MAX;
/// Part of a display device identifier that persists across boot cycles.
///
/// If the `manufacturer_name`, `monitor_name` and `monitor_serial` fields
/// are all non-empty, they make up an identifier that is likely to be
/// unique to the attached device, and is highly unlikely to change across
/// boot cycles. Software that needs to identify displays (for example, to
/// honor display-specific preferences) should use this triplet.
manufacturer_name string:IDENTIFIER_MAX_LEN;
/// Part of a display device identifier that persists across boot cycles.
///
/// See `manufacturer_name` for details.
monitor_name string:IDENTIFIER_MAX_LEN;
/// Part of a display device identifier that persists across boot cycles.
///
/// See `manufacturer_name` for details.
monitor_serial string:IDENTIFIER_MAX_LEN;
/// Physical horizontal size of the displayed image area, in millimeters.
///
/// If `using_fallback_size` is true, the value is a best guess from the
/// driver. Otherwise, the value here is reported by the display device.
horizontal_size_mm uint32;
/// Physical vertical size of the displayed image area, in millimeters.
///
/// See `horizontal_size_mm` for more details.
vertical_size_mm uint32;
/// True if the driver does not have the display's physical sizing info.
using_fallback_size bool;
};
const IDENTIFIER_MAX_LEN uint32 = 128;