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
5cdf5881
Commit
5cdf5881
authored
Sep 27, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915: Make get/put pages static
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
8f2480fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_debugfs.c
+11
-15
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_drv.h
+0
-2
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+10
-3
No files found.
drivers/gpu/drm/i915/i915_debugfs.c
View file @
5cdf5881
...
@@ -406,16 +406,19 @@ static int i915_hws_info(struct seq_file *m, void *data)
...
@@ -406,16 +406,19 @@ static int i915_hws_info(struct seq_file *m, void *data)
return
0
;
return
0
;
}
}
static
void
i915_dump_pages
(
struct
seq_file
*
m
,
struct
page
**
pages
,
int
page_count
)
static
void
i915_dump_object
(
struct
seq_file
*
m
,
struct
io_mapping
*
mapping
,
struct
drm_i915_gem_object
*
obj_priv
)
{
{
int
page
,
i
;
int
page
,
page_count
,
i
;
uint32_t
*
mem
;
page_count
=
obj_priv
->
base
.
size
/
PAGE_SIZE
;
for
(
page
=
0
;
page
<
page_count
;
page
++
)
{
for
(
page
=
0
;
page
<
page_count
;
page
++
)
{
mem
=
kmap
(
pages
[
page
]);
u32
*
mem
=
io_mapping_map_wc
(
mapping
,
obj_priv
->
gtt_offset
+
page
*
PAGE_SIZE
);
for
(
i
=
0
;
i
<
PAGE_SIZE
;
i
+=
4
)
for
(
i
=
0
;
i
<
PAGE_SIZE
;
i
+=
4
)
seq_printf
(
m
,
"%08x : %08x
\n
"
,
i
,
mem
[
i
/
4
]);
seq_printf
(
m
,
"%08x : %08x
\n
"
,
i
,
mem
[
i
/
4
]);
kunmap
(
pages
[
page
]
);
io_mapping_unmap
(
mem
);
}
}
}
}
...
@@ -436,16 +439,9 @@ static int i915_batchbuffer_info(struct seq_file *m, void *data)
...
@@ -436,16 +439,9 @@ static int i915_batchbuffer_info(struct seq_file *m, void *data)
list
)
{
list
)
{
obj
=
&
obj_priv
->
base
;
obj
=
&
obj_priv
->
base
;
if
(
obj
->
read_domains
&
I915_GEM_DOMAIN_COMMAND
)
{
if
(
obj
->
read_domains
&
I915_GEM_DOMAIN_COMMAND
)
{
ret
=
i915_gem_object_get_pages
(
obj
,
0
);
seq_printf
(
m
,
"--- gtt_offset = 0x%08x
\n
"
,
if
(
ret
)
{
obj_priv
->
gtt_offset
);
mutex_unlock
(
&
dev
->
struct_mutex
);
i915_dump_object
(
m
,
dev_priv
->
mm
.
gtt_mapping
,
obj_priv
);
return
ret
;
}
seq_printf
(
m
,
"--- gtt_offset = 0x%08x
\n
"
,
obj_priv
->
gtt_offset
);
i915_dump_pages
(
m
,
obj_priv
->
pages
,
obj
->
size
/
PAGE_SIZE
);
i915_gem_object_put_pages
(
obj
);
}
}
}
}
...
...
drivers/gpu/drm/i915/i915_drv.h
View file @
5cdf5881
...
@@ -1055,8 +1055,6 @@ int i915_gem_attach_phys_object(struct drm_device *dev,
...
@@ -1055,8 +1055,6 @@ int i915_gem_attach_phys_object(struct drm_device *dev,
void
i915_gem_detach_phys_object
(
struct
drm_device
*
dev
,
void
i915_gem_detach_phys_object
(
struct
drm_device
*
dev
,
struct
drm_gem_object
*
obj
);
struct
drm_gem_object
*
obj
);
void
i915_gem_free_all_phys_object
(
struct
drm_device
*
dev
);
void
i915_gem_free_all_phys_object
(
struct
drm_device
*
dev
);
int
i915_gem_object_get_pages
(
struct
drm_gem_object
*
obj
,
gfp_t
gfpmask
);
void
i915_gem_object_put_pages
(
struct
drm_gem_object
*
obj
);
void
i915_gem_release
(
struct
drm_device
*
dev
,
struct
drm_file
*
file_priv
);
void
i915_gem_release
(
struct
drm_device
*
dev
,
struct
drm_file
*
file_priv
);
void
i915_gem_shrinker_init
(
void
);
void
i915_gem_shrinker_init
(
void
);
...
...
drivers/gpu/drm/i915/i915_gem.c
View file @
5cdf5881
...
@@ -58,6 +58,13 @@ static int i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *o
...
@@ -58,6 +58,13 @@ static int i915_gem_phys_pwrite(struct drm_device *dev, struct drm_gem_object *o
struct
drm_file
*
file_priv
);
struct
drm_file
*
file_priv
);
static
void
i915_gem_free_object_tail
(
struct
drm_gem_object
*
obj
);
static
void
i915_gem_free_object_tail
(
struct
drm_gem_object
*
obj
);
static
int
i915_gem_object_get_pages
(
struct
drm_gem_object
*
obj
,
gfp_t
gfpmask
);
static
void
i915_gem_object_put_pages
(
struct
drm_gem_object
*
obj
);
static
LIST_HEAD
(
shrink_list
);
static
LIST_HEAD
(
shrink_list
);
static
DEFINE_SPINLOCK
(
shrink_list_lock
);
static
DEFINE_SPINLOCK
(
shrink_list_lock
);
...
@@ -1021,7 +1028,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
...
@@ -1021,7 +1028,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
if
(
obj_priv
->
phys_obj
)
if
(
obj_priv
->
phys_obj
)
ret
=
i915_gem_phys_pwrite
(
dev
,
obj
,
args
,
file_priv
);
ret
=
i915_gem_phys_pwrite
(
dev
,
obj
,
args
,
file_priv
);
else
if
(
obj_priv
->
tiling_mode
==
I915_TILING_NONE
&&
else
if
(
obj_priv
->
tiling_mode
==
I915_TILING_NONE
&&
dev
->
gtt_total
!=
0
&&
obj_priv
->
gtt_space
&&
obj
->
write_domain
!=
I915_GEM_DOMAIN_CPU
)
{
obj
->
write_domain
!=
I915_GEM_DOMAIN_CPU
)
{
ret
=
i915_gem_gtt_pwrite_fast
(
dev
,
obj
,
args
,
file_priv
);
ret
=
i915_gem_gtt_pwrite_fast
(
dev
,
obj
,
args
,
file_priv
);
if
(
ret
==
-
EFAULT
)
{
if
(
ret
==
-
EFAULT
)
{
...
@@ -1501,7 +1508,7 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data,
...
@@ -1501,7 +1508,7 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data,
return
0
;
return
0
;
}
}
void
static
void
i915_gem_object_put_pages
(
struct
drm_gem_object
*
obj
)
i915_gem_object_put_pages
(
struct
drm_gem_object
*
obj
)
{
{
struct
drm_i915_gem_object
*
obj_priv
=
to_intel_bo
(
obj
);
struct
drm_i915_gem_object
*
obj_priv
=
to_intel_bo
(
obj
);
...
@@ -2174,7 +2181,7 @@ i915_gpu_idle(struct drm_device *dev)
...
@@ -2174,7 +2181,7 @@ i915_gpu_idle(struct drm_device *dev)
return
0
;
return
0
;
}
}
int
static
int
i915_gem_object_get_pages
(
struct
drm_gem_object
*
obj
,
i915_gem_object_get_pages
(
struct
drm_gem_object
*
obj
,
gfp_t
gfpmask
)
gfp_t
gfpmask
)
{
{
...
...
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