All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH RFC 1/7] drm/armada: add tracing support
Date: Tue, 6 Dec 2016 13:22:11 +0100	[thread overview]
Message-ID: <CAKMK7uGi6jUjRYg+g0+pZA45w6VsJhMGYtTjZhy-hxh8aJ3_MA@mail.gmail.com> (raw)
In-Reply-To: <E1c7AGu-0003DJ-9R@rmk-PC.armlinux.org.uk>

Hi Russell

I need the below fixup to make this build for me:

diff --git a/drivers/gpu/drm/armada/Makefile b/drivers/gpu/drm/armada/Makefile
index a18f156c8b66..64c0b4546fb2 100644
--- a/drivers/gpu/drm/armada/Makefile
+++ b/drivers/gpu/drm/armada/Makefile
@@ -4,3 +4,5 @@ armada-y        += armada_510.o
 armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o

 obj-$(CONFIG_DRM_ARMADA) := armada.o
+
+CFLAGS_armada_trace.o := -I$(src)

Otherwise it fails with

  CC [M]  drivers/gpu/drm/armada/armada_trace.o
In file included from drivers/gpu/drm/armada/armada_trace.h:66:0,
                 from drivers/gpu/drm/armada/armada_trace.c:3:
./include/trace/define_trace.h:88:43: fatal error: ./armada_trace.h:
No such file or directory
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
                                           ^

