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
bd447053
Commit
bd447053
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/ltc/gf100-: allocate tagram with nvkm_ram_get()
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
7f4f82af
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
+2
-3
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c
+6
-5
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h
View file @
bd447053
...
...
@@ -14,7 +14,7 @@ struct nvkm_ltc {
u32
num_tags
;
u32
tag_base
;
struct
nvkm_m
m_node
*
tag_ram
;
struct
nvkm_m
emory
*
tag_ram
;
int
zbc_min
;
int
zbc_max
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
View file @
bd447053
...
...
@@ -23,6 +23,7 @@
*/
#include "priv.h"
#include <core/memory.h>
#include <subdev/fb.h>
int
...
...
@@ -119,9 +120,7 @@ static void *
nvkm_ltc_dtor
(
struct
nvkm_subdev
*
subdev
)
{
struct
nvkm_ltc
*
ltc
=
nvkm_ltc
(
subdev
);
struct
nvkm_ram
*
ram
=
ltc
->
subdev
.
device
->
fb
->
ram
;
if
(
ram
)
nvkm_mm_free
(
&
ram
->
vram
,
&
ltc
->
tag_ram
);
nvkm_memory_unref
(
&
ltc
->
tag_ram
);
return
ltc
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c
View file @
bd447053
...
...
@@ -23,6 +23,7 @@
*/
#include "priv.h"
#include <core/memory.h>
#include <subdev/fb.h>
#include <subdev/timer.h>
...
...
@@ -152,7 +153,8 @@ gf100_ltc_flush(struct nvkm_ltc *ltc)
int
gf100_ltc_oneinit_tag_ram
(
struct
nvkm_ltc
*
ltc
)
{
struct
nvkm_fb
*
fb
=
ltc
->
subdev
.
device
->
fb
;
struct
nvkm_device
*
device
=
ltc
->
subdev
.
device
;
struct
nvkm_fb
*
fb
=
device
->
fb
;
struct
nvkm_ram
*
ram
=
fb
->
ram
;
u32
tag_size
,
tag_margin
,
tag_align
;
int
ret
;
...
...
@@ -182,14 +184,13 @@ gf100_ltc_oneinit_tag_ram(struct nvkm_ltc *ltc)
*/
tag_size
=
(
ltc
->
num_tags
/
64
)
*
0x6000
+
tag_margin
;
tag_size
+=
tag_align
;
tag_size
=
(
tag_size
+
0xfff
)
>>
12
;
/* round up */
ret
=
nvkm_
mm_tail
(
&
ram
->
vram
,
NVKM_RAM_MM_NORMAL
,
1
,
tag_size
,
t
ag_size
,
1
,
&
ltc
->
tag_ram
);
ret
=
nvkm_
ram_get
(
device
,
NVKM_RAM_MM_NORMAL
,
0x01
,
12
,
tag_size
,
t
rue
,
true
,
&
ltc
->
tag_ram
);
if
(
ret
)
{
ltc
->
num_tags
=
0
;
}
else
{
u64
tag_base
=
((
u64
)
ltc
->
tag_ram
->
offset
<<
12
)
+
tag_margin
;
u64
tag_base
=
nvkm_memory_addr
(
ltc
->
tag_ram
)
+
tag_margin
;
tag_base
+=
tag_align
-
1
;
do_div
(
tag_base
,
tag_align
);
...
...
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