summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@bootlin.com>2019-06-19 06:17:51 -0400
committerMaxime Ripard <maxime.ripard@bootlin.com>2019-06-19 06:17:51 -0400
commit22045e8e52bd802f743f0471242782fc3b479707 (patch)
treeea490d0ffd1acde03ccc2a1caeec9ecdd038e395 /include/drm
parent1bf4e09227c345e246062285eba4b8fe660e512e (diff)
drm/connector: Introduce a TV margins structure
The TV margins has been defined as a structure inside the drm_connector_state structure so far. However, we will need it in other structures as well, so let's move that structure definition so that it can be reused. Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/38b773b03f15ec7a135cdf8f7db669e5ada20cf2.1560783090.git-series.maxime.ripard@bootlin.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_connector.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 8eebe0432c73..b22e3150e33d 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -464,13 +464,37 @@ int drm_display_info_set_bus_formats(struct drm_display_info *info,
464 unsigned int num_formats); 464 unsigned int num_formats);
465 465
466/** 466/**
467 * struct drm_connector_tv_margins - TV connector related margins
468 *
469 * Describes the margins in pixels to put around the image on TV
470 * connectors to deal with overscan.
471 */
472struct drm_connector_tv_margins {
473 /**
474 * @bottom: Bottom margin in pixels.
475 */
476 unsigned int bottom;
477
478 /**
479 * @left: Left margin in pixels.
480 */
481 unsigned int left;
482
483 /**
484 * @right: Right margin in pixels.
485 */
486 unsigned int right;
487
488 /**
489 * @top: Top margin in pixels.
490 */
491 unsigned int top;
492};
493
494/**
467 * struct drm_tv_connector_state - TV connector related states 495 * struct drm_tv_connector_state - TV connector related states
468 * @subconnector: selected subconnector 496 * @subconnector: selected subconnector
469 * @margins: margins (all margins are expressed in pixels) 497 * @margins: TV margins
470 * @margins.left: left margin
471 * @margins.right: right margin
472 * @margins.top: top margin
473 * @margins.bottom: bottom margin
474 * @mode: TV mode 498 * @mode: TV mode
475 * @brightness: brightness in percent 499 * @brightness: brightness in percent
476 * @contrast: contrast in percent 500 * @contrast: contrast in percent
@@ -481,12 +505,7 @@ int drm_display_info_set_bus_formats(struct drm_display_info *info,
481 */ 505 */
482struct drm_tv_connector_state { 506struct drm_tv_connector_state {
483 enum drm_mode_subconnector subconnector; 507 enum drm_mode_subconnector subconnector;
484 struct { 508 struct drm_connector_tv_margins margins;
485 unsigned int left;
486 unsigned int right;
487 unsigned int top;
488 unsigned int bottom;
489 } margins;
490 unsigned int mode; 509 unsigned int mode;
491 unsigned int brightness; 510 unsigned int brightness;
492 unsigned int contrast; 511 unsigned int contrast;