mutter/src/backends/native/meta-kms-connector-private.h
Daniel van Vugt 33ee155630 kms-connector: Add "max bpc" property
This limits the bits-per-channel colour depth of the signal that
the connector is allowed to output.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>
2022-08-19 17:07:12 +00:00

121 lines
4.5 KiB
C

/*
* Copyright (C) 2019 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_KMS_CONNECTOR_PRIVATE_H
#define META_KMS_CONNECTOR_PRIVATE_H
#include "backends/native/meta-kms-connector.h"
typedef enum _MetaKmsConnectorProp
{
META_KMS_CONNECTOR_PROP_CRTC_ID = 0,
META_KMS_CONNECTOR_PROP_DPMS,
META_KMS_CONNECTOR_PROP_UNDERSCAN,
META_KMS_CONNECTOR_PROP_UNDERSCAN_HBORDER,
META_KMS_CONNECTOR_PROP_UNDERSCAN_VBORDER,
META_KMS_CONNECTOR_PROP_PRIVACY_SCREEN_SW_STATE,
META_KMS_CONNECTOR_PROP_PRIVACY_SCREEN_HW_STATE,
META_KMS_CONNECTOR_PROP_EDID,
META_KMS_CONNECTOR_PROP_TILE,
META_KMS_CONNECTOR_PROP_SUGGESTED_X,
META_KMS_CONNECTOR_PROP_SUGGESTED_Y,
META_KMS_CONNECTOR_PROP_HOTPLUG_MODE_UPDATE,
META_KMS_CONNECTOR_PROP_SCALING_MODE,
META_KMS_CONNECTOR_PROP_PANEL_ORIENTATION,
META_KMS_CONNECTOR_PROP_NON_DESKTOP,
META_KMS_CONNECTOR_PROP_MAX_BPC,
META_KMS_CONNECTOR_N_PROPS
} MetaKmsConnectorProp;
typedef enum _MetaKmsConnectorDpms
{
META_KMS_CONNECTOR_DPMS_ON = 0,
META_KMS_CONNECTOR_DPMS_STANDBY,
META_KMS_CONNECTOR_DPMS_SUSPEND,
META_KMS_CONNECTOR_DPMS_OFF,
META_KMS_CONNECTOR_DPMS_N_PROPS,
META_KMS_CONNECTOR_DPMS_UNKNOWN,
} MetaKmsConnectorDpms;
typedef enum _MetaKmsConnectorUnderscan
{
META_KMS_CONNECTOR_UNDERSCAN_OFF = 0,
META_KMS_CONNECTOR_UNDERSCAN_ON,
META_KMS_CONNECTOR_UNDERSCAN_AUTO,
META_KMS_CONNECTOR_UNDERSCAN_N_PROPS,
META_KMS_CONNECTOR_UNDERSCAN_UNKNOWN,
} MetaKmsConnectorUnderscan;
typedef enum _MetaKmsConnectorPrivacyScreen
{
META_KMS_CONNECTOR_PRIVACY_SCREEN_ENABLED = 0,
META_KMS_CONNECTOR_PRIVACY_SCREEN_DISABLED,
META_KMS_CONNECTOR_PRIVACY_SCREEN_ENABLED_LOCKED,
META_KMS_CONNECTOR_PRIVACY_SCREEN_DISABLED_LOCKED,
META_KMS_CONNECTOR_PRIVACY_SCREEN_N_PROPS,
META_KMS_CONNECTOR_PRIVACY_SCREEN_UNKNOWN,
} MetaKmsConnectorPrivacyScreen;
typedef enum _MetaKmsConnectorScalingMode
{
META_KMS_CONNECTOR_SCALING_MODE_NONE = 0,
META_KMS_CONNECTOR_SCALING_MODE_FULL,
META_KMS_CONNECTOR_SCALING_MODE_CENTER,
META_KMS_CONNECTOR_SCALING_MODE_FULL_ASPECT,
META_KMS_CONNECTOR_SCALING_MODE_N_PROPS,
META_KMS_CONNECTOR_SCALING_MODE_UNKNOWN,
} MetaKmsConnectorScalingMode;
typedef enum _MetaKmsConnectorPanelOrientation
{
META_KMS_CONNECTOR_PANEL_ORIENTATION_NORMAL = 0,
META_KMS_CONNECTOR_PANEL_ORIENTATION_UPSIDE_DOWN,
META_KMS_CONNECTOR_PANEL_ORIENTATION_LEFT_SIDE_UP,
META_KMS_CONNECTOR_PANEL_ORIENTATION_RIGHT_SIDE_UP,
META_KMS_CONNECTOR_PANEL_ORIENTATION_N_PROPS,
META_KMS_CONNECTOR_PANEL_ORIENTATION_UNKNOWN,
} MetaKmsConnectorPanelOrientation;
uint32_t meta_kms_connector_get_prop_id (MetaKmsConnector *connector,
MetaKmsConnectorProp prop);
const char * meta_kms_connector_get_prop_name (MetaKmsConnector *connector,
MetaKmsConnectorProp prop);
uint64_t meta_kms_connector_get_prop_drm_value (MetaKmsConnector *connector,
MetaKmsConnectorProp prop,
uint64_t value);
MetaKmsResourceChanges meta_kms_connector_update_state (MetaKmsConnector *connector,
drmModeRes *drm_resources);
void meta_kms_connector_disable (MetaKmsConnector *connector);
MetaKmsResourceChanges meta_kms_connector_predict_state (MetaKmsConnector *connector,
MetaKmsUpdate *update);
MetaKmsConnector * meta_kms_connector_new (MetaKmsImplDevice *impl_device,
drmModeConnector *drm_connector,
drmModeRes *drm_resources);
gboolean meta_kms_connector_is_same_as (MetaKmsConnector *connector,
drmModeConnector *drm_connector);
#endif /* META_KMS_CONNECTOR_PRIVATE_H */