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
Kirill Smelkov
linux
Commits
b2223497
Commit
b2223497
authored
Oct 27, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915: Remove the confusing global waiting/irq seqno
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
c2c347a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
42 deletions
+26
-42
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_debugfs.c
+19
-25
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_drv.h
+0
-10
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+2
-2
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_irq.c
+3
-3
drivers/gpu/drm/i915/intel_ringbuffer.h
drivers/gpu/drm/i915/intel_ringbuffer.h
+2
-2
No files found.
drivers/gpu/drm/i915/i915_debugfs.c
View file @
b2223497
...
...
@@ -319,6 +319,19 @@ static int i915_gem_request_info(struct seq_file *m, void *data)
return
0
;
}
static
void
i915_ring_seqno_info
(
struct
seq_file
*
m
,
struct
intel_ring_buffer
*
ring
)
{
if
(
ring
->
get_seqno
)
{
seq_printf
(
m
,
"Current sequence (%s): %d
\n
"
,
ring
->
name
,
ring
->
get_seqno
(
ring
));
seq_printf
(
m
,
"Waiter sequence (%s): %d
\n
"
,
ring
->
name
,
ring
->
waiting_seqno
);
seq_printf
(
m
,
"IRQ sequence (%s): %d
\n
"
,
ring
->
name
,
ring
->
irq_seqno
);
}
}
static
int
i915_gem_seqno_info
(
struct
seq_file
*
m
,
void
*
data
)
{
struct
drm_info_node
*
node
=
(
struct
drm_info_node
*
)
m
->
private
;
...
...
@@ -330,15 +343,9 @@ static int i915_gem_seqno_info(struct seq_file *m, void *data)
if
(
ret
)
return
ret
;
if
(
dev_priv
->
render_ring
.
status_page
.
page_addr
!=
NULL
)
{
seq_printf
(
m
,
"Current sequence: %d
\n
"
,
dev_priv
->
render_ring
.
get_seqno
(
&
dev_priv
->
render_ring
));
}
else
{
seq_printf
(
m
,
"Current sequence: hws uninitialized
\n
"
);
}
seq_printf
(
m
,
"Waiter sequence: %d
\n
"
,
dev_priv
->
mm
.
waiting_gem_seqno
);
seq_printf
(
m
,
"IRQ sequence: %d
\n
"
,
dev_priv
->
mm
.
irq_gem_seqno
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
render_ring
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
bsd_ring
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
blt_ring
);
mutex_unlock
(
&
dev
->
struct_mutex
);
...
...
@@ -390,22 +397,9 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
}
seq_printf
(
m
,
"Interrupts received: %d
\n
"
,
atomic_read
(
&
dev_priv
->
irq_received
));
if
(
dev_priv
->
render_ring
.
get_seqno
)
{
seq_printf
(
m
,
"Current sequence (render): %d
\n
"
,
dev_priv
->
render_ring
.
get_seqno
(
&
dev_priv
->
render_ring
));
}
if
(
dev_priv
->
bsd_ring
.
get_seqno
)
{
seq_printf
(
m
,
"Current sequence (BSD): %d
\n
"
,
dev_priv
->
bsd_ring
.
get_seqno
(
&
dev_priv
->
bsd_ring
));
}
if
(
dev_priv
->
blt_ring
.
get_seqno
)
{
seq_printf
(
m
,
"Current sequence (BLT): %d
\n
"
,
dev_priv
->
blt_ring
.
get_seqno
(
&
dev_priv
->
blt_ring
));
}
seq_printf
(
m
,
"Waiter sequence: %d
\n
"
,
dev_priv
->
mm
.
waiting_gem_seqno
);
seq_printf
(
m
,
"IRQ sequence: %d
\n
"
,
dev_priv
->
mm
.
irq_gem_seqno
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
render_ring
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
bsd_ring
);
i915_ring_seqno_info
(
m
,
&
dev_priv
->
blt_ring
);
mutex_unlock
(
&
dev
->
struct_mutex
);
return
0
;
...
...
drivers/gpu/drm/i915/i915_drv.h
View file @
b2223497
...
...
@@ -608,16 +608,6 @@ typedef struct drm_i915_private {
*/
struct
delayed_work
retire_work
;
/**
* Waiting sequence number, if any
*/
uint32_t
waiting_gem_seqno
;
/**
* Last seq seen at irq time
*/
uint32_t
irq_gem_seqno
;
/**
* Flag if the X Server, and thus DRM, is not currently in
* control of the device.
...
...
drivers/gpu/drm/i915/i915_gem.c
View file @
b2223497
...
...
@@ -1984,7 +1984,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno,
trace_i915_gem_request_wait_begin
(
dev
,
seqno
);
ring
->
waiting_
gem_
seqno
=
seqno
;
ring
->
waiting_seqno
=
seqno
;
ring
->
user_irq_get
(
ring
);
if
(
interruptible
)
ret
=
wait_event_interruptible
(
ring
->
irq_queue
,
...
...
@@ -1996,7 +1996,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno,
||
atomic_read
(
&
dev_priv
->
mm
.
wedged
));
ring
->
user_irq_put
(
ring
);
ring
->
waiting_
gem_
seqno
=
0
;
ring
->
waiting_seqno
=
0
;
trace_i915_gem_request_wait_end
(
dev
,
seqno
);
}
...
...
drivers/gpu/drm/i915/i915_irq.c
View file @
b2223497
...
...
@@ -298,7 +298,7 @@ static void notify_ring(struct drm_device *dev,
{
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
u32
seqno
=
ring
->
get_seqno
(
ring
);
ring
->
irq_
gem_
seqno
=
seqno
;
ring
->
irq_seqno
=
seqno
;
trace_i915_gem_request_complete
(
dev
,
seqno
);
wake_up_all
(
&
ring
->
irq_queue
);
dev_priv
->
hangcheck_count
=
0
;
...
...
@@ -1319,10 +1319,10 @@ static bool i915_hangcheck_ring_idle(struct intel_ring_buffer *ring, bool *err)
if
(
list_empty
(
&
ring
->
request_list
)
||
i915_seqno_passed
(
ring
->
get_seqno
(
ring
),
ring_last_seqno
(
ring
)))
{
/* Issue a wake-up to catch stuck h/w. */
if
(
ring
->
waiting_
gem_
seqno
&&
waitqueue_active
(
&
ring
->
irq_queue
))
{
if
(
ring
->
waiting_seqno
&&
waitqueue_active
(
&
ring
->
irq_queue
))
{
DRM_ERROR
(
"Hangcheck timer elapsed... %s idle [waiting on %d, at %d], missed IRQ?
\n
"
,
ring
->
name
,
ring
->
waiting_
gem_
seqno
,
ring
->
waiting_seqno
,
ring
->
get_seqno
(
ring
));
wake_up_all
(
&
ring
->
irq_queue
);
*
err
=
true
;
...
...
drivers/gpu/drm/i915/intel_ringbuffer.h
View file @
b2223497
...
...
@@ -35,8 +35,8 @@ struct intel_ring_buffer {
int
size
;
struct
intel_hw_status_page
status_page
;
u32
irq_
gem_
seqno
;
/* last seq seem at irq time */
u32
waiting_
gem_
seqno
;
u32
irq_seqno
;
/* last seq seem at irq time */
u32
waiting_seqno
;
int
user_irq_refcount
;
void
(
*
user_irq_get
)(
struct
intel_ring_buffer
*
ring
);
void
(
*
user_irq_put
)(
struct
intel_ring_buffer
*
ring
);
...
...
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