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
273fad2b
Commit
273fad2b
authored
Oct 28, 2009
by
Dave Airlie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'drm-next' of ../drm-2.6 into drm-next
parents
c182be37
ea1495a6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
24 deletions
+57
-24
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_fb_helper.c
+1
-1
drivers/gpu/drm/radeon/atombios_crtc.c
drivers/gpu/drm/radeon/atombios_crtc.c
+20
-11
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_atombios.c
+10
-0
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/radeon_combios.c
+6
-0
drivers/gpu/drm/radeon/radeon_device.c
drivers/gpu/drm/radeon/radeon_device.c
+17
-12
drivers/gpu/drm/radeon/radeon_mode.h
drivers/gpu/drm/radeon/radeon_mode.h
+1
-0
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs400.c
+2
-0
No files found.
drivers/gpu/drm/drm_fb_helper.c
View file @
273fad2b
...
@@ -707,7 +707,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
...
@@ -707,7 +707,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
if
(
crtc
->
fb
==
fb_helper
->
crtc_info
[
i
].
mode_set
.
fb
)
{
if
(
crtc
->
fb
==
fb_helper
->
crtc_info
[
i
].
mode_set
.
fb
)
{
mutex_lock
(
&
dev
->
mode_config
.
mutex
);
mutex_lock
(
&
dev
->
mode_config
.
mutex
);
ret
=
crtc
->
funcs
->
set_config
(
&
fb_helper
->
crtc_info
->
mode_set
);
ret
=
crtc
->
funcs
->
set_config
(
&
fb_helper
->
crtc_info
[
i
].
mode_set
);
mutex_unlock
(
&
dev
->
mode_config
.
mutex
);
mutex_unlock
(
&
dev
->
mode_config
.
mutex
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/radeon/atombios_crtc.c
View file @
273fad2b
...
@@ -368,14 +368,17 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
...
@@ -368,14 +368,17 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
list_for_each_entry
(
encoder
,
&
dev
->
mode_config
.
encoder_list
,
head
)
{
list_for_each_entry
(
encoder
,
&
dev
->
mode_config
.
encoder_list
,
head
)
{
if
(
encoder
->
crtc
==
crtc
)
{
if
(
encoder
->
crtc
==
crtc
)
{
radeon_encoder
=
to_radeon_encoder
(
encoder
);
radeon_encoder
=
to_radeon_encoder
(
encoder
);
dig
=
radeon_encoder
->
enc_priv
;
/* only enable spread spectrum on LVDS */
/* only enable spread spectrum on LVDS */
if
(
dig
&&
dig
->
ss
)
{
if
(
radeon_encoder
->
devices
&
(
ATOM_DEVICE_LCD_SUPPORT
))
{
percentage
=
dig
->
ss
->
percentage
;
dig
=
radeon_encoder
->
enc_priv
;
type
=
dig
->
ss
->
type
;
if
(
dig
&&
dig
->
ss
)
{
step
=
dig
->
ss
->
step
;
percentage
=
dig
->
ss
->
percentage
;
delay
=
dig
->
ss
->
delay
;
type
=
dig
->
ss
->
type
;
range
=
dig
->
ss
->
range
;
step
=
dig
->
ss
->
step
;
delay
=
dig
->
ss
->
delay
;
range
=
dig
->
ss
->
range
;
}
else
if
(
enable
)
return
;
}
else
if
(
enable
)
}
else
if
(
enable
)
return
;
return
;
break
;
break
;
...
@@ -387,7 +390,7 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
...
@@ -387,7 +390,7 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
if
(
ASIC_IS_AVIVO
(
rdev
))
{
if
(
ASIC_IS_AVIVO
(
rdev
))
{
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
args
.
usSpreadSpectrumPercentage
=
percentage
;
args
.
usSpreadSpectrumPercentage
=
cpu_to_le16
(
percentage
)
;
args
.
ucSpreadSpectrumType
=
type
;
args
.
ucSpreadSpectrumType
=
type
;
args
.
ucSpreadSpectrumStep
=
step
;
args
.
ucSpreadSpectrumStep
=
step
;
args
.
ucSpreadSpectrumDelay
=
delay
;
args
.
ucSpreadSpectrumDelay
=
delay
;
...
@@ -397,7 +400,7 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
...
@@ -397,7 +400,7 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable)
atom_execute_table
(
rdev
->
mode_info
.
atom_context
,
index
,
(
uint32_t
*
)
&
args
);
atom_execute_table
(
rdev
->
mode_info
.
atom_context
,
index
,
(
uint32_t
*
)
&
args
);
}
else
{
}
else
{
memset
(
&
legacy_args
,
0
,
sizeof
(
legacy_args
));
memset
(
&
legacy_args
,
0
,
sizeof
(
legacy_args
));
legacy_args
.
usSpreadSpectrumPercentage
=
percentage
;
legacy_args
.
usSpreadSpectrumPercentage
=
cpu_to_le16
(
percentage
)
;
legacy_args
.
ucSpreadSpectrumType
=
type
;
legacy_args
.
ucSpreadSpectrumType
=
type
;
legacy_args
.
ucSpreadSpectrumStepSize_Delay
=
(
step
&
3
)
<<
2
;
legacy_args
.
ucSpreadSpectrumStepSize_Delay
=
(
step
&
3
)
<<
2
;
legacy_args
.
ucSpreadSpectrumStepSize_Delay
|=
(
delay
&
7
)
<<
4
;
legacy_args
.
ucSpreadSpectrumStepSize_Delay
|=
(
delay
&
7
)
<<
4
;
...
@@ -483,8 +486,14 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
...
@@ -483,8 +486,14 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
atom_execute_table
(
rdev
->
mode_info
.
atom_context
,
atom_execute_table
(
rdev
->
mode_info
.
atom_context
,
index
,
(
uint32_t
*
)
&
adjust_pll_args
);
index
,
(
uint32_t
*
)
&
adjust_pll_args
);
adjusted_clock
=
le16_to_cpu
(
adjust_pll_args
.
usPixelClock
)
*
10
;
adjusted_clock
=
le16_to_cpu
(
adjust_pll_args
.
usPixelClock
)
*
10
;
}
else
}
else
{
adjusted_clock
=
mode
->
clock
;
/* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */
if
(
ASIC_IS_AVIVO
(
rdev
)
&&
(
radeon_encoder
->
encoder_id
==
ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1
))
adjusted_clock
=
mode
->
clock
*
2
;
else
adjusted_clock
=
mode
->
clock
;
}
if
(
radeon_crtc
->
crtc_id
==
0
)
if
(
radeon_crtc
->
crtc_id
==
0
)
pll
=
&
rdev
->
clock
.
p1pll
;
pll
=
&
rdev
->
clock
.
p1pll
;
...
...
drivers/gpu/drm/radeon/radeon_atombios.c
View file @
273fad2b
...
@@ -655,6 +655,16 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
...
@@ -655,6 +655,16 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
p1pll
->
pll_out_min
=
64800
;
p1pll
->
pll_out_min
=
64800
;
else
else
p1pll
->
pll_out_min
=
20000
;
p1pll
->
pll_out_min
=
20000
;
}
else
if
(
p1pll
->
pll_out_min
>
64800
)
{
/* Limiting the pll output range is a good thing generally as
* it limits the number of possible pll combinations for a given
* frequency presumably to the ones that work best on each card.
* However, certain duallink DVI monitors seem to like
* pll combinations that would be limited by this at least on
* pre-DCE 3.0 r6xx hardware. This might need to be adjusted per
* family.
*/
p1pll
->
pll_out_min
=
64800
;
}
}
p1pll
->
pll_in_min
=
p1pll
->
pll_in_min
=
...
...
drivers/gpu/drm/radeon/radeon_combios.c
View file @
273fad2b
...
@@ -1587,6 +1587,12 @@ static bool radeon_apply_legacy_tv_quirks(struct drm_device *dev)
...
@@ -1587,6 +1587,12 @@ static bool radeon_apply_legacy_tv_quirks(struct drm_device *dev)
dev
->
pdev
->
subsystem_device
==
0x009f
)
dev
->
pdev
->
subsystem_device
==
0x009f
)
return
false
;
return
false
;
/* HP dc5750 has non-existent TV port */
if
(
dev
->
pdev
->
device
==
0x5974
&&
dev
->
pdev
->
subsystem_vendor
==
0x103c
&&
dev
->
pdev
->
subsystem_device
==
0x280a
)
return
false
;
return
true
;
return
true
;
}
}
...
...
drivers/gpu/drm/radeon/radeon_device.c
View file @
273fad2b
...
@@ -443,20 +443,24 @@ static uint32_t cail_reg_read(struct card_info *info, uint32_t reg)
...
@@ -443,20 +443,24 @@ static uint32_t cail_reg_read(struct card_info *info, uint32_t reg)
return
r
;
return
r
;
}
}
static
struct
card_info
atom_card_info
=
{
.
dev
=
NULL
,
.
reg_read
=
cail_reg_read
,
.
reg_write
=
cail_reg_write
,
.
mc_read
=
cail_mc_read
,
.
mc_write
=
cail_mc_write
,
.
pll_read
=
cail_pll_read
,
.
pll_write
=
cail_pll_write
,
};
int
radeon_atombios_init
(
struct
radeon_device
*
rdev
)
int
radeon_atombios_init
(
struct
radeon_device
*
rdev
)
{
{
atom_card_info
.
dev
=
rdev
->
ddev
;
struct
card_info
*
atom_card_info
=
rdev
->
mode_info
.
atom_context
=
atom_parse
(
&
atom_card_info
,
rdev
->
bios
);
kzalloc
(
sizeof
(
struct
card_info
),
GFP_KERNEL
);
if
(
!
atom_card_info
)
return
-
ENOMEM
;
rdev
->
mode_info
.
atom_card_info
=
atom_card_info
;
atom_card_info
->
dev
=
rdev
->
ddev
;
atom_card_info
->
reg_read
=
cail_reg_read
;
atom_card_info
->
reg_write
=
cail_reg_write
;
atom_card_info
->
mc_read
=
cail_mc_read
;
atom_card_info
->
mc_write
=
cail_mc_write
;
atom_card_info
->
pll_read
=
cail_pll_read
;
atom_card_info
->
pll_write
=
cail_pll_write
;
rdev
->
mode_info
.
atom_context
=
atom_parse
(
atom_card_info
,
rdev
->
bios
);
radeon_atom_initialize_bios_scratch_regs
(
rdev
->
ddev
);
radeon_atom_initialize_bios_scratch_regs
(
rdev
->
ddev
);
return
0
;
return
0
;
}
}
...
@@ -464,6 +468,7 @@ int radeon_atombios_init(struct radeon_device *rdev)
...
@@ -464,6 +468,7 @@ int radeon_atombios_init(struct radeon_device *rdev)
void
radeon_atombios_fini
(
struct
radeon_device
*
rdev
)
void
radeon_atombios_fini
(
struct
radeon_device
*
rdev
)
{
{
kfree
(
rdev
->
mode_info
.
atom_context
);
kfree
(
rdev
->
mode_info
.
atom_context
);
kfree
(
rdev
->
mode_info
.
atom_card_info
);
}
}
int
radeon_combios_init
(
struct
radeon_device
*
rdev
)
int
radeon_combios_init
(
struct
radeon_device
*
rdev
)
...
...
drivers/gpu/drm/radeon/radeon_mode.h
View file @
273fad2b
...
@@ -172,6 +172,7 @@ enum radeon_connector_table {
...
@@ -172,6 +172,7 @@ enum radeon_connector_table {
struct
radeon_mode_info
{
struct
radeon_mode_info
{
struct
atom_context
*
atom_context
;
struct
atom_context
*
atom_context
;
struct
card_info
*
atom_card_info
;
enum
radeon_connector_table
connector_table
;
enum
radeon_connector_table
connector_table
;
bool
mode_config_initialized
;
bool
mode_config_initialized
;
struct
radeon_crtc
*
crtcs
[
2
];
struct
radeon_crtc
*
crtcs
[
2
];
...
...
drivers/gpu/drm/radeon/rs400.c
View file @
273fad2b
...
@@ -418,6 +418,8 @@ int rs400_resume(struct radeon_device *rdev)
...
@@ -418,6 +418,8 @@ int rs400_resume(struct radeon_device *rdev)
rs400_gart_disable
(
rdev
);
rs400_gart_disable
(
rdev
);
/* Resume clock before doing reset */
/* Resume clock before doing reset */
r300_clock_startup
(
rdev
);
r300_clock_startup
(
rdev
);
/* setup MC before calling post tables */
rs400_mc_program
(
rdev
);
/* Reset gpu before posting otherwise ATOM will enter infinite loop */
/* Reset gpu before posting otherwise ATOM will enter infinite loop */
if
(
radeon_gpu_reset
(
rdev
))
{
if
(
radeon_gpu_reset
(
rdev
))
{
dev_warn
(
rdev
->
dev
,
"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)
\n
"
,
dev_warn
(
rdev
->
dev
,
"GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)
\n
"
,
...
...
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