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
23fc09ee
Commit
23fc09ee
authored
Feb 03, 2013
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/drm: store full dcb gpio function data in connector
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
e18c080f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
12 deletions
+17
-12
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.c
+9
-7
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/nouveau/nouveau_connector.h
+4
-1
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_display.c
+2
-2
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_dp.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/nouveau_connector.c
View file @
23fc09ee
...
@@ -111,8 +111,8 @@ nouveau_connector_destroy(struct drm_connector *connector)
...
@@ -111,8 +111,8 @@ nouveau_connector_destroy(struct drm_connector *connector)
drm
=
nouveau_drm
(
dev
);
drm
=
nouveau_drm
(
dev
);
gpio
=
nouveau_gpio
(
drm
->
device
);
gpio
=
nouveau_gpio
(
drm
->
device
);
if
(
gpio
&&
nv_connector
->
hpd
!=
DCB_GPIO_UNUSED
)
{
if
(
gpio
&&
nv_connector
->
hpd
.
func
!=
DCB_GPIO_UNUSED
)
{
gpio
->
isr_del
(
gpio
,
0
,
nv_connector
->
hpd
,
0xff
,
gpio
->
isr_del
(
gpio
,
0
,
nv_connector
->
hpd
.
func
,
0xff
,
nouveau_connector_hotplug
,
connector
);
nouveau_connector_hotplug
,
connector
);
}
}
...
@@ -976,8 +976,10 @@ nouveau_connector_create(struct drm_device *dev, int index)
...
@@ -976,8 +976,10 @@ nouveau_connector_create(struct drm_device *dev, int index)
if
(
olddcb_conntab
(
dev
)[
3
]
>=
4
)
if
(
olddcb_conntab
(
dev
)[
3
]
>=
4
)
entry
|=
(
u32
)
ROM16
(
nv_connector
->
dcb
[
2
])
<<
16
;
entry
|=
(
u32
)
ROM16
(
nv_connector
->
dcb
[
2
])
<<
16
;
nv_connector
->
hpd
=
ffs
((
entry
&
0x07033000
)
>>
12
);
ret
=
gpio
->
find
(
gpio
,
0
,
hpd
[
ffs
((
entry
&
0x07033000
)
>>
12
)],
nv_connector
->
hpd
=
hpd
[
nv_connector
->
hpd
];
DCB_GPIO_UNUSED
,
&
nv_connector
->
hpd
);
if
(
ret
)
nv_connector
->
hpd
.
func
=
DCB_GPIO_UNUSED
;
nv_connector
->
type
=
nv_connector
->
dcb
[
0
];
nv_connector
->
type
=
nv_connector
->
dcb
[
0
];
if
(
drm_conntype_from_dcb
(
nv_connector
->
type
)
==
if
(
drm_conntype_from_dcb
(
nv_connector
->
type
)
==
...
@@ -1000,7 +1002,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
...
@@ -1000,7 +1002,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
}
}
else
{
}
else
{
nv_connector
->
type
=
DCB_CONNECTOR_NONE
;
nv_connector
->
type
=
DCB_CONNECTOR_NONE
;
nv_connector
->
hpd
=
DCB_GPIO_UNUSED
;
nv_connector
->
hpd
.
func
=
DCB_GPIO_UNUSED
;
}
}
/* no vbios data, or an unknown dcb connector type - attempt to
/* no vbios data, or an unknown dcb connector type - attempt to
...
@@ -1127,8 +1129,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
...
@@ -1127,8 +1129,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
}
}
connector
->
polled
=
DRM_CONNECTOR_POLL_CONNECT
;
connector
->
polled
=
DRM_CONNECTOR_POLL_CONNECT
;
if
(
gpio
&&
nv_connector
->
hpd
!=
DCB_GPIO_UNUSED
)
{
if
(
gpio
&&
nv_connector
->
hpd
.
func
!=
DCB_GPIO_UNUSED
)
{
ret
=
gpio
->
isr_add
(
gpio
,
0
,
nv_connector
->
hpd
,
0xff
,
ret
=
gpio
->
isr_add
(
gpio
,
0
,
nv_connector
->
hpd
.
func
,
0xff
,
nouveau_connector_hotplug
,
connector
);
nouveau_connector_hotplug
,
connector
);
if
(
ret
==
0
)
if
(
ret
==
0
)
connector
->
polled
=
DRM_CONNECTOR_POLL_HPD
;
connector
->
polled
=
DRM_CONNECTOR_POLL_HPD
;
...
...
drivers/gpu/drm/nouveau/nouveau_connector.h
View file @
23fc09ee
...
@@ -30,6 +30,9 @@
...
@@ -30,6 +30,9 @@
#include <drm/drm_edid.h>
#include <drm/drm_edid.h>
#include "nouveau_crtc.h"
#include "nouveau_crtc.h"
#include <subdev/bios.h>
#include <subdev/bios/gpio.h>
struct
nouveau_i2c_port
;
struct
nouveau_i2c_port
;
enum
nouveau_underscan_type
{
enum
nouveau_underscan_type
{
...
@@ -59,9 +62,9 @@ enum nouveau_dithering_depth {
...
@@ -59,9 +62,9 @@ enum nouveau_dithering_depth {
struct
nouveau_connector
{
struct
nouveau_connector
{
struct
drm_connector
base
;
struct
drm_connector
base
;
enum
dcb_connector_type
type
;
enum
dcb_connector_type
type
;
struct
dcb_gpio_func
hpd
;
u8
index
;
u8
index
;
u8
*
dcb
;
u8
*
dcb
;
u8
hpd
;
int
dithering_mode
;
int
dithering_mode
;
int
dithering_depth
;
int
dithering_depth
;
...
...
drivers/gpu/drm/nouveau/nouveau_display.c
View file @
23fc09ee
...
@@ -234,7 +234,7 @@ nouveau_display_init(struct drm_device *dev)
...
@@ -234,7 +234,7 @@ nouveau_display_init(struct drm_device *dev)
list_for_each_entry
(
connector
,
&
dev
->
mode_config
.
connector_list
,
head
)
{
list_for_each_entry
(
connector
,
&
dev
->
mode_config
.
connector_list
,
head
)
{
struct
nouveau_connector
*
conn
=
nouveau_connector
(
connector
);
struct
nouveau_connector
*
conn
=
nouveau_connector
(
connector
);
if
(
gpio
)
if
(
gpio
)
gpio
->
irq
(
gpio
,
0
,
conn
->
hpd
,
0xff
,
true
);
gpio
->
irq
(
gpio
,
0
,
conn
->
hpd
.
func
,
0xff
,
true
);
}
}
return
ret
;
return
ret
;
...
@@ -252,7 +252,7 @@ nouveau_display_fini(struct drm_device *dev)
...
@@ -252,7 +252,7 @@ nouveau_display_fini(struct drm_device *dev)
list_for_each_entry
(
connector
,
&
dev
->
mode_config
.
connector_list
,
head
)
{
list_for_each_entry
(
connector
,
&
dev
->
mode_config
.
connector_list
,
head
)
{
struct
nouveau_connector
*
conn
=
nouveau_connector
(
connector
);
struct
nouveau_connector
*
conn
=
nouveau_connector
(
connector
);
if
(
gpio
)
if
(
gpio
)
gpio
->
irq
(
gpio
,
0
,
conn
->
hpd
,
0xff
,
false
);
gpio
->
irq
(
gpio
,
0
,
conn
->
hpd
.
func
,
0xff
,
false
);
}
}
drm_kms_helper_poll_disable
(
dev
);
drm_kms_helper_poll_disable
(
dev
);
...
...
drivers/gpu/drm/nouveau/nouveau_dp.c
View file @
23fc09ee
...
@@ -260,7 +260,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
...
@@ -260,7 +260,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
* we take during link training (DP_SET_POWER is one), we need
* we take during link training (DP_SET_POWER is one), we need
* to ignore them for the moment to avoid races.
* to ignore them for the moment to avoid races.
*/
*/
gpio
->
irq
(
gpio
,
0
,
nv_connector
->
hpd
,
0xff
,
false
);
gpio
->
irq
(
gpio
,
0
,
nv_connector
->
hpd
.
func
,
0xff
,
false
);
/* enable down-spreading and execute pre-train script from vbios */
/* enable down-spreading and execute pre-train script from vbios */
dp_link_train_init
(
dev
,
&
dp
,
nv_encoder
->
dp
.
dpcd
[
3
]
&
1
);
dp_link_train_init
(
dev
,
&
dp
,
nv_encoder
->
dp
.
dpcd
[
3
]
&
1
);
...
@@ -300,7 +300,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
...
@@ -300,7 +300,7 @@ nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
dp_link_train_fini
(
dev
,
&
dp
);
dp_link_train_fini
(
dev
,
&
dp
);
/* re-enable hotplug detect */
/* re-enable hotplug detect */
gpio
->
irq
(
gpio
,
0
,
nv_connector
->
hpd
,
0xff
,
true
);
gpio
->
irq
(
gpio
,
0
,
nv_connector
->
hpd
.
func
,
0xff
,
true
);
return
true
;
return
true
;
}
}
...
...
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