[PATCH v2] drm: Clarify DRM_MODE_REFLECT_X/Y documentation
Daniel Vetter
daniel at ffwll.ch
Mon Sep 10 20:33:00 UTC 2018
On Mon, Sep 10, 2018 at 06:29:46PM +0100, Alexandru Gheorghe wrote:
> DRM_MODE_REFLECT_X and DRM_MODE_REFLECT_Y meaning seems a bit unclear
> to me, so try to clarify that with a bit of ascii graphics.
>
> Changes since v1:
> - Move the ascii graphics in the kerneldoc where all plane
> properties are already documented and make sure it's properly
> rendered, suggestested by Daniel Vetter.
>
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
> ---
> drivers/gpu/drm/drm_blend.c | 22 ++++++++++++++++++++++
> include/uapi/drm/drm_mode.h | 3 ++-
> 2 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index 402b62d3f072..92f75c5c93ac 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -101,6 +101,28 @@
> * Without this property the rectangle is only scaled, but not rotated or
> * reflected.
> *
> + * Possbile values:
> + *
> + * "rotate-<degrees>":
> + * Signals that a drm plane is rotated <degrees> degrees in counter
> + * clockwise direction.
> + *
> + * "reflect-<axis>":
> + * Signals that the contents of a drm plane is reflected along the
> + * <axis> axis, in the same way as mirroring.
> + *
> + * reflect-x::
> + *
> + * |o | | o|
> + * | | -> | |
> + * | v| |v |
> + *
> + * reflect-y::
> + *
> + * |o | | ^|
> + * | | -> | |
> + * | v| |o |
> + *
> * zpos:
> * Z position is set up with drm_plane_create_zpos_immutable_property() and
> * drm_plane_create_zpos_property(). It controls the visibility of overlapping
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 8d67243952f4..d3e0fe31efc5 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -186,8 +186,9 @@ extern "C" {
> /*
> * DRM_MODE_REFLECT_<axis>
> *
> - * Signals that the contents of a drm plane is reflected in the <axis> axis,
> + * Signals that the contents of a drm plane is reflected along the <axis> axis,
> * in the same way as mirroring.
> + * See kerneldoc chapter "Plane Composition Properties" for more details.
I think that won't properly hyperlink. Bonus if you fix that (kernel-doc
is just normal sphinx text, plus some additional parsing for backwards
compat). Either way:
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> *
> * This define is provided as a convenience, looking up the property id
> * using the name->prop id lookup is the preferred method.
> --
> 2.18.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list