All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 3/5] drm/docs: Document "scaling mode" property better
Date: Mon, 19 Feb 2018 23:53:54 +0100	[thread overview]
Message-ID: <20180219225356.24996-3-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20180219225356.24996-1-daniel.vetter@ffwll.ch>

Move it out of the csv dungeon.

While at it add the missing link to the helper functions for setting
up the "panel rotation" property.

Also OCD how we list enum property values and their corresponding docs.
Going for a nest definition list seams cleanest, no need for also making
it an uordered list.

Cc: Sean Paul <seanpaul@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 Documentation/gpu/kms-properties.csv |  1 -
 drivers/gpu/drm/drm_connector.c      | 32 ++++++++++++++++++++++++++++----
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/Documentation/gpu/kms-properties.csv b/Documentation/gpu/kms-properties.csv
index 927b65e14219..6b28b014cb7d 100644
--- a/Documentation/gpu/kms-properties.csv
+++ b/Documentation/gpu/kms-properties.csv
@@ -1,5 +1,4 @@
 Owner Module/Drivers,Group,Property Name,Type,Property Values,Object attached,Description/Restrictions
-,,“scaling mode”,ENUM,"{ ""None"", ""Full"", ""Center"", ""Full aspect"" }",Connector,"Supported by: amdgpu, gma500, i915, nouveau and radeon."
 ,DVI-I,“subconnector”,ENUM,"{ “Unknown”, “DVI-D”, “DVI-A” }",Connector,TBD
 ,,“select subconnector”,ENUM,"{ “Automatic”, “DVI-D”, “DVI-A” }",Connector,TBD
 ,TV,“subconnector”,ENUM,"{ ""Unknown"", ""Composite"", ""SVIDEO"", ""Component"", ""SCART"" }",Connector,TBD
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 16b9c3810af2..b3cde897cd80 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -849,13 +849,13 @@ DRM_ENUM_NAME_FN(drm_get_content_protection_name, drm_cp_enum_list)
  *
  *	The value of this property can be one of the following:
  *
- *	- DRM_MODE_CONTENT_PROTECTION_UNDESIRED = 0
+ *	DRM_MODE_CONTENT_PROTECTION_UNDESIRED = 0
  *		The link is not protected, content is transmitted in the clear.
- *	- DRM_MODE_CONTENT_PROTECTION_DESIRED = 1
+ *	DRM_MODE_CONTENT_PROTECTION_DESIRED = 1
  *		Userspace has requested content protection, but the link is not
  *		currently protected. When in this state, kernel should enable
  *		Content Protection as soon as possible.
- *	- DRM_MODE_CONTENT_PROTECTION_ENABLED = 2
+ *	DRM_MODE_CONTENT_PROTECTION_ENABLED = 2
  *		Userspace has requested content protection, and the link is
  *		protected. Only the driver can set the property to this value.
  *		If userspace attempts to set to ENABLED, kernel will return
@@ -889,7 +889,31 @@ DRM_ENUM_NAME_FN(drm_get_content_protection_name, drm_cp_enum_list)
  *	INPUT_PROP_DIRECT) will still map 1:1 to the actual LCD panel
  *	coordinates, so if userspace rotates the picture to adjust for
  *	the orientation it must also apply the same transformation to the
- *	touchscreen input coordinates.
+ *	touchscreen input coordinates. This property is initialized by calling
+ *	drm_connector_init_panel_orientation_property().
+ *
+ * scaling mode:
+ *	This property defines how a non-native mode is upscaled to the native
+ *	mode of an LCD panel:
+ *
+ *	None:
+ *		No upscaling happens, scaling is left to the panel. Not all
+ *		drivers expose this mode.
+ *	Full:
+ *		The output is upscaled to the full resolution of the panel,
+ *		ignoring the aspect ratio.
+ *	Center:
+ *		No upscaling happens, the output is centered within the native
+ *		resolution the panel.
+ *	Full aspect:
+ *		The output is upscaled to maximize either the width or height
+ *		while retaining the aspect ratio.
+ *
+ *	This property should be set up by calling
+ *	drm_connector_attach_scaling_mode_property(). Note that drivers
+ *	can also expose this property to external outputs, in which case they
+ *	must support "None", which should be the default (since external screens
+ *	have a built-in scaler).
  */
 
 int drm_connector_create_standard_properties(struct drm_device *dev)
-- 
2.15.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-02-19 22:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 22:53 [PATCH 1/5] drm/docs: Discourage adding more to kms-properties.csv Daniel Vetter
2018-02-19 22:53 ` [PATCH 2/5] drm/docs: Align layout of optional plane blending properties Daniel Vetter
2018-02-20  9:42   ` Thierry Reding
2018-02-19 22:53 ` Daniel Vetter [this message]
2018-02-20  9:45   ` [PATCH 3/5] drm/docs: Document "scaling mode" property better Thierry Reding
2018-02-19 22:53 ` [PATCH 4/5] drm/doc: Polish for drm_mode_parse_command_line_for_connector Daniel Vetter
2018-02-20  9:46   ` Thierry Reding
2018-02-19 22:53 ` [PATCH 5/5] drm/doc: Use new substruct support Daniel Vetter
2018-02-20  9:49   ` Thierry Reding
2018-02-20 11:10     ` Daniel Vetter
2018-02-20 11:22       ` Thierry Reding
2018-02-20 13:25         ` Daniel Vetter
2018-02-20 11:23     ` Jani Nikula
2018-02-20  9:41 ` [PATCH 1/5] drm/docs: Discourage adding more to kms-properties.csv Thierry Reding
2018-02-21  0:23 ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180219225356.24996-3-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.