Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
102e7346
Commit
102e7346
authored
Jul 07, 2010
by
Dave Airlie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'drm-tracepoints' into drm-testing
parents
5c8d7171
e5510fac
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
1 deletion
+128
-1
drivers/gpu/drm/Makefile
drivers/gpu/drm/Makefile
+4
-1
drivers/gpu/drm/drm_irq.c
drivers/gpu/drm/drm_irq.c
+11
-0
drivers/gpu/drm/drm_trace.h
drivers/gpu/drm/drm_trace.h
+66
-0
drivers/gpu/drm/drm_trace_points.c
drivers/gpu/drm/drm_trace_points.c
+4
-0
drivers/gpu/drm/i915/i915_trace.h
drivers/gpu/drm/i915/i915_trace.h
+36
-0
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_display.c
+5
-0
include/drm/drmP.h
include/drm/drmP.h
+2
-0
No files found.
drivers/gpu/drm/Makefile
View file @
102e7346
...
...
@@ -11,7 +11,8 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \
drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o
\
drm_platform.o drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o
\
drm_crtc.o drm_modes.o drm_edid.o
\
drm_info.o drm_debugfs.o drm_encoder_slave.o
drm_info.o drm_debugfs.o drm_encoder_slave.o
\
drm_trace_points.o
drm-$(CONFIG_COMPAT)
+=
drm_ioc32.o
...
...
@@ -19,6 +20,8 @@ drm_kms_helper-y := drm_fb_helper.o drm_crtc_helper.o drm_dp_i2c_helper.o
obj-$(CONFIG_DRM_KMS_HELPER)
+=
drm_kms_helper.o
CFLAGS_drm_trace_points.o
:=
-I
$(src)
obj-$(CONFIG_DRM)
+=
drm.o
obj-$(CONFIG_DRM_TTM)
+=
ttm/
obj-$(CONFIG_DRM_TDFX)
+=
tdfx/
...
...
drivers/gpu/drm/drm_irq.c
View file @
102e7346
...
...
@@ -34,6 +34,7 @@
*/
#include "drmP.h"
#include "drm_trace.h"
#include <linux/interrupt.h>
/* For task queue support */
#include <linux/slab.h>
...
...
@@ -590,6 +591,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
return
-
ENOMEM
;
e
->
pipe
=
pipe
;
e
->
base
.
pid
=
current
->
pid
;
e
->
event
.
base
.
type
=
DRM_EVENT_VBLANK
;
e
->
event
.
base
.
length
=
sizeof
e
->
event
;
e
->
event
.
user_data
=
vblwait
->
request
.
signal
;
...
...
@@ -617,6 +619,9 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
DRM_DEBUG
(
"event on vblank count %d, current %d, crtc %d
\n
"
,
vblwait
->
request
.
sequence
,
seq
,
pipe
);
trace_drm_vblank_event_queued
(
current
->
pid
,
pipe
,
vblwait
->
request
.
sequence
);
e
->
event
.
sequence
=
vblwait
->
request
.
sequence
;
if
((
seq
-
vblwait
->
request
.
sequence
)
<=
(
1
<<
23
))
{
e
->
event
.
tv_sec
=
now
.
tv_sec
;
...
...
@@ -624,6 +629,8 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
drm_vblank_put
(
dev
,
e
->
pipe
);
list_add_tail
(
&
e
->
base
.
link
,
&
e
->
base
.
file_priv
->
event_list
);
wake_up_interruptible
(
&
e
->
base
.
file_priv
->
event_wait
);
trace_drm_vblank_event_delivered
(
current
->
pid
,
pipe
,
vblwait
->
request
.
sequence
);
}
else
{
list_add_tail
(
&
e
->
base
.
link
,
&
dev
->
vblank_event_list
);
}
...
...
@@ -754,9 +761,13 @@ void drm_handle_vblank_events(struct drm_device *dev, int crtc)
drm_vblank_put
(
dev
,
e
->
pipe
);
list_move_tail
(
&
e
->
base
.
link
,
&
e
->
base
.
file_priv
->
event_list
);
wake_up_interruptible
(
&
e
->
base
.
file_priv
->
event_wait
);
trace_drm_vblank_event_delivered
(
e
->
base
.
pid
,
e
->
pipe
,
e
->
event
.
sequence
);
}
spin_unlock_irqrestore
(
&
dev
->
event_lock
,
flags
);
trace_drm_vblank_event
(
crtc
,
seq
);
}
/**
...
...
drivers/gpu/drm/drm_trace.h
0 → 100644
View file @
102e7346
#if !defined(_DRM_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
#define _DRM_TRACE_H_
#include <linux/stringify.h>
#include <linux/types.h>
#include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM drm
#define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)
#define TRACE_INCLUDE_FILE drm_trace
TRACE_EVENT
(
drm_vblank_event
,
TP_PROTO
(
int
crtc
,
unsigned
int
seq
),
TP_ARGS
(
crtc
,
seq
),
TP_STRUCT__entry
(
__field
(
int
,
crtc
)
__field
(
unsigned
int
,
seq
)
),
TP_fast_assign
(
__entry
->
crtc
=
crtc
;
__entry
->
seq
=
seq
;
),
TP_printk
(
"crtc=%d, seq=%d"
,
__entry
->
crtc
,
__entry
->
seq
)
);
TRACE_EVENT
(
drm_vblank_event_queued
,
TP_PROTO
(
pid_t
pid
,
int
crtc
,
unsigned
int
seq
),
TP_ARGS
(
pid
,
crtc
,
seq
),
TP_STRUCT__entry
(
__field
(
pid_t
,
pid
)
__field
(
int
,
crtc
)
__field
(
unsigned
int
,
seq
)
),
TP_fast_assign
(
__entry
->
pid
=
pid
;
__entry
->
crtc
=
crtc
;
__entry
->
seq
=
seq
;
),
TP_printk
(
"pid=%d, crtc=%d, seq=%d"
,
__entry
->
pid
,
__entry
->
crtc
,
\
__entry
->
seq
)
);
TRACE_EVENT
(
drm_vblank_event_delivered
,
TP_PROTO
(
pid_t
pid
,
int
crtc
,
unsigned
int
seq
),
TP_ARGS
(
pid
,
crtc
,
seq
),
TP_STRUCT__entry
(
__field
(
pid_t
,
pid
)
__field
(
int
,
crtc
)
__field
(
unsigned
int
,
seq
)
),
TP_fast_assign
(
__entry
->
pid
=
pid
;
__entry
->
crtc
=
crtc
;
__entry
->
seq
=
seq
;
),
TP_printk
(
"pid=%d, crtc=%d, seq=%d"
,
__entry
->
pid
,
__entry
->
crtc
,
\
__entry
->
seq
)
);
#endif
/* _DRM_TRACE_H_ */
/* This part must be outside protection */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#include <trace/define_trace.h>
drivers/gpu/drm/drm_trace_points.c
0 → 100644
View file @
102e7346
#include "drmP.h"
#define CREATE_TRACE_POINTS
#include "drm_trace.h"
drivers/gpu/drm/i915/i915_trace.h
View file @
102e7346
...
...
@@ -262,6 +262,42 @@ DEFINE_EVENT(i915_ring, i915_ring_wait_end,
TP_ARGS
(
dev
)
);
TRACE_EVENT
(
i915_flip_request
,
TP_PROTO
(
int
plane
,
struct
drm_gem_object
*
obj
),
TP_ARGS
(
plane
,
obj
),
TP_STRUCT__entry
(
__field
(
int
,
plane
)
__field
(
struct
drm_gem_object
*
,
obj
)
),
TP_fast_assign
(
__entry
->
plane
=
plane
;
__entry
->
obj
=
obj
;
),
TP_printk
(
"plane=%d, obj=%p"
,
__entry
->
plane
,
__entry
->
obj
)
);
TRACE_EVENT
(
i915_flip_complete
,
TP_PROTO
(
int
plane
,
struct
drm_gem_object
*
obj
),
TP_ARGS
(
plane
,
obj
),
TP_STRUCT__entry
(
__field
(
int
,
plane
)
__field
(
struct
drm_gem_object
*
,
obj
)
),
TP_fast_assign
(
__entry
->
plane
=
plane
;
__entry
->
obj
=
obj
;
),
TP_printk
(
"plane=%d, obj=%p"
,
__entry
->
plane
,
__entry
->
obj
)
);
#endif
/* _I915_TRACE_H_ */
/* This part must be outside protection */
...
...
drivers/gpu/drm/i915/intel_display.c
View file @
102e7346
...
...
@@ -33,6 +33,7 @@
#include "intel_drv.h"
#include "i915_drm.h"
#include "i915_drv.h"
#include "i915_trace.h"
#include "drm_dp_helper.h"
#include "drm_crtc_helper.h"
...
...
@@ -4650,6 +4651,8 @@ static void do_intel_finish_page_flip(struct drm_device *dev,
atomic_dec_and_test
(
&
obj_priv
->
pending_flip
))
DRM_WAKEUP
(
&
dev_priv
->
pending_flip_queue
);
schedule_work
(
&
work
->
work
);
trace_i915_flip_complete
(
intel_crtc
->
plane
,
work
->
pending_flip_obj
);
}
void
intel_finish_page_flip
(
struct
drm_device
*
dev
,
int
pipe
)
...
...
@@ -4781,6 +4784,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
mutex_unlock
(
&
dev
->
struct_mutex
);
trace_i915_flip_request
(
intel_crtc
->
plane
,
obj
);
return
0
;
}
...
...
include/drm/drmP.h
View file @
102e7346
...
...
@@ -406,6 +406,8 @@ struct drm_pending_event {
struct
drm_event
*
event
;
struct
list_head
link
;
struct
drm_file
*
file_priv
;
pid_t
pid
;
/* pid of requester, no guarantee it's valid by the time
we deliver the event, for tracing only */
void
(
*
destroy
)(
struct
drm_pending_event
*
event
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment