summaryrefslogtreecommitdiff
path: root/src/wfdport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wfdport.c')
-rw-r--r--src/wfdport.c62
1 files changed, 61 insertions, 1 deletions
diff --git a/src/wfdport.c b/src/wfdport.c
index 0409215..ba8178c 100644
--- a/src/wfdport.c
+++ b/src/wfdport.c
@@ -269,6 +269,11 @@ wfd_port_get_attribi(struct wfd_device *device,
}
case WFD_PORT_ATTACHED:
return port->connector->connection == DRM_MODE_CONNECTED;
+ case WFD_PORT_FILL_PORT_AREA:
+ return WFD_TRUE;
+ /* no effect as FILL_PORT_AREA = true */
+ case WFD_PORT_BACKGROUND_COLOR:
+ return 0;
case WFD_PORT_PIPELINE_ID_COUNT:
return wfd_port_choose_pipeline(device, port) != 0 ? 1 : 0;
default:
@@ -306,13 +311,18 @@ wfd_port_get_attribiv(struct wfd_device *device,
case WFD_PORT_NATIVE_RESOLUTION:
if (count != 2)
return;
- if (port->connector-count_modes > 0) {
+ if (port->connector->count_modes > 0) {
value[0] = port->connector->modes[0].hdisplay;
value[1] = port->connector->modes[0].vdisplay;
} else {
value[0] = value[1] = 0;
}
break;
+ case WFD_PORT_BACKGROUND_COLOR:
+ if (count != 3)
+ return;
+ value[0] = 0;
+ break;
case WFD_PORT_BINDABLE_PIPELINE_IDS:
wfd_port_get_bindable_pipelines(device, port, count, value);
break;
@@ -322,6 +332,24 @@ wfd_port_get_attribiv(struct wfd_device *device,
}
void
+wfd_port_get_attribfv(struct wfd_device *device,
+ struct wfd_port *port,
+ WFDPortConfigAttrib attribute,
+ WFDint count,
+ WFDfloat *value)
+{
+ switch (attribute) {
+ case WFD_PORT_BACKGROUND_COLOR:
+ if (count != 3)
+ return;
+ value[0] = value[1] = value[2] = 0.0;
+ break;
+ default:
+ break;
+ }
+}
+
+void
wfd_port_set_attribi(struct wfd_device *device,
struct wfd_port *port,
WFDPortConfigAttrib attribute,
@@ -340,6 +368,38 @@ wfd_port_set_attribi(struct wfd_device *device,
}
port->power_mode = value;
break;
+ /* ignored as FILL_PORT_AREA = true */
+ case WFD_PORT_BACKGROUND_COLOR:
+ default:
+ break;
+ }
+}
+
+void
+wfd_port_set_attribiv(struct wfd_device *device,
+ struct wfd_port *port,
+ WFDPortConfigAttrib attribute,
+ WFDint count,
+ const WFDint *value)
+{
+ switch (attribute) {
+ /* ignored as FILL_PORT_AREA = true */
+ case WFD_PORT_BACKGROUND_COLOR:
+ default:
+ break;
+ }
+}
+
+void
+wfd_port_set_attribfv(struct wfd_device *device,
+ struct wfd_port *port,
+ WFDPortConfigAttrib attribute,
+ WFDint count,
+ const WFDfloat *value)
+{
+ switch (attribute) {
+ /* ignored as FILL_PORT_AREA = true */
+ case WFD_PORT_BACKGROUND_COLOR:
default:
break;
}