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
6ba9a683
Commit
6ba9a683
authored
Feb 10, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: pass domain rather than ttm flags to gem_new()
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a6704788
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
16 deletions
+17
-16
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
+2
-2
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+12
-11
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/nouveau_drv.h
View file @
6ba9a683
...
...
@@ -1352,7 +1352,7 @@ static inline struct nouveau_fence *nouveau_fence_ref(struct nouveau_fence *obj)
/* nouveau_gem.c */
extern
int
nouveau_gem_new
(
struct
drm_device
*
,
struct
nouveau_channel
*
,
int
size
,
int
align
,
uint32_t
flags
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
);
extern
int
nouveau_gem_object_new
(
struct
drm_gem_object
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_fbcon.c
View file @
6ba9a683
...
...
@@ -296,8 +296,8 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
size
=
mode_cmd
.
pitch
*
mode_cmd
.
height
;
size
=
roundup
(
size
,
PAGE_SIZE
);
ret
=
nouveau_gem_new
(
dev
,
dev_priv
->
channel
,
size
,
0
,
TTM_PL_FLAG_VRAM
,
0
,
0x0000
,
&
nvbo
);
ret
=
nouveau_gem_new
(
dev
,
dev_priv
->
channel
,
size
,
0
,
NOUVEAU_GEM_DOMAIN_VRAM
,
0
,
0x0000
,
&
nvbo
);
if
(
ret
)
{
NV_ERROR
(
dev
,
"failed to allocate framebuffer
\n
"
);
goto
out
;
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
6ba9a683
...
...
@@ -61,12 +61,20 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
int
nouveau_gem_new
(
struct
drm_device
*
dev
,
struct
nouveau_channel
*
chan
,
int
size
,
int
align
,
uint32_t
flags
,
uint32_t
tile_mode
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
pnvbo
)
{
struct
nouveau_bo
*
nvbo
;
u32
flags
=
0
;
int
ret
;
if
(
domain
&
NOUVEAU_GEM_DOMAIN_VRAM
)
flags
|=
TTM_PL_FLAG_VRAM
;
if
(
domain
&
NOUVEAU_GEM_DOMAIN_GART
)
flags
|=
TTM_PL_FLAG_TT
;
if
(
!
flags
||
domain
&
NOUVEAU_GEM_DOMAIN_CPU
)
flags
|=
TTM_PL_FLAG_SYSTEM
;
ret
=
nouveau_bo_new
(
dev
,
chan
,
size
,
align
,
flags
,
tile_mode
,
tile_flags
,
pnvbo
);
if
(
ret
)
...
...
@@ -110,19 +118,11 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
struct
drm_nouveau_gem_new
*
req
=
data
;
struct
nouveau_bo
*
nvbo
=
NULL
;
struct
nouveau_channel
*
chan
=
NULL
;
uint32_t
flags
=
0
;
int
ret
=
0
;
if
(
unlikely
(
dev_priv
->
ttm
.
bdev
.
dev_mapping
==
NULL
))
dev_priv
->
ttm
.
bdev
.
dev_mapping
=
dev_priv
->
dev
->
dev_mapping
;
if
(
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_VRAM
)
flags
|=
TTM_PL_FLAG_VRAM
;
if
(
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_GART
)
flags
|=
TTM_PL_FLAG_TT
;
if
(
!
flags
||
req
->
info
.
domain
&
NOUVEAU_GEM_DOMAIN_CPU
)
flags
|=
TTM_PL_FLAG_SYSTEM
;
if
(
!
dev_priv
->
engine
.
vram
.
flags_valid
(
dev
,
req
->
info
.
tile_flags
))
{
NV_ERROR
(
dev
,
"bad page flags: 0x%08x
\n
"
,
req
->
info
.
tile_flags
);
return
-
EINVAL
;
...
...
@@ -134,8 +134,9 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
return
PTR_ERR
(
chan
);
}
ret
=
nouveau_gem_new
(
dev
,
chan
,
req
->
info
.
size
,
req
->
align
,
flags
,
req
->
info
.
tile_mode
,
req
->
info
.
tile_flags
,
&
nvbo
);
ret
=
nouveau_gem_new
(
dev
,
chan
,
req
->
info
.
size
,
req
->
align
,
req
->
info
.
domain
,
req
->
info
.
tile_mode
,
req
->
info
.
tile_flags
,
&
nvbo
);
if
(
chan
)
nouveau_channel_put
(
&
chan
);
if
(
ret
)
...
...
drivers/gpu/drm/nouveau/nouveau_notifier.c
View file @
6ba9a683
...
...
@@ -39,9 +39,9 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
int
ret
;
if
(
nouveau_vram_notify
)
flags
=
TTM_PL_FLAG
_VRAM
;
flags
=
NOUVEAU_GEM_DOMAIN
_VRAM
;
else
flags
=
TTM_PL_FLAG_T
T
;
flags
=
NOUVEAU_GEM_DOMAIN_GAR
T
;
ret
=
nouveau_gem_new
(
dev
,
NULL
,
PAGE_SIZE
,
0
,
flags
,
0
,
0
,
&
ntfy
);
if
(
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