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
fc1b0a02
Commit
fc1b0a02
authored
May 24, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: pass nvif_client to nouveau_gem_new() instead of drm_device
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
bab7cc18
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_abi16.c
+1
-1
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+2
-1
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
+3
-2
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/nouveau/nouveau_gem.c
+5
-5
drivers/gpu/drm/nouveau/nouveau_gem.h
drivers/gpu/drm/nouveau/nouveau_gem.h
+1
-1
No files found.
drivers/gpu/drm/nouveau/nouveau_abi16.c
View file @
fc1b0a02
...
@@ -321,7 +321,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
...
@@ -321,7 +321,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
}
}
/* Named memory object area */
/* Named memory object area */
ret
=
nouveau_gem_new
(
dev
,
PAGE_SIZE
,
0
,
NOUVEAU_GEM_DOMAIN_GART
,
ret
=
nouveau_gem_new
(
cli
,
PAGE_SIZE
,
0
,
NOUVEAU_GEM_DOMAIN_GART
,
0
,
0
,
&
chan
->
ntfy
);
0
,
0
,
&
chan
->
ntfy
);
if
(
ret
==
0
)
if
(
ret
==
0
)
ret
=
nouveau_bo_pin
(
chan
->
ntfy
,
TTM_PL_FLAG_TT
,
false
);
ret
=
nouveau_bo_pin
(
chan
->
ntfy
,
TTM_PL_FLAG_TT
,
false
);
...
...
drivers/gpu/drm/nouveau/nouveau_display.c
View file @
fc1b0a02
...
@@ -1057,6 +1057,7 @@ int
...
@@ -1057,6 +1057,7 @@ int
nouveau_display_dumb_create
(
struct
drm_file
*
file_priv
,
struct
drm_device
*
dev
,
nouveau_display_dumb_create
(
struct
drm_file
*
file_priv
,
struct
drm_device
*
dev
,
struct
drm_mode_create_dumb
*
args
)
struct
drm_mode_create_dumb
*
args
)
{
{
struct
nouveau_cli
*
cli
=
nouveau_cli
(
file_priv
);
struct
nouveau_bo
*
bo
;
struct
nouveau_bo
*
bo
;
uint32_t
domain
;
uint32_t
domain
;
int
ret
;
int
ret
;
...
@@ -1071,7 +1072,7 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
...
@@ -1071,7 +1072,7 @@ nouveau_display_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
else
else
domain
=
NOUVEAU_GEM_DOMAIN_GART
;
domain
=
NOUVEAU_GEM_DOMAIN_GART
;
ret
=
nouveau_gem_new
(
dev
,
args
->
size
,
0
,
domain
,
0
,
0
,
&
bo
);
ret
=
nouveau_gem_new
(
cli
,
args
->
size
,
0
,
domain
,
0
,
0
,
&
bo
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/nouveau/nouveau_fbcon.c
View file @
fc1b0a02
...
@@ -341,8 +341,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
...
@@ -341,8 +341,9 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
mode_cmd
.
pixel_format
=
drm_mode_legacy_fb_format
(
sizes
->
surface_bpp
,
mode_cmd
.
pixel_format
=
drm_mode_legacy_fb_format
(
sizes
->
surface_bpp
,
sizes
->
surface_depth
);
sizes
->
surface_depth
);
ret
=
nouveau_gem_new
(
dev
,
mode_cmd
.
pitches
[
0
]
*
mode_cmd
.
height
,
ret
=
nouveau_gem_new
(
&
drm
->
client
,
mode_cmd
.
pitches
[
0
]
*
0
,
NOUVEAU_GEM_DOMAIN_VRAM
,
0
,
0x0000
,
&
nvbo
);
mode_cmd
.
height
,
0
,
NOUVEAU_GEM_DOMAIN_VRAM
,
0
,
0x0000
,
&
nvbo
);
if
(
ret
)
{
if
(
ret
)
{
NV_ERROR
(
drm
,
"failed to allocate framebuffer
\n
"
);
NV_ERROR
(
drm
,
"failed to allocate framebuffer
\n
"
);
goto
out
;
goto
out
;
...
...
drivers/gpu/drm/nouveau/nouveau_gem.c
View file @
fc1b0a02
...
@@ -175,11 +175,11 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
...
@@ -175,11 +175,11 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
}
}
int
int
nouveau_gem_new
(
struct
drm_device
*
dev
,
int
size
,
int
align
,
uint32_t
domain
,
nouveau_gem_new
(
struct
nouveau_cli
*
cli
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
pnvbo
)
struct
nouveau_bo
**
pnvbo
)
{
{
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nouveau_drm
*
drm
=
nouveau_drm
(
cli
->
dev
);
struct
nouveau_bo
*
nvbo
;
struct
nouveau_bo
*
nvbo
;
u32
flags
=
0
;
u32
flags
=
0
;
int
ret
;
int
ret
;
...
@@ -194,7 +194,7 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
...
@@ -194,7 +194,7 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
if
(
domain
&
NOUVEAU_GEM_DOMAIN_COHERENT
)
if
(
domain
&
NOUVEAU_GEM_DOMAIN_COHERENT
)
flags
|=
TTM_PL_FLAG_UNCACHED
;
flags
|=
TTM_PL_FLAG_UNCACHED
;
ret
=
nouveau_bo_new
(
&
drm
->
client
,
size
,
align
,
flags
,
tile_mode
,
ret
=
nouveau_bo_new
(
cli
,
size
,
align
,
flags
,
tile_mode
,
tile_flags
,
NULL
,
NULL
,
pnvbo
);
tile_flags
,
NULL
,
NULL
,
pnvbo
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -211,7 +211,7 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
...
@@ -211,7 +211,7 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain,
/* Initialize the embedded gem-object. We return a single gem-reference
/* Initialize the embedded gem-object. We return a single gem-reference
* to the caller, instead of a normal nouveau_bo ttm reference. */
* to the caller, instead of a normal nouveau_bo ttm reference. */
ret
=
drm_gem_object_init
(
dev
,
&
nvbo
->
gem
,
nvbo
->
bo
.
mem
.
size
);
ret
=
drm_gem_object_init
(
d
rm
->
d
ev
,
&
nvbo
->
gem
,
nvbo
->
bo
.
mem
.
size
);
if
(
ret
)
{
if
(
ret
)
{
nouveau_bo_ref
(
NULL
,
pnvbo
);
nouveau_bo_ref
(
NULL
,
pnvbo
);
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -267,7 +267,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
...
@@ -267,7 +267,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
ret
=
nouveau_gem_new
(
dev
,
req
->
info
.
size
,
req
->
align
,
ret
=
nouveau_gem_new
(
cli
,
req
->
info
.
size
,
req
->
align
,
req
->
info
.
domain
,
req
->
info
.
tile_mode
,
req
->
info
.
domain
,
req
->
info
.
tile_mode
,
req
->
info
.
tile_flags
,
&
nvbo
);
req
->
info
.
tile_flags
,
&
nvbo
);
if
(
ret
)
if
(
ret
)
...
...
drivers/gpu/drm/nouveau/nouveau_gem.h
View file @
fc1b0a02
...
@@ -16,7 +16,7 @@ nouveau_gem_object(struct drm_gem_object *gem)
...
@@ -16,7 +16,7 @@ nouveau_gem_object(struct drm_gem_object *gem)
}
}
/* nouveau_gem.c */
/* nouveau_gem.c */
extern
int
nouveau_gem_new
(
struct
drm_device
*
,
int
size
,
int
align
,
extern
int
nouveau_gem_new
(
struct
nouveau_cli
*
,
int
size
,
int
align
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
domain
,
uint32_t
tile_mode
,
uint32_t
tile_flags
,
struct
nouveau_bo
**
);
uint32_t
tile_flags
,
struct
nouveau_bo
**
);
extern
void
nouveau_gem_object_del
(
struct
drm_gem_object
*
);
extern
void
nouveau_gem_object_del
(
struct
drm_gem_object
*
);
...
...
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