intel_extreme: Tweak pll limits on 9xx
This commit is contained in:
@@ -94,7 +94,8 @@ retrieve_current_mode(display_mode& mode, uint32 pllRegister)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pll_limits limits;
|
pll_limits limits;
|
||||||
get_pll_limits(&limits);
|
get_pll_limits(&limits, false);
|
||||||
|
// TODO: Detect LVDS connector vs assume no
|
||||||
|
|
||||||
if (gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_9xx)
|
if (gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_9xx)
|
||||||
|| gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_SER5)
|
|| gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_SER5)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
get_pll_limits(pll_limits* limits)
|
get_pll_limits(pll_limits* limits, bool isLVDS)
|
||||||
{
|
{
|
||||||
// Note, the limits are taken from the X driver; they have not yet been
|
// Note, the limits are taken from the X driver; they have not yet been
|
||||||
// tested
|
// tested
|
||||||
@@ -55,15 +55,20 @@ get_pll_limits(pll_limits* limits)
|
|||||||
};
|
};
|
||||||
memcpy(limits, &kLimits, sizeof(pll_limits));
|
memcpy(limits, &kLimits, sizeof(pll_limits));
|
||||||
} else if (gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_9xx)) {
|
} else if (gInfo->shared_info->device_type.InFamily(INTEL_FAMILY_9xx)) {
|
||||||
// TODO: support LVDS output limits as well
|
|
||||||
// (Update: Output limits are adjusted in the computation (post2=7/14))
|
// (Update: Output limits are adjusted in the computation (post2=7/14))
|
||||||
// Should move them here!
|
// Should move them here!
|
||||||
pll_limits kLimits = {
|
pll_limits kLimits = {
|
||||||
// p, p1, p2, high, n, m, m1, m2
|
// p, p1, p2, high, n, m, m1, m2
|
||||||
{ 5, 1, 10, false, 1, 70, 12, 7}, // min
|
{ 5, 1, 10, false, 1, 70, 8, 3}, // min
|
||||||
{ 80, 8, 5, true, 6, 120, 22, 11}, // max
|
{ 80, 8, 5, true, 6, 120, 18, 7}, // max
|
||||||
200000, 1400000, 2800000
|
200000, 1400000, 2800000
|
||||||
};
|
};
|
||||||
|
if (isLVDS) {
|
||||||
|
kLimits.min.post = 7;
|
||||||
|
kLimits.max.post = 98;
|
||||||
|
kLimits.min.post2 = 14;
|
||||||
|
kLimits.max.post2 = 7;
|
||||||
|
}
|
||||||
memcpy(limits, &kLimits, sizeof(pll_limits));
|
memcpy(limits, &kLimits, sizeof(pll_limits));
|
||||||
} else if (gInfo->shared_info->device_type.InGroup(INTEL_GROUP_G4x)) {
|
} else if (gInfo->shared_info->device_type.InGroup(INTEL_GROUP_G4x)) {
|
||||||
// TODO: support LVDS output limits as well
|
// TODO: support LVDS output limits as well
|
||||||
@@ -133,12 +138,12 @@ compute_pll_divisors(display_mode* current, pll_divisors* divisors,
|
|||||||
float referenceClock
|
float referenceClock
|
||||||
= gInfo->shared_info->pll_info.reference_frequency / 1000.0f;
|
= gInfo->shared_info->pll_info.reference_frequency / 1000.0f;
|
||||||
pll_limits limits;
|
pll_limits limits;
|
||||||
get_pll_limits(&limits);
|
get_pll_limits(&limits, isLVDS);
|
||||||
|
|
||||||
TRACE("%s: required MHz: %g\n", __func__, requestedPixelClock);
|
TRACE("%s: required MHz: %g\n", __func__, requestedPixelClock);
|
||||||
|
|
||||||
if (isLVDS) {
|
if (isLVDS) {
|
||||||
if (requestedPixelClock >= 112.199
|
if (requestedPixelClock > 112.999
|
||||||
|| (read32(INTEL_DIGITAL_LVDS_PORT) & LVDS_CLKB_POWER_MASK)
|
|| (read32(INTEL_DIGITAL_LVDS_PORT) & LVDS_CLKB_POWER_MASK)
|
||||||
== LVDS_CLKB_POWER_UP)
|
== LVDS_CLKB_POWER_UP)
|
||||||
divisors->post2 = LVDS_POST2_RATE_FAST;
|
divisors->post2 = LVDS_POST2_RATE_FAST;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ struct pll_limits {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void get_pll_limits(pll_limits* limits);
|
void get_pll_limits(pll_limits* limits, bool isLVDS);
|
||||||
bool valid_pll_divisors(pll_divisors* divisors, pll_limits* limits);
|
bool valid_pll_divisors(pll_divisors* divisors, pll_limits* limits);
|
||||||
void compute_pll_divisors(display_mode* current, pll_divisors* divisors,
|
void compute_pll_divisors(display_mode* current, pll_divisors* divisors,
|
||||||
bool isLVDS);
|
bool isLVDS);
|
||||||
|
|||||||
Reference in New Issue
Block a user