aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_connector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_connector.h')
-rw-r--r--include/drm/drm_connector.h54
1 files changed, 52 insertions, 2 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 5971577016a2..ed38df4ac204 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -177,6 +177,35 @@ enum drm_link_status {
177}; 177};
178 178
179/** 179/**
180 * enum drm_panel_orientation - panel_orientation info for &drm_display_info
181 *
182 * This enum is used to track the (LCD) panel orientation. There are no
183 * separate #defines for the uapi!
184 *
185 * @DRM_MODE_PANEL_ORIENTATION_UNKNOWN: The drm driver has not provided any
186 * panel orientation information (normal
187 * for non panels) in this case the "panel
188 * orientation" connector prop will not be
189 * attached.
190 * @DRM_MODE_PANEL_ORIENTATION_NORMAL: The top side of the panel matches the
191 * top side of the device's casing.
192 * @DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP: The top side of the panel matches the
193 * bottom side of the device's casing, iow
194 * the panel is mounted upside-down.
195 * @DRM_MODE_PANEL_ORIENTATION_LEFT_UP: The left side of the panel matches the
196 * top side of the device's casing.
197 * @DRM_MODE_PANEL_ORIENTATION_RIGHT_UP: The right side of the panel matches the
198 * top side of the device's casing.
199 */
200enum drm_panel_orientation {
201 DRM_MODE_PANEL_ORIENTATION_UNKNOWN = -1,
202 DRM_MODE_PANEL_ORIENTATION_NORMAL = 0,
203 DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP,
204 DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
205 DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
206};
207
208/**
180 * struct drm_display_info - runtime data about the connected sink 209 * struct drm_display_info - runtime data about the connected sink
181 * 210 *
182 * Describes a given display (e.g. CRT or flat panel) and its limitations. For 211 * Describes a given display (e.g. CRT or flat panel) and its limitations. For
@@ -224,6 +253,15 @@ struct drm_display_info {
224#define DRM_COLOR_FORMAT_YCRCB420 (1<<3) 253#define DRM_COLOR_FORMAT_YCRCB420 (1<<3)
225 254
226 /** 255 /**
256 * @panel_orientation: Read only connector property for built-in panels,
257 * indicating the orientation of the panel vs the device's casing.
258 * drm_connector_init() sets this to DRM_MODE_PANEL_ORIENTATION_UNKNOWN.
259 * When not UNKNOWN this gets used by the drm_fb_helpers to rotate the
260 * fb to compensate and gets exported as prop to userspace.
261 */
262 int panel_orientation;
263
264 /**
227 * @color_formats: HDMI Color formats, selects between RGB and YCrCb 265 * @color_formats: HDMI Color formats, selects between RGB and YCrCb
228 * modes. Used DRM_COLOR_FORMAT\_ defines, which are _not_ the same ones 266 * modes. Used DRM_COLOR_FORMAT\_ defines, which are _not_ the same ones
229 * as used to describe the pixel format in framebuffers, and also don't 267 * as used to describe the pixel format in framebuffers, and also don't
@@ -271,6 +309,11 @@ struct drm_display_info {
271 bool dvi_dual; 309 bool dvi_dual;
272 310
273 /** 311 /**
312 * @has_hdmi_infoframe: Does the sink support the HDMI infoframe?
313 */
314 bool has_hdmi_infoframe;
315
316 /**
274 * @edid_hdmi_dc_modes: Mask of supported hdmi deep color modes. Even 317 * @edid_hdmi_dc_modes: Mask of supported hdmi deep color modes. Even
275 * more stuff redundant with @bus_formats. 318 * more stuff redundant with @bus_formats.
276 */ 319 */
@@ -705,7 +748,6 @@ struct drm_cmdline_mode {
705 * @force: a DRM_FORCE_<foo> state for forced mode sets 748 * @force: a DRM_FORCE_<foo> state for forced mode sets
706 * @override_edid: has the EDID been overwritten through debugfs for testing? 749 * @override_edid: has the EDID been overwritten through debugfs for testing?
707 * @encoder_ids: valid encoders for this connector 750 * @encoder_ids: valid encoders for this connector
708 * @encoder: encoder driving this connector, if any
709 * @eld: EDID-like data, if present 751 * @eld: EDID-like data, if present
710 * @latency_present: AV delay info from ELD, if found 752 * @latency_present: AV delay info from ELD, if found
711 * @video_latency: video latency info from ELD, if found 753 * @video_latency: video latency info from ELD, if found
@@ -875,7 +917,13 @@ struct drm_connector {
875 917
876#define DRM_CONNECTOR_MAX_ENCODER 3 918#define DRM_CONNECTOR_MAX_ENCODER 3
877 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; 919 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
878 struct drm_encoder *encoder; /* currently active encoder */ 920 /**
921 * @encoder: Currently bound encoder driving this connector, if any.
922 * Only really meaningful for non-atomic drivers. Atomic drivers should
923 * instead look at &drm_connector_state.best_encoder, and in case they
924 * need the CRTC driving this output, &drm_connector_state.crtc.
925 */
926 struct drm_encoder *encoder;
879 927
880#define MAX_ELD_BYTES 128 928#define MAX_ELD_BYTES 128
881 /* EDID bits */ 929 /* EDID bits */
@@ -1035,6 +1083,8 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
1035 const struct edid *edid); 1083 const struct edid *edid);
1036void drm_mode_connector_set_link_status_property(struct drm_connector *connector, 1084void drm_mode_connector_set_link_status_property(struct drm_connector *connector,
1037 uint64_t link_status); 1085 uint64_t link_status);
1086int drm_connector_init_panel_orientation_property(
1087 struct drm_connector *connector, int width, int height);
1038 1088
1039/** 1089/**
1040 * struct drm_tile_group - Tile group metadata 1090 * struct drm_tile_group - Tile group metadata