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
791dc143
Commit
791dc143
authored
Jun 27, 2013
by
Maarten Lankhorst
Committed by
Ben Skeggs
Jul 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvd0-/disp: handle case where display engine is missing/disabled
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
e99716f1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
7 deletions
+17
-7
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
+3
-0
drivers/gpu/drm/nouveau/core/engine/disp/nve0.c
drivers/gpu/drm/nouveau/core/engine/disp/nve0.c
+3
-0
drivers/gpu/drm/nouveau/core/engine/disp/nvf0.c
drivers/gpu/drm/nouveau/core/engine/disp/nvf0.c
+3
-0
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
+5
-1
drivers/gpu/drm/nouveau/core/subdev/devinit/nvc0.c
drivers/gpu/drm/nouveau/core/subdev/devinit/nvc0.c
+2
-0
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+1
-6
No files found.
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
View file @
791dc143
...
...
@@ -958,6 +958,9 @@ nvd0_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
heads
=
nv_rd32
(
parent
,
0x022448
);
int
ret
;
if
(
nv_rd32
(
parent
,
0x022500
)
&
0x00000001
)
return
-
ENODEV
;
ret
=
nouveau_disp_create
(
parent
,
engine
,
oclass
,
heads
,
"PDISP"
,
"display"
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nve0.c
View file @
791dc143
...
...
@@ -54,6 +54,9 @@ nve0_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
heads
=
nv_rd32
(
parent
,
0x022448
);
int
ret
;
if
(
nv_rd32
(
parent
,
0x022500
)
&
0x00000001
)
return
-
ENODEV
;
ret
=
nouveau_disp_create
(
parent
,
engine
,
oclass
,
heads
,
"PDISP"
,
"display"
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nvf0.c
View file @
791dc143
...
...
@@ -54,6 +54,9 @@ nvf0_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
heads
=
nv_rd32
(
parent
,
0x022448
);
int
ret
;
if
(
nv_rd32
(
parent
,
0x022500
)
&
0x00000001
)
return
-
ENODEV
;
ret
=
nouveau_disp_create
(
parent
,
engine
,
oclass
,
heads
,
"PDISP"
,
"display"
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
...
...
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
View file @
791dc143
...
...
@@ -85,11 +85,15 @@ static void
nouveau_bios_shadow_pramin
(
struct
nouveau_bios
*
bios
)
{
struct
nouveau_device
*
device
=
nv_device
(
bios
);
u64
addr
=
0
;
u32
bar0
=
0
;
int
i
;
if
(
device
->
card_type
>=
NV_50
)
{
u64
addr
=
(
u64
)(
nv_rd32
(
bios
,
0x619f04
)
&
0xffffff00
)
<<
8
;
if
(
device
->
card_type
<
NV_C0
||
!
(
nv_rd32
(
bios
,
0x022500
)
&
0x00000001
))
addr
=
(
u64
)(
nv_rd32
(
bios
,
0x619f04
)
&
0xffffff00
)
<<
8
;
if
(
!
addr
)
{
addr
=
(
u64
)
nv_rd32
(
bios
,
0x001700
)
<<
16
;
addr
+=
0xf0000
;
...
...
drivers/gpu/drm/nouveau/core/subdev/devinit/nvc0.c
View file @
791dc143
...
...
@@ -73,6 +73,8 @@ nvc0_devinit_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
priv
->
base
.
pll_set
=
nvc0_devinit_pll_set
;
if
(
nv_rd32
(
priv
,
0x022500
)
&
0x00000001
)
priv
->
base
.
post
=
true
;
return
0
;
}
...
...
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
791dc143
...
...
@@ -2051,19 +2051,14 @@ nouveau_bios_posted(struct drm_device *dev)
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
unsigned
htotal
;
if
(
nv_device
(
drm
->
device
)
->
card_type
>=
NV_50
)
{
if
(
NVReadVgaCrtc
(
dev
,
0
,
0x00
)
==
0
&&
NVReadVgaCrtc
(
dev
,
0
,
0x1a
)
==
0
)
return
false
;
if
(
nv_device
(
drm
->
device
)
->
card_type
>=
NV_50
)
return
true
;
}
htotal
=
NVReadVgaCrtc
(
dev
,
0
,
0x06
);
htotal
|=
(
NVReadVgaCrtc
(
dev
,
0
,
0x07
)
&
0x01
)
<<
8
;
htotal
|=
(
NVReadVgaCrtc
(
dev
,
0
,
0x07
)
&
0x20
)
<<
4
;
htotal
|=
(
NVReadVgaCrtc
(
dev
,
0
,
0x25
)
&
0x01
)
<<
10
;
htotal
|=
(
NVReadVgaCrtc
(
dev
,
0
,
0x41
)
&
0x01
)
<<
11
;
return
(
htotal
!=
0
);
}
...
...
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