diff mbox

[libdrm] Deprecate drmModeAttachMode and drmModeDetachMode

Message ID 1366909787-16981-1-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä April 25, 2013, 5:09 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 xf86drmMode.c | 16 ++++------------
 xf86drmMode.h | 10 ++--------
 2 files changed, 6 insertions(+), 20 deletions(-)
diff mbox

Patch

diff --git a/xf86drmMode.c b/xf86drmMode.c
index f603ceb..74e074d 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -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;
 }
 
 
diff --git a/xf86drmMode.h b/xf86drmMode.h
index 8e40034..0f0c26b 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -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);