I've disabeld armada for now in the drm-misc defconfigs we use to
build-test drm-misc patches (since I can't push stuff right now).

Cheers, Daniel



On Thu, Nov 17, 2016 at 1:09 AM, Russell King
<rmk+kernel@armlinux.org.uk> wrote:
> Add tracing support to the Armada video overlay and interrupt code.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
>  drivers/gpu/drm/armada/Makefile         |  2 +-
>  drivers/gpu/drm/armada/armada_crtc.c    |  3 ++
>  drivers/gpu/drm/armada/armada_overlay.c |  7 ++++
>  drivers/gpu/drm/armada/armada_trace.c   |  4 ++
>  drivers/gpu/drm/armada/armada_trace.h   | 66 +++++++++++++++++++++++++++++++++
>  5 files changed, 81 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/armada/armada_trace.c
>  create mode 100644 drivers/gpu/drm/armada/armada_trace.h
>
> diff --git a/drivers/gpu/drm/armada/Makefile b/drivers/gpu/drm/armada/Makefile
> index ffd673615772..a18f156c8b66 100644
> --- a/drivers/gpu/drm/armada/Makefile
> +++ b/drivers/gpu/drm/armada/Makefile
> @@ -1,5 +1,5 @@
>  armada-y       := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \
> -                  armada_gem.o armada_overlay.o
> +                  armada_gem.o armada_overlay.o armada_trace.o
>  armada-y       += armada_510.o
>  armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
>
> diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
> index 2f58e9e2a59c..135ad844fbb8 100644
> --- a/drivers/gpu/drm/armada/armada_crtc.c
> +++ b/drivers/gpu/drm/armada/armada_crtc.c
> @@ -18,6 +18,7 @@
>  #include "armada_fb.h"
>  #include "armada_gem.h"
>  #include "armada_hw.h"
> +#include "armada_trace.h"
>
>  struct armada_frame_work {
>         struct armada_plane_work work;
> @@ -464,6 +465,8 @@ static irqreturn_t armada_drm_irq(int irq, void *arg)
>          */
>         writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR);
>
> +       trace_armada_drm_irq(&dcrtc->crtc, stat);
> +
>         /* Mask out those interrupts we haven't enabled */
>         v = stat & dcrtc->irq_ena;
>
> diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
> index 1ee707ef6b8d..94af7c93276e 100644
> --- a/drivers/gpu/drm/armada/armada_overlay.c
> +++ b/drivers/gpu/drm/armada/armada_overlay.c
> @@ -15,6 +15,7 @@
>  #include "armada_hw.h"
>  #include <drm/armada_drm.h>
>  #include "armada_ioctlP.h"
> +#include "armada_trace.h"
>
>  struct armada_ovl_plane_properties {
>         uint32_t colorkey_yr;
> @@ -87,6 +88,8 @@ static void armada_ovl_plane_work(struct armada_crtc *dcrtc,
>  {
>         struct armada_ovl_plane *dplane = container_of(plane, struct armada_ovl_plane, base);
>
> +       trace_armada_ovl_plane_work(&dcrtc->crtc, &plane->base);
> +
>         armada_drm_crtc_update_regs(dcrtc, dplane->vbl.regs);
>         armada_ovl_retire_fb(dplane, NULL);
>  }
> @@ -120,6 +123,10 @@ armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
>         bool visible;
>         int ret;
>
> +       trace_armada_ovl_plane_update(plane, crtc, fb,
> +                                crtc_x, crtc_y, crtc_w, crtc_h,
> +                                src_x, src_y, src_w, src_h);
> +
>         ret = drm_plane_helper_check_update(plane, crtc, fb, &src, &dest, &clip,
>                                             BIT(DRM_ROTATE_0),
>                                             0, INT_MAX, true, false, &visible);
> diff --git a/drivers/gpu/drm/armada/armada_trace.c b/drivers/gpu/drm/armada/armada_trace.c
> new file mode 100644
> index 000000000000..068b336ba75f
> --- /dev/null
> +++ b/drivers/gpu/drm/armada/armada_trace.c
> @@ -0,0 +1,4 @@
> +#ifndef __CHECKER__
> +#define CREATE_TRACE_POINTS
> +#include "armada_trace.h"
> +#endif
> diff --git a/drivers/gpu/drm/armada/armada_trace.h b/drivers/gpu/drm/armada/armada_trace.h
> new file mode 100644
> index 000000000000..dc0cba70fd1a
> --- /dev/null
> +++ b/drivers/gpu/drm/armada/armada_trace.h
> @@ -0,0 +1,66 @@
> +#if !defined(ARMADA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
> +#define ARMADA_TRACE_H
> +
> +#include <linux/tracepoint.h>
> +#include <drm/drmP.h>
> +
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM armada
> +#define TRACE_INCLUDE_FILE armada_trace
> +
> +TRACE_EVENT(armada_drm_irq,
> +       TP_PROTO(struct drm_crtc *crtc, u32 stat),
> +       TP_ARGS(crtc, stat),
> +       TP_STRUCT__entry(
> +               __field(struct drm_crtc *, crtc)
> +               __field(u32, stat)
> +       ),
> +       TP_fast_assign(
> +               __entry->crtc = crtc;
> +               __entry->stat = stat;
> +       ),
> +       TP_printk("crtc %p stat 0x%08x",
> +               __entry->crtc, __entry->stat)
> +);
> +
> +TRACE_EVENT(armada_ovl_plane_update,
> +       TP_PROTO(struct drm_plane *plane, struct drm_crtc *crtc,
> +                    struct drm_framebuffer *fb,
> +                    int crtc_x, int crtc_y, unsigned crtc_w, unsigned crtc_h,
> +                    uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h),
> +       TP_ARGS(plane, crtc, fb, crtc_x, crtc_y, crtc_w, crtc_h, src_x, src_y, src_w, src_h),
> +       TP_STRUCT__entry(
> +               __field(struct drm_plane *, plane)
> +               __field(struct drm_crtc *, crtc)
> +               __field(struct drm_framebuffer *, fb)
> +       ),
> +       TP_fast_assign(
> +               __entry->plane = plane;
> +               __entry->crtc = crtc;
> +               __entry->fb = fb;
> +       ),
> +       TP_printk("plane %p crtc %p fb %p",
> +               __entry->plane, __entry->crtc, __entry->fb)
> +);
> +
> +TRACE_EVENT(armada_ovl_plane_work,
> +       TP_PROTO(struct drm_crtc *crtc, struct drm_plane *plane),
> +       TP_ARGS(crtc, plane),
> +       TP_STRUCT__entry(
> +               __field(struct drm_plane *, plane)
> +               __field(struct drm_crtc *, crtc)
> +       ),
> +       TP_fast_assign(
> +               __entry->plane = plane;
> +               __entry->crtc = crtc;
> +       ),
> +       TP_printk("plane %p crtc %p",
> +               __entry->plane, __entry->crtc)
> +);
> +
> +#endif
> +
> +/* This part must be outside protection */
> +#undef TRACE_INCLUDE_PATH
> +#define TRACE_INCLUDE_PATH .
> +#include <trace/define_trace.h>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-12-06 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17  0:08 [PATCH 0/7] Armada DRM updates for 4.10 Russell King - ARM Linux
2016-11-17  0:09 ` [PATCH RFC 1/7] drm/armada: add tracing support Russell King
2016-12-06 12:22   ` Daniel Vetter [this message]
2016-11-17  0:09 ` [PATCH RFC 2/7] drm/armada: clean up armada_drm_plane_work_run() Russell King
2016-11-17  0:09 ` [PATCH RFC 3/7] drm/armada: move plane state to struct armada_plane Russell King
2016-11-17  0:09 ` [PATCH RFC 4/7] drm/armada: split out primary plane update Russell King
2016-11-17  0:10 ` [PATCH RFC 5/7] drm/armada: move setting primary plane position to armada_drm_primary_set() Russell King
2016-11-17  0:10 ` [PATCH RFC 6/7] drm/armada: use common helper for plane base address Russell King
2016-11-17  0:10 ` [PATCH RFC 7/7] drm/armada: de-midlayer armada Russell King

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=CAKMK7uGi6jUjRYg+g0+pZA45w6VsJhMGYtTjZhy-hxh8aJ3_MA@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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.