Skip to content

Commit fe3ebae

Browse files
mripardPhil Elwell
authored andcommitted
drm/connector: Introduce a TV margins structure
Commit 22045e8 upstream. 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
1 parent a20b500 commit fe3ebae

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

‎include/drm/drm_connector.h‎

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,38 @@ int drm_display_info_set_bus_formats(struct drm_display_info *info,
463463
const u32 *formats,
464464
unsigned int num_formats);
465465

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+
*/
472+
struct 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+
466494
/**
467495
* struct drm_tv_connector_state - TV connector related states
468496
* @subconnector: selected subconnector
469-
* @margins: margins (all margins are expressed in pixels)
470-
* @margins.left: left margin
471-
* @margins.right: right margin
472-
* @margins.top: top margin
473-
* @margins.bottom: bottom margin
497+
* @margins: TV margins
474498
* @mode: TV mode
475499
* @brightness: brightness in percent
476500
* @contrast: contrast in percent
@@ -481,12 +505,7 @@ int drm_display_info_set_bus_formats(struct drm_display_info *info,
481505
*/
482506
struct drm_tv_connector_state {
483507
enum drm_mode_subconnector subconnector;
484-
struct {
485-
unsigned int left;
486-
unsigned int right;
487-
unsigned int top;
488-
unsigned int bottom;
489-
} margins;
508+
struct drm_connector_tv_margins margins;
490509
unsigned int mode;
491510
unsigned int brightness;
492511
unsigned int contrast;

0 commit comments

Comments
 (0)