backend: add connector capabilities
This commit is contained in:
parent
3c1475041f
commit
078c59d730
2 changed files with 19 additions and 3 deletions
|
|
@ -124,6 +124,13 @@ impl Display for ConnectorKernelId {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bitflags! {
|
||||||
|
ConnectorCaps: u32;
|
||||||
|
CONCAP_CONNECTOR = 1 << 0,
|
||||||
|
CONCAP_MODE_SETTING = 1 << 1,
|
||||||
|
CONCAP_PHYSICAL_DISPLAY = 1 << 2,
|
||||||
|
}
|
||||||
|
|
||||||
pub trait Connector: Any {
|
pub trait Connector: Any {
|
||||||
fn id(&self) -> ConnectorId;
|
fn id(&self) -> ConnectorId;
|
||||||
fn kernel_id(&self) -> ConnectorKernelId;
|
fn kernel_id(&self) -> ConnectorKernelId;
|
||||||
|
|
@ -132,6 +139,10 @@ pub trait Connector: Any {
|
||||||
fn damage(&self);
|
fn damage(&self);
|
||||||
fn drm_dev(&self) -> Option<DrmDeviceId>;
|
fn drm_dev(&self) -> Option<DrmDeviceId>;
|
||||||
fn effectively_locked(&self) -> bool;
|
fn effectively_locked(&self) -> bool;
|
||||||
|
#[expect(dead_code)]
|
||||||
|
fn caps(&self) -> ConnectorCaps {
|
||||||
|
ConnectorCaps::none()
|
||||||
|
}
|
||||||
fn drm_feedback(&self) -> Option<Rc<DrmFeedback>> {
|
fn drm_feedback(&self) -> Option<Rc<DrmFeedback>> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,10 @@ use {
|
||||||
async_engine::{Phase, SpawnedFuture},
|
async_engine::{Phase, SpawnedFuture},
|
||||||
backend::{
|
backend::{
|
||||||
BackendColorSpace, BackendConnectorState, BackendDrmDevice, BackendDrmLease,
|
BackendColorSpace, BackendConnectorState, BackendDrmDevice, BackendDrmLease,
|
||||||
BackendDrmLessee, BackendEvent, BackendLuminance, BackendTransferFunction, Connector,
|
BackendDrmLessee, BackendEvent, BackendLuminance, BackendTransferFunction,
|
||||||
ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId, HardwareCursor,
|
CONCAP_CONNECTOR, CONCAP_MODE_SETTING, CONCAP_PHYSICAL_DISPLAY, Connector,
|
||||||
HardwareCursorUpdate, Mode, MonitorInfo,
|
ConnectorCaps, ConnectorEvent, ConnectorId, ConnectorKernelId, DrmDeviceId,
|
||||||
|
HardwareCursor, HardwareCursorUpdate, Mode, MonitorInfo,
|
||||||
transaction::{
|
transaction::{
|
||||||
BackendConnectorTransaction, BackendConnectorTransactionError,
|
BackendConnectorTransaction, BackendConnectorTransactionError,
|
||||||
BackendConnectorTransactionType, BackendConnectorTransactionTypeDyn,
|
BackendConnectorTransactionType, BackendConnectorTransactionTypeDyn,
|
||||||
|
|
@ -854,6 +855,10 @@ impl Connector for MetalConnector {
|
||||||
fb.locked
|
fb.locked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn caps(&self) -> ConnectorCaps {
|
||||||
|
CONCAP_CONNECTOR | CONCAP_MODE_SETTING | CONCAP_PHYSICAL_DISPLAY
|
||||||
|
}
|
||||||
|
|
||||||
fn drm_feedback(&self) -> Option<Rc<DrmFeedback>> {
|
fn drm_feedback(&self) -> Option<Rc<DrmFeedback>> {
|
||||||
self.drm_feedback.get()
|
self.drm_feedback.get()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue