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
9100468d
Commit
9100468d
authored
Oct 15, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: pass gpuobj alignment request down into backing allocator
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
0541324a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+4
-4
drivers/gpu/drm/nouveau/nouveau_object.c
drivers/gpu/drm/nouveau/nouveau_object.c
+1
-1
drivers/gpu/drm/nouveau/nv04_instmem.c
drivers/gpu/drm/nouveau/nv04_instmem.c
+1
-1
drivers/gpu/drm/nouveau/nv50_instmem.c
drivers/gpu/drm/nouveau/nv50_instmem.c
+5
-5
drivers/gpu/drm/nouveau/nvc0_instmem.c
drivers/gpu/drm/nouveau/nvc0_instmem.c
+3
-3
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
9100468d
...
...
@@ -265,7 +265,7 @@ struct nouveau_instmem_engine {
void
(
*
resume
)(
struct
drm_device
*
dev
);
int
(
*
populate
)(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
,
u
int32_t
*
size
);
u
32
*
size
,
u32
align
);
void
(
*
clear
)(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
int
(
*
bind
)(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
int
(
*
unbind
)(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
...
...
@@ -1121,7 +1121,7 @@ extern void nv04_instmem_takedown(struct drm_device *);
extern
int
nv04_instmem_suspend
(
struct
drm_device
*
);
extern
void
nv04_instmem_resume
(
struct
drm_device
*
);
extern
int
nv04_instmem_populate
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
,
u
int32_t
*
size
);
u
32
*
size
,
u32
align
);
extern
void
nv04_instmem_clear
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nv04_instmem_bind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nv04_instmem_unbind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
...
...
@@ -1133,7 +1133,7 @@ extern void nv50_instmem_takedown(struct drm_device *);
extern
int
nv50_instmem_suspend
(
struct
drm_device
*
);
extern
void
nv50_instmem_resume
(
struct
drm_device
*
);
extern
int
nv50_instmem_populate
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
,
u
int32_t
*
size
);
u
32
*
size
,
u32
align
);
extern
void
nv50_instmem_clear
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nv50_instmem_bind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nv50_instmem_unbind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
...
...
@@ -1147,7 +1147,7 @@ extern void nvc0_instmem_takedown(struct drm_device *);
extern
int
nvc0_instmem_suspend
(
struct
drm_device
*
);
extern
void
nvc0_instmem_resume
(
struct
drm_device
*
);
extern
int
nvc0_instmem_populate
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
,
u
int32_t
*
size
);
u
32
*
size
,
u32
align
);
extern
void
nvc0_instmem_clear
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nvc0_instmem_bind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nvc0_instmem_unbind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_object.c
View file @
9100468d
...
...
@@ -112,7 +112,7 @@ nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan,
NV_DEBUG
(
dev
,
"global heap
\n
"
);
/* allocate backing pages, sets vinst */
ret
=
engine
->
instmem
.
populate
(
dev
,
gpuobj
,
&
size
);
ret
=
engine
->
instmem
.
populate
(
dev
,
gpuobj
,
&
size
,
align
);
if
(
ret
)
{
nouveau_gpuobj_ref
(
NULL
,
&
gpuobj
);
return
ret
;
...
...
drivers/gpu/drm/nouveau/nv04_instmem.c
View file @
9100468d
...
...
@@ -99,7 +99,7 @@ nv04_instmem_takedown(struct drm_device *dev)
int
nv04_instmem_populate
(
struct
drm_device
*
dev
,
struct
nouveau_gpuobj
*
gpuobj
,
u
int32_t
*
sz
)
u
32
*
size
,
u32
align
)
{
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nv50_instmem.c
View file @
9100468d
...
...
@@ -322,19 +322,19 @@ nv50_instmem_resume(struct drm_device *dev)
int
nv50_instmem_populate
(
struct
drm_device
*
dev
,
struct
nouveau_gpuobj
*
gpuobj
,
u
int32_t
*
sz
)
u
32
*
size
,
u32
align
)
{
int
ret
;
if
(
gpuobj
->
im_backing
)
return
-
EINVAL
;
*
s
z
=
ALIGN
(
*
sz
,
4096
);
if
(
*
s
z
==
0
)
*
s
ize
=
ALIGN
(
*
size
,
4096
);
if
(
*
s
ize
==
0
)
return
-
EINVAL
;
ret
=
nouveau_bo_new
(
dev
,
NULL
,
*
s
z
,
0
,
TTM_PL_FLAG_VRAM
,
0
,
0x0000
,
true
,
false
,
&
gpuobj
->
im_backing
);
ret
=
nouveau_bo_new
(
dev
,
NULL
,
*
s
ize
,
align
,
TTM_PL_FLAG_VRAM
,
0
,
0x0000
,
true
,
false
,
&
gpuobj
->
im_backing
);
if
(
ret
)
{
NV_ERROR
(
dev
,
"error getting PRAMIN backing pages: %d
\n
"
,
ret
);
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvc0_instmem.c
View file @
9100468d
...
...
@@ -28,7 +28,7 @@
int
nvc0_instmem_populate
(
struct
drm_device
*
dev
,
struct
nouveau_gpuobj
*
gpuobj
,
u
int32_t
*
size
)
u
32
*
size
,
u32
align
)
{
int
ret
;
...
...
@@ -36,8 +36,8 @@ nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
if
(
*
size
==
0
)
return
-
EINVAL
;
ret
=
nouveau_bo_new
(
dev
,
NULL
,
*
size
,
0
,
TTM_PL_FLAG_VRAM
,
0
,
0x0000
,
true
,
false
,
&
gpuobj
->
im_backing
);
ret
=
nouveau_bo_new
(
dev
,
NULL
,
*
size
,
align
,
TTM_PL_FLAG_VRAM
,
0
,
0x0000
,
true
,
false
,
&
gpuobj
->
im_backing
);
if
(
ret
)
{
NV_ERROR
(
dev
,
"error getting PRAMIN backing pages: %d
\n
"
,
ret
);
return
ret
;
...
...
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