From: Sam Ravnborg <sam@ravnborg.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Turn bus flags macros into an enum
Date: Sat, 12 Jan 2019 13:41:11 +0100 [thread overview]
Message-ID: <20190112124111.GA17507@ravnborg.org> (raw)
In-Reply-To: <20190112011051.10489-1-laurent.pinchart@ideasonboard.com>
Hi Laurent
On Sat, Jan 12, 2019 at 03:10:51AM +0200, Laurent Pinchart wrote:
> This allows nicer kerneldoc with an easy way to reference the enum and
> the values.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> include/drm/drm_connector.h | 108 +++++++++++++++++++++---------------
> 1 file changed, 64 insertions(+), 44 deletions(-)
>
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 00bb7a74962b..f5ce255a2cb4 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -253,6 +253,68 @@ enum drm_panel_orientation {
> DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
> };
>
> +/**
> + * enum drm_bus_flags - bus_flags info for &drm_display_info
> + *
> + * This enum defines signal polarities and clock edge information for signals on
> + * a bus as bitmask flags.
> + *
> + * The clock edge information is conveyed by two sets of symbols,
> + * DRM_BUS_FLAGS_*_DRIVE_\* and DRM_BUS_FLAGS_*_SAMPLE_\*. When this enum is
> + * used to describe a bus from the point of view of the transmitter, the
> + * \*_DRIVE_\* flags should be used. When used from the point of view of the
> + * receiver, the \*_SAMPLE_\* flags should be used. The \*_DRIVE_\* and
> + * \*_SAMPLE_\* flags alias each other, with the \*_SAMPLE_POSEDGE and
> + * \*_SAMPLE_NEGEDGE flags being equal to \*_DRIVE_NEGEDGE and \*_DRIVE_POSEDGE
> + * respectively. This simplifies code as signals are usually sampled on the
> + * opposite edge of the driving edge. Transmitters and receivers may however
> + * need to take other signal timings into account to convert between driving
> + * and sample edges.
> + *
> + * @DRM_BUS_FLAG_DE_LOW: The Data Enable signal is active low
> + * @DRM_BUS_FLAG_DE_HIGH: The Data Enable signal is active high
> + * @DRM_BUS_FLAG_PIXDATA_POSEDGE: Legacy value, do not use
> + * @DRM_BUS_FLAG_PIXDATA_NEGEDGE: Legacy value, do not use
Could you extend the comment to expalin what there replacements are?
Otherwise we leave it to someone with less understanding of the subject
to find out.
There are 30+ cases we need to fix and we better do it right.
It would also be nice to have the legacy values grouped so they are easier to ignore.
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-01-12 12:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-12 1:10 [PATCH] drm: Turn bus flags macros into an enum Laurent Pinchart
2019-01-12 12:11 ` Daniel Vetter
2019-01-12 12:41 ` Sam Ravnborg [this message]
2019-03-06 2:37 ` Laurent Pinchart
2019-03-06 6:00 ` Sam Ravnborg
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=20190112124111.GA17507@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.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.