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
37811fcc
Commit
37811fcc
authored
Aug 25, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915: Show framebuffer info in debugfs
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
70d39fe4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
25 deletions
+73
-25
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_debugfs.c
+66
-17
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_drv.h
+7
-1
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/i915/intel_fb.c
+0
-7
No files found.
drivers/gpu/drm/i915/i915_debugfs.c
View file @
37811fcc
...
...
@@ -104,6 +104,27 @@ static const char *get_tiling_flag(struct drm_i915_gem_object *obj_priv)
}
}
static
void
describe_obj
(
struct
seq_file
*
m
,
struct
drm_i915_gem_object
*
obj
)
{
seq_printf
(
m
,
"%p: %s%s %8zd %08x %08x %d%s%s"
,
&
obj
->
base
,
get_pin_flag
(
obj
),
get_tiling_flag
(
obj
),
obj
->
base
.
size
,
obj
->
base
.
read_domains
,
obj
->
base
.
write_domain
,
obj
->
last_rendering_seqno
,
obj
->
dirty
?
" dirty"
:
""
,
obj
->
madv
==
I915_MADV_DONTNEED
?
" purgeable"
:
""
);
if
(
obj
->
base
.
name
)
seq_printf
(
m
,
" (name: %d)"
,
obj
->
base
.
name
);
if
(
obj
->
fence_reg
!=
I915_FENCE_REG_NONE
)
seq_printf
(
m
,
" (fence: %d)"
,
obj
->
fence_reg
);
if
(
obj
->
gtt_space
!=
NULL
)
seq_printf
(
m
,
" (gtt_offset: %08x)"
,
obj
->
gtt_offset
);
}
static
int
i915_gem_object_list_info
(
struct
seq_file
*
m
,
void
*
data
)
{
struct
drm_info_node
*
node
=
(
struct
drm_info_node
*
)
m
->
private
;
...
...
@@ -137,23 +158,8 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
}
list_for_each_entry
(
obj_priv
,
head
,
list
)
{
seq_printf
(
m
,
" %p: %s %8zd %08x %08x %d%s%s"
,
&
obj_priv
->
base
,
get_pin_flag
(
obj_priv
),
obj_priv
->
base
.
size
,
obj_priv
->
base
.
read_domains
,
obj_priv
->
base
.
write_domain
,
obj_priv
->
last_rendering_seqno
,
obj_priv
->
dirty
?
" dirty"
:
""
,
obj_priv
->
madv
==
I915_MADV_DONTNEED
?
" purgeable"
:
""
);
if
(
obj_priv
->
base
.
name
)
seq_printf
(
m
,
" (name: %d)"
,
obj_priv
->
base
.
name
);
if
(
obj_priv
->
fence_reg
!=
I915_FENCE_REG_NONE
)
seq_printf
(
m
,
" (fence: %d)"
,
obj_priv
->
fence_reg
);
if
(
obj_priv
->
gtt_space
!=
NULL
)
seq_printf
(
m
,
" (gtt_offset: %08x)"
,
obj_priv
->
gtt_offset
);
seq_printf
(
m
,
" "
);
describe_obj
(
m
,
obj_priv
);
seq_printf
(
m
,
"
\n
"
);
}
...
...
@@ -815,6 +821,48 @@ static int i915_opregion(struct seq_file *m, void *unused)
return
0
;
}
static
int
i915_gem_framebuffer_info
(
struct
seq_file
*
m
,
void
*
data
)
{
struct
drm_info_node
*
node
=
(
struct
drm_info_node
*
)
m
->
private
;
struct
drm_device
*
dev
=
node
->
minor
->
dev
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
struct
intel_fbdev
*
ifbdev
;
struct
intel_framebuffer
*
fb
;
int
ret
;
ret
=
mutex_lock_interruptible
(
&
dev
->
mode_config
.
mutex
);
if
(
ret
)
return
ret
;
ifbdev
=
dev_priv
->
fbdev
;
fb
=
to_intel_framebuffer
(
ifbdev
->
helper
.
fb
);
seq_printf
(
m
,
"fbcon size: %d x %d, depth %d, %d bpp, obj "
,
fb
->
base
.
width
,
fb
->
base
.
height
,
fb
->
base
.
depth
,
fb
->
base
.
bits_per_pixel
);
describe_obj
(
m
,
to_intel_bo
(
fb
->
obj
));
seq_printf
(
m
,
"
\n
"
);
list_for_each_entry
(
fb
,
&
dev
->
mode_config
.
fb_list
,
base
.
head
)
{
if
(
&
fb
->
base
==
ifbdev
->
helper
.
fb
)
continue
;
seq_printf
(
m
,
"user size: %d x %d, depth %d, %d bpp, obj "
,
fb
->
base
.
width
,
fb
->
base
.
height
,
fb
->
base
.
depth
,
fb
->
base
.
bits_per_pixel
);
describe_obj
(
m
,
to_intel_bo
(
fb
->
obj
));
seq_printf
(
m
,
"
\n
"
);
}
mutex_unlock
(
&
dev
->
mode_config
.
mutex
);
return
0
;
}
static
int
i915_wedged_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
...
...
@@ -944,6 +992,7 @@ static struct drm_info_list i915_debugfs_list[] = {
{
"i915_fbc_status"
,
i915_fbc_status
,
0
},
{
"i915_sr_status"
,
i915_sr_status
,
0
},
{
"i915_opregion"
,
i915_opregion
,
0
},
{
"i915_gem_framebuffer"
,
i915_gem_framebuffer_info
,
0
},
};
#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
...
...
drivers/gpu/drm/i915/intel_drv.h
View file @
37811fcc
...
...
@@ -30,8 +30,8 @@
#include <linux/i2c-algo-bit.h>
#include "i915_drv.h"
#include "drm_crtc.h"
#include "drm_crtc_helper.h"
#include "drm_fb_helper.h"
#define _wait_for(COND, MS, W) ({ \
unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
...
...
@@ -129,6 +129,12 @@ struct intel_framebuffer {
struct
drm_gem_object
*
obj
;
};
struct
intel_fbdev
{
struct
drm_fb_helper
helper
;
struct
intel_framebuffer
ifb
;
struct
list_head
fbdev_list
;
struct
drm_display_mode
*
our_mode
;
};
struct
intel_encoder
{
struct
drm_encoder
enc
;
...
...
drivers/gpu/drm/i915/intel_fb.c
View file @
37811fcc
...
...
@@ -44,13 +44,6 @@
#include "i915_drm.h"
#include "i915_drv.h"
struct
intel_fbdev
{
struct
drm_fb_helper
helper
;
struct
intel_framebuffer
ifb
;
struct
list_head
fbdev_list
;
struct
drm_display_mode
*
our_mode
;
};
static
struct
fb_ops
intelfb_ops
=
{
.
owner
=
THIS_MODULE
,
.
fb_check_var
=
drm_fb_helper_check_var
,
...
...
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