From: Daniel Vetter <daniel@ffwll.ch>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/atomic: add new drm_debug bit to dump atomic state before commit
Date: Mon, 17 Oct 2016 08:31:33 +0200 [thread overview]
Message-ID: <20161017063133.GV20761@phenom.ffwll.local> (raw)
In-Reply-To: <1476489353-16261-5-git-send-email-robdclark@gmail.com>
On Fri, Oct 14, 2016 at 07:55:51PM -0400, Rob Clark wrote:
> Signed-off-by: Rob Clark <robdclark@gmail.com>
General comment: Some drivers (and I think this would be useful in
general) also dump state into debugfs with seq_file. And we have a bunch
of other places where unfortunately we duplicate dumping functions between
dmesg and seq_file (e.g. drm_mm.c).
Fancy idea: Could we create a seq_file that dumps to dmesg and so reuse
one for all? Before we have to add atomic_print_state and
atomic_dump_state for dmesg vs. seq_file variations ...
One kerneldoc nit below.
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 7ffaa35..642d5da 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -133,6 +133,7 @@ struct dma_buf_attachment;
> #define DRM_UT_PRIME 0x08
> #define DRM_UT_ATOMIC 0x10
> #define DRM_UT_VBL 0x20
> +#define DRM_UT_STATE 0x40
>
> extern __printf(2, 3)
> void drm_ut_debug_printk(const char *function_name,
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 856fdf8..d74d47a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -44,6 +44,7 @@ struct drm_framebuffer;
> struct drm_object_properties;
> struct drm_file;
> struct drm_clip_rect;
> +struct drm_print;
> struct device_node;
> struct fence;
> struct edid;
> @@ -707,6 +708,18 @@ struct drm_crtc_funcs {
> const struct drm_crtc_state *state,
> struct drm_property *property,
> uint64_t *val);
> +
> + /**
> + * @atomic_print_state:
> + *
> + * If driver subclasses struct &drm_crtc_state, it should implement
> + * this optional hook for printing state.
s/printing state/printing additional, driver-private state/ in all of
these for clarification. Same below.
-Daniel
> + *
> + * Do not call this directly, use drm_atomic_crtc_print_state()
> + * instead.
> + */
> + void (*atomic_print_state)(struct drm_print *p,
> + const struct drm_crtc_state *state);
> };
>
> /**
> @@ -1132,6 +1145,18 @@ struct drm_connector_funcs {
> const struct drm_connector_state *state,
> struct drm_property *property,
> uint64_t *val);
> +
> + /**
> + * @atomic_print_state:
> + *
> + * If driver subclasses struct &drm_connector_state, it should
> + * implement this optional hook for printing state.
> + *
> + * Do not call this directly, use drm_atomic_connector_print_state()
> + * instead.
> + */
> + void (*atomic_print_state)(struct drm_print *p,
> + const struct drm_connector_state *state);
> };
>
> /**
> @@ -1623,6 +1648,18 @@ struct drm_plane_funcs {
> const struct drm_plane_state *state,
> struct drm_property *property,
> uint64_t *val);
> +
> + /**
> + * @atomic_print_state:
> + *
> + * If driver subclasses struct &drm_plane_state, it should implement
> + * this optional hook for printing state.
> + *
> + * Do not call this directly, use drm_atomic_plane_print_state()
> + * instead.
> + */
> + void (*atomic_print_state)(struct drm_print *p,
> + const struct drm_plane_state *state);
> };
>
> enum drm_plane_type {
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-10-17 6:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 23:55 [PATCH 0/6] drm: add atomic state logging and debugfs Rob Clark
[not found] ` <1476489353-16261-1-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-14 23:55 ` [PATCH 1/6] drm: helper macros to print composite types Rob Clark
2016-10-17 17:00 ` Sean Paul
2016-10-14 23:55 ` [PATCH 2/6] drm: add helper for printing to log or seq_file Rob Clark
2016-10-17 6:38 ` Daniel Vetter
2016-10-17 11:59 ` Rob Clark
2016-10-17 12:30 ` Daniel Vetter
2016-10-17 12:35 ` Rob Clark
[not found] ` <1476489353-16261-3-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-17 17:00 ` Sean Paul
2016-10-24 17:05 ` Rob Clark
2016-10-14 23:55 ` [PATCH 3/6] drm: add helpers to go from plane state to drm_rect Rob Clark
2016-10-17 17:00 ` Sean Paul
2016-10-14 23:55 ` [PATCH 5/6] drm/atomic: add debugfs file to dump out atomic state Rob Clark
2016-10-17 17:00 ` Sean Paul
2016-10-14 23:55 ` [PATCH 6/6] drm/msm/mdp5: add atomic_print_state support Rob Clark
[not found] ` <1476489353-16261-7-git-send-email-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-17 17:00 ` Sean Paul
2016-10-14 23:55 ` [PATCH 4/6] drm/atomic: add new drm_debug bit to dump atomic state before commit Rob Clark
2016-10-17 6:31 ` Daniel Vetter [this message]
2016-10-17 17:00 ` Sean Paul
2016-10-15 0:19 ` [PATCH 0/6] drm: add atomic state logging and debugfs Rob Clark
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=20161017063133.GV20761@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=robdclark@gmail.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.