Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
6782cc7b
Commit
6782cc7b
authored
Nov 06, 2009
by
Dave Airlie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'drm-next' of ../drm-2.6 into drm-next
parents
4fe9676d
a3fa6320
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
272 additions
and
65 deletions
+272
-65
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600.c
+12
-6
drivers/gpu/drm/radeon/r600_blit_kms.c
drivers/gpu/drm/radeon/r600_blit_kms.c
+1
-1
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_atombios.c
+73
-6
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/radeon_combios.c
+121
-41
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_connectors.c
+53
-3
drivers/gpu/drm/radeon/radeon_encoders.c
drivers/gpu/drm/radeon/radeon_encoders.c
+11
-8
drivers/gpu/drm/radeon/radeon_mode.h
drivers/gpu/drm/radeon/radeon_mode.h
+1
-0
No files found.
drivers/gpu/drm/radeon/r600.c
View file @
6782cc7b
...
...
@@ -858,7 +858,8 @@ void r600_gpu_init(struct radeon_device *rdev)
((
rdev
->
family
)
==
CHIP_RV630
)
||
((
rdev
->
family
)
==
CHIP_RV610
)
||
((
rdev
->
family
)
==
CHIP_RV620
)
||
((
rdev
->
family
)
==
CHIP_RS780
))
{
((
rdev
->
family
)
==
CHIP_RS780
)
||
((
rdev
->
family
)
==
CHIP_RS880
))
{
WREG32
(
DB_DEBUG
,
PREZ_MUST_WAIT_FOR_POSTZ_DONE
);
}
else
{
WREG32
(
DB_DEBUG
,
0
);
...
...
@@ -875,7 +876,8 @@ void r600_gpu_init(struct radeon_device *rdev)
tmp
=
RREG32
(
SQ_MS_FIFO_SIZES
);
if
(((
rdev
->
family
)
==
CHIP_RV610
)
||
((
rdev
->
family
)
==
CHIP_RV620
)
||
((
rdev
->
family
)
==
CHIP_RS780
))
{
((
rdev
->
family
)
==
CHIP_RS780
)
||
((
rdev
->
family
)
==
CHIP_RS880
))
{
tmp
=
(
CACHE_FIFO_SIZE
(
0xa
)
|
FETCH_FIFO_HIWATER
(
0xa
)
|
DONE_FIFO_HIWATER
(
0xe0
)
|
...
...
@@ -918,7 +920,8 @@ void r600_gpu_init(struct radeon_device *rdev)
NUM_ES_STACK_ENTRIES
(
0
));
}
else
if
(((
rdev
->
family
)
==
CHIP_RV610
)
||
((
rdev
->
family
)
==
CHIP_RV620
)
||
((
rdev
->
family
)
==
CHIP_RS780
))
{
((
rdev
->
family
)
==
CHIP_RS780
)
||
((
rdev
->
family
)
==
CHIP_RS880
))
{
/* no vertex cache */
sq_config
&=
~
VC_ENABLE
;
...
...
@@ -975,7 +978,8 @@ void r600_gpu_init(struct radeon_device *rdev)
if
(((
rdev
->
family
)
==
CHIP_RV610
)
||
((
rdev
->
family
)
==
CHIP_RV620
)
||
((
rdev
->
family
)
==
CHIP_RS780
))
{
((
rdev
->
family
)
==
CHIP_RS780
)
||
((
rdev
->
family
)
==
CHIP_RS880
))
{
WREG32
(
VGT_CACHE_INVALIDATION
,
CACHE_INVALIDATION
(
TC_ONLY
));
}
else
{
WREG32
(
VGT_CACHE_INVALIDATION
,
CACHE_INVALIDATION
(
VC_AND_TC
));
...
...
@@ -1001,8 +1005,9 @@ void r600_gpu_init(struct radeon_device *rdev)
tmp
=
rdev
->
config
.
r600
.
max_pipes
*
16
;
switch
(
rdev
->
family
)
{
case
CHIP_RV610
:
case
CHIP_RS780
:
case
CHIP_RV620
:
case
CHIP_RS780
:
case
CHIP_RS880
:
tmp
+=
32
;
break
;
case
CHIP_RV670
:
...
...
@@ -1043,8 +1048,9 @@ void r600_gpu_init(struct radeon_device *rdev)
switch
(
rdev
->
family
)
{
case
CHIP_RV610
:
case
CHIP_RS780
:
case
CHIP_RV620
:
case
CHIP_RS780
:
case
CHIP_RS880
:
tmp
=
TC_L2_SIZE
(
8
);
break
;
case
CHIP_RV630
:
...
...
drivers/gpu/drm/radeon/r600_blit_kms.c
View file @
6782cc7b
...
...
@@ -368,7 +368,7 @@ set_default_state(struct radeon_device *rdev)
if
((
rdev
->
family
==
CHIP_RV610
)
||
(
rdev
->
family
==
CHIP_RV620
)
||
(
rdev
->
family
==
CHIP_RS780
)
||
(
rdev
->
family
==
CHIP_RS
7
80
)
||
(
rdev
->
family
==
CHIP_RS
8
80
)
||
(
rdev
->
family
==
CHIP_RV710
))
sq_config
=
0
;
else
...
...
drivers/gpu/drm/radeon/radeon_atombios.c
View file @
6782cc7b
...
...
@@ -46,7 +46,8 @@ radeon_add_atom_connector(struct drm_device *dev,
uint32_t
supported_device
,
int
connector_type
,
struct
radeon_i2c_bus_rec
*
i2c_bus
,
bool
linkb
,
uint32_t
igp_lane_info
);
bool
linkb
,
uint32_t
igp_lane_info
,
uint16_t
connector_object_id
);
/* from radeon_legacy_encoder.c */
extern
void
...
...
@@ -193,6 +194,23 @@ const int supported_devices_connector_convert[] = {
DRM_MODE_CONNECTOR_DisplayPort
};
const
uint16_t
supported_devices_connector_object_id_convert
[]
=
{
CONNECTOR_OBJECT_ID_NONE
,
CONNECTOR_OBJECT_ID_VGA
,
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I
,
/* not all boards support DL */
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
,
/* not all boards support DL */
CONNECTOR_OBJECT_ID_VGA
,
/* technically DVI-A */
CONNECTOR_OBJECT_ID_COMPOSITE
,
CONNECTOR_OBJECT_ID_SVIDEO
,
CONNECTOR_OBJECT_ID_LVDS
,
CONNECTOR_OBJECT_ID_9PIN_DIN
,
CONNECTOR_OBJECT_ID_9PIN_DIN
,
CONNECTOR_OBJECT_ID_DISPLAYPORT
,
CONNECTOR_OBJECT_ID_HDMI_TYPE_A
,
CONNECTOR_OBJECT_ID_HDMI_TYPE_B
,
CONNECTOR_OBJECT_ID_SVIDEO
};
const
int
object_connector_convert
[]
=
{
DRM_MODE_CONNECTOR_Unknown
,
DRM_MODE_CONNECTOR_DVII
,
...
...
@@ -229,7 +247,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
ATOM_OBJECT_HEADER
*
obj_header
;
int
i
,
j
,
path_size
,
device_support
;
int
connector_type
;
uint16_t
igp_lane_info
,
conn_id
;
uint16_t
igp_lane_info
,
conn_id
,
connector_object_id
;
bool
linkb
;
struct
radeon_i2c_bus_rec
ddc_bus
;
...
...
@@ -277,7 +295,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
ATOM_DEVICE_CV_SUPPORT
)
continue
;
if
((
rdev
->
family
==
CHIP_RS780
)
&&
/* IGP chips */
if
((
rdev
->
flags
&
RADEON_IS_IGP
)
&&
(
con_obj_id
==
CONNECTOR_OBJECT_ID_PCIE_CONNECTOR
))
{
uint16_t
igp_offset
=
0
;
...
...
@@ -311,6 +330,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
connector_type
=
object_connector_convert
[
ct
];
connector_object_id
=
ct
;
igp_lane_info
=
slot_config
&
0xffff
;
}
else
...
...
@@ -321,6 +341,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
igp_lane_info
=
0
;
connector_type
=
object_connector_convert
[
con_obj_id
];
connector_object_id
=
con_obj_id
;
}
if
(
connector_type
==
DRM_MODE_CONNECTOR_Unknown
)
...
...
@@ -425,7 +446,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
le16_to_cpu
(
path
->
usDeviceTag
),
connector_type
,
&
ddc_bus
,
linkb
,
igp_lane_info
);
linkb
,
igp_lane_info
,
connector_object_id
);
}
}
...
...
@@ -435,6 +457,45 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
return
true
;
}
static
uint16_t
atombios_get_connector_object_id
(
struct
drm_device
*
dev
,
int
connector_type
,
uint16_t
devices
)
{
struct
radeon_device
*
rdev
=
dev
->
dev_private
;
if
(
rdev
->
flags
&
RADEON_IS_IGP
)
{
return
supported_devices_connector_object_id_convert
[
connector_type
];
}
else
if
(((
connector_type
==
DRM_MODE_CONNECTOR_DVII
)
||
(
connector_type
==
DRM_MODE_CONNECTOR_DVID
))
&&
(
devices
&
ATOM_DEVICE_DFP2_SUPPORT
))
{
struct
radeon_mode_info
*
mode_info
=
&
rdev
->
mode_info
;
struct
atom_context
*
ctx
=
mode_info
->
atom_context
;
int
index
=
GetIndexIntoMasterTable
(
DATA
,
XTMDS_Info
);
uint16_t
size
,
data_offset
;
uint8_t
frev
,
crev
;
ATOM_XTMDS_INFO
*
xtmds
;
atom_parse_data_header
(
ctx
,
index
,
&
size
,
&
frev
,
&
crev
,
&
data_offset
);
xtmds
=
(
ATOM_XTMDS_INFO
*
)(
ctx
->
bios
+
data_offset
);
if
(
xtmds
->
ucSupportedLink
&
ATOM_XTMDS_SUPPORTED_DUALLINK
)
{
if
(
connector_type
==
DRM_MODE_CONNECTOR_DVII
)
return
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I
;
else
return
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
;
}
else
{
if
(
connector_type
==
DRM_MODE_CONNECTOR_DVII
)
return
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I
;
else
return
CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D
;
}
}
else
{
return
supported_devices_connector_object_id_convert
[
connector_type
];
}
}
struct
bios_connector
{
bool
valid
;
uint16_t
line_mux
;
...
...
@@ -593,14 +654,20 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct
/* add the connectors */
for
(
i
=
0
;
i
<
ATOM_MAX_SUPPORTED_DEVICE
;
i
++
)
{
if
(
bios_connectors
[
i
].
valid
)
if
(
bios_connectors
[
i
].
valid
)
{
uint16_t
connector_object_id
=
atombios_get_connector_object_id
(
dev
,
bios_connectors
[
i
].
connector_type
,
bios_connectors
[
i
].
devices
);
radeon_add_atom_connector
(
dev
,
bios_connectors
[
i
].
line_mux
,
bios_connectors
[
i
].
devices
,
bios_connectors
[
i
].
connector_type
,
&
bios_connectors
[
i
].
ddc_bus
,
false
,
0
);
false
,
0
,
connector_object_id
);
}
}
radeon_link_encoder_connector
(
dev
);
...
...
drivers/gpu/drm/radeon/radeon_combios.c
View file @
6782cc7b
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/radeon/radeon_connectors.c
View file @
6782cc7b
...
...
@@ -397,6 +397,30 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
static
int
radeon_lvds_mode_valid
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode
)
{
struct
drm_encoder
*
encoder
=
radeon_best_single_encoder
(
connector
);
if
((
mode
->
hdisplay
<
320
)
||
(
mode
->
vdisplay
<
240
))
return
MODE_PANEL
;
if
(
encoder
)
{
struct
radeon_encoder
*
radeon_encoder
=
to_radeon_encoder
(
encoder
);
struct
drm_display_mode
*
native_mode
=
&
radeon_encoder
->
native_mode
;
/* AVIVO hardware supports downscaling modes larger than the panel
* to the panel size, but I'm not sure this is desirable.
*/
if
((
mode
->
hdisplay
>
native_mode
->
hdisplay
)
||
(
mode
->
vdisplay
>
native_mode
->
vdisplay
))
return
MODE_PANEL
;
/* if scaling is disabled, block non-native modes */
if
(
radeon_encoder
->
rmx_type
==
RMX_OFF
)
{
if
((
mode
->
hdisplay
!=
native_mode
->
hdisplay
)
||
(
mode
->
vdisplay
!=
native_mode
->
vdisplay
))
return
MODE_PANEL
;
}
}
return
MODE_OK
;
}
...
...
@@ -512,6 +536,8 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
static
int
radeon_vga_mode_valid
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode
)
{
/* XXX check mode bandwidth */
/* XXX verify against max DAC output frequency */
return
MODE_OK
;
}
...
...
@@ -609,6 +635,8 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
static
int
radeon_tv_mode_valid
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode
)
{
if
((
mode
->
hdisplay
>
1024
)
||
(
mode
->
vdisplay
>
768
))
return
MODE_CLOCK_RANGE
;
return
MODE_OK
;
}
...
...
@@ -801,9 +829,27 @@ static void radeon_dvi_force(struct drm_connector *connector)
radeon_connector
->
use_digital
=
true
;
}
static
int
radeon_dvi_mode_valid
(
struct
drm_connector
*
connector
,
struct
drm_display_mode
*
mode
)
{
struct
radeon_connector
*
radeon_connector
=
to_radeon_connector
(
connector
);
/* XXX check mode bandwidth */
if
(
radeon_connector
->
use_digital
&&
(
mode
->
clock
>
165000
))
{
if
((
radeon_connector
->
connector_object_id
==
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I
)
||
(
radeon_connector
->
connector_object_id
==
CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
)
||
(
radeon_connector
->
connector_object_id
==
CONNECTOR_OBJECT_ID_HDMI_TYPE_B
))
return
MODE_OK
;
else
return
MODE_CLOCK_HIGH
;
}
return
MODE_OK
;
}
struct
drm_connector_helper_funcs
radeon_dvi_connector_helper_funcs
=
{
.
get_modes
=
radeon_dvi_get_modes
,
.
mode_valid
=
radeon_
vga
_mode_valid
,
.
mode_valid
=
radeon_
dvi
_mode_valid
,
.
best_encoder
=
radeon_dvi_encoder
,
};
...
...
@@ -823,7 +869,8 @@ radeon_add_atom_connector(struct drm_device *dev,
int
connector_type
,
struct
radeon_i2c_bus_rec
*
i2c_bus
,
bool
linkb
,
uint32_t
igp_lane_info
)
uint32_t
igp_lane_info
,
uint16_t
connector_object_id
)
{
struct
radeon_device
*
rdev
=
dev
->
dev_private
;
struct
drm_connector
*
connector
;
...
...
@@ -862,6 +909,7 @@ radeon_add_atom_connector(struct drm_device *dev,
radeon_connector
->
connector_id
=
connector_id
;
radeon_connector
->
devices
=
supported_device
;
radeon_connector
->
shared_ddc
=
shared_ddc
;
radeon_connector
->
connector_object_id
=
connector_object_id
;
switch
(
connector_type
)
{
case
DRM_MODE_CONNECTOR_VGA
:
drm_connector_init
(
dev
,
&
radeon_connector
->
base
,
&
radeon_vga_connector_funcs
,
connector_type
);
...
...
@@ -1013,7 +1061,8 @@ radeon_add_legacy_connector(struct drm_device *dev,
uint32_t
connector_id
,
uint32_t
supported_device
,
int
connector_type
,
struct
radeon_i2c_bus_rec
*
i2c_bus
)
struct
radeon_i2c_bus_rec
*
i2c_bus
,
uint16_t
connector_object_id
)
{
struct
radeon_device
*
rdev
=
dev
->
dev_private
;
struct
drm_connector
*
connector
;
...
...
@@ -1042,6 +1091,7 @@ radeon_add_legacy_connector(struct drm_device *dev,
radeon_connector
->
connector_id
=
connector_id
;
radeon_connector
->
devices
=
supported_device
;
radeon_connector
->
connector_object_id
=
connector_object_id
;
switch
(
connector_type
)
{
case
DRM_MODE_CONNECTOR_VGA
:
drm_connector_init
(
dev
,
&
radeon_connector
->
base
,
&
radeon_vga_connector_funcs
,
connector_type
);
...
...
drivers/gpu/drm/radeon/radeon_encoders.c
View file @
6782cc7b
...
...
@@ -722,14 +722,17 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action)
atom_parse_cmd_header
(
rdev
->
mode_info
.
atom_context
,
index
,
&
frev
,
&
crev
);
args
.
v1
.
ucAction
=
action
;
if
(
action
==
ATOM_TRANSMITTER_ACTION_INIT
)
{
args
.
v1
.
usInitInfo
=
radeon_connector
->
connector_object_id
;
}
else
{
if
(
radeon_encoder
->
pixel_clock
>
165000
)
args
.
v1
.
usPixelClock
=
cpu_to_le16
((
radeon_encoder
->
pixel_clock
/
2
)
/
10
);
else
args
.
v1
.
usPixelClock
=
cpu_to_le16
(
radeon_encoder
->
pixel_clock
/
10
);
}
if
(
ASIC_IS_DCE32
(
rdev
))
{
if
(
radeon_encoder
->
pixel_clock
>
165000
)
{
args
.
v2
.
usPixelClock
=
cpu_to_le16
((
radeon_encoder
->
pixel_clock
*
10
*
2
)
/
100
);
args
.
v2
.
acConfig
.
fDualLinkConnector
=
1
;
}
else
{
args
.
v2
.
usPixelClock
=
cpu_to_le16
((
radeon_encoder
->
pixel_clock
*
10
*
4
)
/
100
);
}
if
(
radeon_encoder
->
pixel_clock
>
165000
)
args
.
v2
.
usPixelClock
=
cpu_to_le16
((
radeon_encoder
->
pixel_clock
/
2
)
/
10
);
if
(
dig
->
dig_block
)
args
.
v2
.
acConfig
.
ucEncoderSel
=
1
;
...
...
@@ -754,7 +757,6 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action)
}
}
else
{
args
.
v1
.
ucConfig
=
ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL
;
args
.
v1
.
usPixelClock
=
cpu_to_le16
((
radeon_encoder
->
pixel_clock
)
/
10
);
switch
(
radeon_encoder
->
encoder_id
)
{
case
ENCODER_OBJECT_ID_INTERNAL_UNIPHY
:
...
...
@@ -1137,6 +1139,7 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
/* setup and enable the encoder and transmitter */
atombios_dig_encoder_setup
(
encoder
,
ATOM_ENABLE
);
atombios_dig_transmitter_setup
(
encoder
,
ATOM_TRANSMITTER_ACTION_INIT
);
atombios_dig_transmitter_setup
(
encoder
,
ATOM_TRANSMITTER_ACTION_SETUP
);
atombios_dig_transmitter_setup
(
encoder
,
ATOM_TRANSMITTER_ACTION_ENABLE
);
break
;
...
...
drivers/gpu/drm/radeon/radeon_mode.h
View file @
6782cc7b
...
...
@@ -317,6 +317,7 @@ struct radeon_connector {
struct
edid
*
edid
;
void
*
con_priv
;
bool
dac_load_detect
;
uint16_t
connector_object_id
;
};
struct
radeon_framebuffer
{
...
...
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