Skip to contentSkip to conversation

Deprecate drmModeAttachMode and drmModeDetachMode

PATCH New [email protected] 1 participant 1 message Apr 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Deprecate drmModeAttachMode and drmModeDetachMode

From: Ville Syrjälä <[email protected]>

The kernel no longer implements the ioctls, and they never did anything useful.

---
 xf86drmMode.c | 16 ++++------------
 xf86drmMode.h | 10 ++--------
 2 files changed, 6 insertions(+), 20 deletions(-)
xf86drmMode.c +4 -12
index f603ceb..74e074d 100644
@@ -539,24 +539,16 @@ err_allocs:
 	return r;
 }
 
+/* deprecated */
 int drmModeAttachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info)
 {
-	struct drm_mode_mode_cmd res;
-
-	memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo));
-	res.connector_id = connector_id;
-
-	return DRM_IOCTL(fd, DRM_IOCTL_MODE_ATTACHMODE, &res);
+	return -EINVAL;
 }
 
+/* deprecated */
 int drmModeDetachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info)
 {
-	struct drm_mode_mode_cmd res;
-
-	memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo));
-	res.connector_id = connector_id;
-
-	return DRM_IOCTL(fd, DRM_IOCTL_MODE_DETACHMODE, &res);
+	return -EINVAL;
 }
 
 
xf86drmMode.h +2 -8
index 8e40034..0f0c26b 100644
@@ -398,15 +398,9 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id);
 extern drmModeConnectorPtr drmModeGetConnector(int fd,
 		uint32_t connectorId);
 
-/**
- * Attaches the given mode to an connector.
- */
+/* deprecated */
 extern int drmModeAttachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info);
-
-/**
- * Detaches a mode from the connector
- * must be unused, by the given mode.
- */
+/* deprecated */
 extern int drmModeDetachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info);
 
 extern drmModePropertyPtr drmModeGetProperty(int fd, uint32_t propertyId);
Signature · 6 lines
1.8.1.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel