From fae2c17b313e2838652c32ea4a576172b4063639 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 May 2008 12:14:44 +1000 Subject: drm: add more encoder interfaces --- shared-core/drm.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index eb2033c7..6cb68685 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -1026,9 +1026,11 @@ struct drm_mode_card_res { uint64_t fb_id_ptr; uint64_t crtc_id_ptr; uint64_t output_id_ptr; + uint64_t encoder_id_ptr; int count_fbs; int count_crtcs; int count_outputs; + int count_encoders; int min_width, max_width; int min_height, max_height; }; @@ -1051,6 +1053,15 @@ struct drm_mode_crtc { struct drm_mode_modeinfo mode; }; +struct drm_mode_get_encoder { + + uint32_t encoder_type; + uint32_t encoder_id; + + uint32_t crtcs; + uint32_t clones; +}; + #define DRM_MODE_OUTPUT_NONE 0 #define DRM_MODE_OUTPUT_DAC 1 #define DRM_MODE_OUTPUT_TMDS 2 @@ -1059,12 +1070,15 @@ struct drm_mode_crtc { struct drm_mode_get_output { + uint64_t encoders_ptr; uint64_t modes_ptr; uint64_t props_ptr; uint64_t prop_values_ptr; int count_modes; int count_props; + int count_encoders; + unsigned int output; /**< Id */ unsigned int crtc; /**< Id of crtc */ unsigned int output_type; @@ -1277,6 +1291,7 @@ struct drm_mode_hotplug { #define DRM_IOCTL_WAIT_HOTPLUG DRM_IOWR(0xAE, union drm_wait_hotplug) #define DRM_IOCTL_MODE_REPLACEFB DRM_IOWR(0xAF, struct drm_mode_fb_cmd) +#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xB0, struct drm_mode_get_encoder) /*@}*/ /** -- cgit v1.2.3 From 6aeef92c0cad784a5019ea90d97ab81f4e51fdd9 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 May 2008 13:57:27 +1000 Subject: drm: attach an encoder. Time to do some renaming on the connectors I think --- shared-core/drm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 6cb68685..0005bb0b 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -1062,8 +1062,14 @@ struct drm_mode_get_encoder { uint32_t clones; }; +#define DRM_MODE_ENCODER_NONE 0 +#define DRM_MODE_ENCODER_DAC 1 +#define DRM_MODE_ENCODER_TMDS 2 +#define DRM_MODE_ENCODER_LVDS 3 +#define DRM_MODE_ENCODER_TVDAC 4 + #define DRM_MODE_OUTPUT_NONE 0 -#define DRM_MODE_OUTPUT_DAC 1 +#define DRM_MODE_OUTPUT_VGA 1 #define DRM_MODE_OUTPUT_TMDS 2 #define DRM_MODE_OUTPUT_LVDS 3 #define DRM_MODE_OUTPUT_TVDAC 4 -- cgit v1.2.3 From 9d38448ed33aaff324cc4bbe1e0878593e97d07d Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 May 2008 15:03:12 +1000 Subject: modesetting: the great renaming. Okay we have crtc, encoder and connectors. No more outputs exposed beyond driver internals I've broken intel tv connector stuff. Really for TV we should have one TV connector, with a sub property for the type of signal been driven over it --- shared-core/drm.h | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 0005bb0b..a7f590dc 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -558,7 +558,7 @@ union drm_wait_vblank { /* Handle monitor hotplug. * * May want to extend this later to pass reply information which - * details the outputs which generated the hotplug event. + * details the connectors which generated the hotplug event. * Some chipsets can't determine that though, and we'd need to leave * it to the higher levels to determine exactly what changed. */ @@ -998,7 +998,7 @@ struct drm_mm_info_arg { * Drm mode setting */ #define DRM_DISPLAY_INFO_LEN 32 -#define DRM_OUTPUT_NAME_LEN 32 +#define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32 #define DRM_PROP_NAME_LEN 32 @@ -1025,29 +1025,29 @@ struct drm_mode_modeinfo { struct drm_mode_card_res { uint64_t fb_id_ptr; uint64_t crtc_id_ptr; - uint64_t output_id_ptr; + uint64_t connector_id_ptr; uint64_t encoder_id_ptr; int count_fbs; int count_crtcs; - int count_outputs; + int count_connectors; int count_encoders; int min_width, max_width; int min_height, max_height; }; struct drm_mode_crtc { - uint64_t set_outputs_ptr; + uint64_t set_connectors_ptr; unsigned int crtc_id; /**< Id */ unsigned int fb_id; /**< Id of framebuffer */ int x, y; /**< Position on the frameuffer */ - int count_outputs; - unsigned int outputs; /**< Outputs that are connected */ + int count_connectors; + unsigned int connectors; /**< Connectors that are connected */ int count_possibles; - unsigned int possibles; /**< Outputs that can be connected */ + unsigned int possibles; /**< Connectors that can be connected */ int gamma_size; int mode_valid; struct drm_mode_modeinfo mode; @@ -1068,13 +1068,7 @@ struct drm_mode_get_encoder { #define DRM_MODE_ENCODER_LVDS 3 #define DRM_MODE_ENCODER_TVDAC 4 -#define DRM_MODE_OUTPUT_NONE 0 -#define DRM_MODE_OUTPUT_VGA 1 -#define DRM_MODE_OUTPUT_TMDS 2 -#define DRM_MODE_OUTPUT_LVDS 3 -#define DRM_MODE_OUTPUT_TVDAC 4 - -struct drm_mode_get_output { +struct drm_mode_get_connector { uint64_t encoders_ptr; uint64_t modes_ptr; @@ -1085,10 +1079,10 @@ struct drm_mode_get_output { int count_props; int count_encoders; - unsigned int output; /**< Id */ + unsigned int connector; /**< Id */ unsigned int crtc; /**< Id of crtc */ - unsigned int output_type; - unsigned int output_type_id; + unsigned int connector_type; + unsigned int connector_type_id; unsigned int connection; unsigned int mm_width, mm_height; /**< HxW in millimeters */ @@ -1122,10 +1116,10 @@ struct drm_mode_get_property { int count_enum_blobs; }; -struct drm_mode_output_set_property { +struct drm_mode_connector_set_property { uint64_t value; unsigned int prop_id; - unsigned int output_id; + unsigned int connector_id; }; struct drm_mode_get_blob { @@ -1144,7 +1138,7 @@ struct drm_mode_fb_cmd { }; struct drm_mode_mode_cmd { - unsigned int output_id; + unsigned int connector_id; struct drm_mode_modeinfo mode; }; @@ -1280,13 +1274,13 @@ struct drm_mode_hotplug { #define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) #define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) -#define DRM_IOCTL_MODE_GETOUTPUT DRM_IOWR(0xA2, struct drm_mode_get_output) +#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA2, struct drm_mode_get_connector) #define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA3, struct drm_mode_crtc) #define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xA4, struct drm_mode_fb_cmd) #define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xA5, unsigned int) #define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xA6, struct drm_mode_fb_cmd) -#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xA7, struct drm_mode_output_set_property) +#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xA7, struct drm_mode_connector_set_property) #define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xA8, struct drm_mode_get_blob) #define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) #define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xAA, struct drm_mode_mode_cmd) -- cgit v1.2.3 From 5d47185eb69d73dd7e6ee3ddde4d0c7642c2d5b7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 May 2008 15:32:58 +1000 Subject: drm: switch possible crtc/clones over to encoders --- shared-core/drm.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index a7f590dc..1fcbf144 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -1087,10 +1087,6 @@ struct drm_mode_get_connector { unsigned int connection; unsigned int mm_width, mm_height; /**< HxW in millimeters */ unsigned int subpixel; - int count_crtcs; - int count_clones; - unsigned int crtcs; /**< possible crtc to connect to */ - unsigned int clones; /**< list of clones */ }; #define DRM_MODE_PROP_PENDING (1<<0) -- cgit v1.2.3 From e439e74776b215d70d8e34e8aa9cea22179dcbc6 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 2 Jun 2008 10:05:54 +1000 Subject: drm/modesetting: another re-org of some internals. Move dpms into the helper functions. Move crtc into the encoder. Move disable unused functions into the helper. --- shared-core/drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 1fcbf144..7e94fb82 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -1058,6 +1058,7 @@ struct drm_mode_get_encoder { uint32_t encoder_type; uint32_t encoder_id; + unsigned int crtc; /**< Id of crtc */ uint32_t crtcs; uint32_t clones; }; @@ -1079,8 +1080,8 @@ struct drm_mode_get_connector { int count_props; int count_encoders; + unsigned int encoder; /**< Current Encoder */ unsigned int connector; /**< Id */ - unsigned int crtc; /**< Id of crtc */ unsigned int connector_type; unsigned int connector_type_id; -- cgit v1.2.3