Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
a2ac09a0
Commit
a2ac09a0
authored
5 years ago
by
Ben Skeggs
Browse files
Options
Downloads
Patches
Plain Diff
drm/nouveau/core: allow detected chipset to be overridden
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a0b694d0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/gpu/drm/nouveau/nouveau_drm.c
+2
-1
2 additions, 1 deletion
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+22
-2
22 additions, 2 deletions
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
with
24 additions
and
3 deletions
drivers/gpu/drm/nouveau/nouveau_drm.c
+
2
−
1
View file @
a2ac09a0
...
...
@@ -631,7 +631,8 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
/* We need to check that the chipset is supported before booting
* fbdev off the hardware, as there's no way to put it back.
*/
ret
=
nvkm_device_pci_new
(
pdev
,
NULL
,
"error"
,
true
,
false
,
0
,
&
device
);
ret
=
nvkm_device_pci_new
(
pdev
,
nouveau_config
,
"error"
,
true
,
false
,
0
,
&
device
);
if
(
ret
)
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+
22
−
2
View file @
a2ac09a0
...
...
@@ -2824,8 +2824,8 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
u64
mmio_base
,
mmio_size
;
u32
boot0
,
strap
;
void
__iomem
*
map
;
int
ret
=
-
EEXIST
;
int
i
;
int
ret
=
-
EEXIST
,
i
;
unsigned
chipset
;
mutex_lock
(
&
nv_devices_mutex
);
if
(
nvkm_device_find_locked
(
handle
))
...
...
@@ -2870,6 +2870,26 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
strap
=
ioread32_native
(
map
+
0x101000
);
iounmap
(
map
);
/* chipset can be overridden for devel/testing purposes */
chipset
=
nvkm_longopt
(
device
->
cfgopt
,
"NvChipset"
,
0
);
if
(
chipset
)
{
u32
override_boot0
;
if
(
chipset
>=
0x10
)
{
override_boot0
=
((
chipset
&
0x1ff
)
<<
20
);
override_boot0
|=
0x000000a1
;
}
else
{
if
(
chipset
!=
0x04
)
override_boot0
=
0x20104000
;
else
override_boot0
=
0x20004000
;
}
nvdev_warn
(
device
,
"CHIPSET OVERRIDE: %08x -> %08x
\n
"
,
boot0
,
override_boot0
);
boot0
=
override_boot0
;
}
/* determine chipset and derive architecture from it */
if
((
boot0
&
0x1f000000
)
>
0
)
{
device
->
chipset
=
(
boot0
&
0x1ff00000
)
>>
20
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment