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
2bfa0b01
Commit
2bfa0b01
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/fb/ram/gt215: allocate training buffer with nvkm_ram_get()
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
e9a8b218
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
+9
-9
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c
View file @
2bfa0b01
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "ram.h"
#include "ram.h"
#include "ramfuc.h"
#include "ramfuc.h"
#include <core/memory.h>
#include <core/option.h>
#include <core/option.h>
#include <subdev/bios.h>
#include <subdev/bios.h>
#include <subdev/bios/M0205.h>
#include <subdev/bios/M0205.h>
...
@@ -86,7 +87,7 @@ struct gt215_ltrain {
...
@@ -86,7 +87,7 @@ struct gt215_ltrain {
u32
r_100720
;
u32
r_100720
;
u32
r_1111e0
;
u32
r_1111e0
;
u32
r_111400
;
u32
r_111400
;
struct
nvkm_mem
*
mem
;
struct
nvkm_mem
ory
*
memory
;
};
};
struct
gt215_ram
{
struct
gt215_ram
{
...
@@ -279,10 +280,10 @@ gt215_link_train_init(struct gt215_ram *ram)
...
@@ -279,10 +280,10 @@ gt215_link_train_init(struct gt215_ram *ram)
struct
gt215_ltrain
*
train
=
&
ram
->
ltrain
;
struct
gt215_ltrain
*
train
=
&
ram
->
ltrain
;
struct
nvkm_device
*
device
=
ram
->
base
.
fb
->
subdev
.
device
;
struct
nvkm_device
*
device
=
ram
->
base
.
fb
->
subdev
.
device
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
nvkm_mem
*
mem
;
struct
nvbios_M0205E
M0205E
;
struct
nvbios_M0205E
M0205E
;
u8
ver
,
hdr
,
cnt
,
len
;
u8
ver
,
hdr
,
cnt
,
len
;
u32
r001700
;
u32
r001700
;
u64
addr
;
int
ret
,
i
=
0
;
int
ret
,
i
=
0
;
train
->
state
=
NVA3_TRAIN_UNSUPPORTED
;
train
->
state
=
NVA3_TRAIN_UNSUPPORTED
;
...
@@ -297,14 +298,14 @@ gt215_link_train_init(struct gt215_ram *ram)
...
@@ -297,14 +298,14 @@ gt215_link_train_init(struct gt215_ram *ram)
train
->
state
=
NVA3_TRAIN_ONCE
;
train
->
state
=
NVA3_TRAIN_ONCE
;
ret
=
ram
->
base
.
func
->
get
(
&
ram
->
base
,
0x8000
,
0x10000
,
0
,
0x8
00
,
ret
=
nvkm_ram_get
(
device
,
NVKM_RAM_MM_NORMAL
,
0x01
,
16
,
0x80
00
,
&
ram
->
ltrain
.
mem
);
true
,
true
,
&
ram
->
ltrain
.
memory
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
mem
=
ram
->
ltrain
.
mem
;
addr
=
nvkm_memory_addr
(
ram
->
ltrain
.
memory
)
;
nvkm_wr32
(
device
,
0x100538
,
0x10000000
|
(
mem
->
offset
>>
16
));
nvkm_wr32
(
device
,
0x100538
,
0x10000000
|
(
addr
>>
16
));
nvkm_wr32
(
device
,
0x1005a8
,
0x0000ffff
);
nvkm_wr32
(
device
,
0x1005a8
,
0x0000ffff
);
nvkm_mask
(
device
,
0x10f800
,
0x00000001
,
0x00000001
);
nvkm_mask
(
device
,
0x10f800
,
0x00000001
,
0x00000001
);
...
@@ -320,7 +321,7 @@ gt215_link_train_init(struct gt215_ram *ram)
...
@@ -320,7 +321,7 @@ gt215_link_train_init(struct gt215_ram *ram)
/* And upload the pattern */
/* And upload the pattern */
r001700
=
nvkm_rd32
(
device
,
0x1700
);
r001700
=
nvkm_rd32
(
device
,
0x1700
);
nvkm_wr32
(
device
,
0x1700
,
mem
->
offset
>>
16
);
nvkm_wr32
(
device
,
0x1700
,
addr
>>
16
);
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
i
=
0
;
i
<
16
;
i
++
)
nvkm_wr32
(
device
,
0x700000
+
(
i
<<
2
),
pattern
[
i
]);
nvkm_wr32
(
device
,
0x700000
+
(
i
<<
2
),
pattern
[
i
]);
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
i
=
0
;
i
<
16
;
i
++
)
...
@@ -336,8 +337,7 @@ gt215_link_train_init(struct gt215_ram *ram)
...
@@ -336,8 +337,7 @@ gt215_link_train_init(struct gt215_ram *ram)
static
void
static
void
gt215_link_train_fini
(
struct
gt215_ram
*
ram
)
gt215_link_train_fini
(
struct
gt215_ram
*
ram
)
{
{
if
(
ram
->
ltrain
.
mem
)
nvkm_memory_unref
(
&
ram
->
ltrain
.
memory
);
ram
->
base
.
func
->
put
(
&
ram
->
base
,
&
ram
->
ltrain
.
mem
);
}
}
/*
/*
...
...
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