forked from luck/tmp_suning_uos_patched
intelfb: fixup whitespace..
repeat after me, I must not take code from X without reformatting... Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
parent
8bb91f6a2d
commit
8b91b0b4f2
@ -1467,7 +1467,7 @@ static int
|
||||
intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
|
||||
{
|
||||
struct intelfb_info *dinfo = GET_DINFO(info);
|
||||
int ret;
|
||||
u32 physical;
|
||||
#if VERBOSE > 0
|
||||
DBG_MSG("intelfb_cursor\n");
|
||||
#endif
|
||||
@ -1478,12 +1478,10 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
|
||||
intelfbhw_cursor_hide(dinfo);
|
||||
|
||||
/* If XFree killed the cursor - restore it */
|
||||
if (dinfo->mobile || IS_I9xx(dinfo))
|
||||
ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.physical);
|
||||
else
|
||||
ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12);
|
||||
physical = (dinfo->mobile || IS_I9xx(dinfo)) ? dinfo->cursor.physical :
|
||||
(dinfo->cursor.offset << 12);
|
||||
|
||||
if (ret) {
|
||||
if (INREG(CURSOR_A_BASEADDR) != physical) {
|
||||
u32 fg, bg;
|
||||
|
||||
DBG_MSG("the cursor was killed - restore it !!\n");
|
||||
|
@ -759,13 +759,10 @@ splitm(int index, unsigned int m, unsigned int *retm1, unsigned int *retm2)
|
||||
int m1, m2;
|
||||
int testm;
|
||||
/* no point optimising too much - brute force m */
|
||||
for (m1 = plls[index].min_m1; m1 < plls[index].max_m1+1; m1++)
|
||||
{
|
||||
for (m2 = plls[index].min_m2; m2 < plls[index].max_m2+1; m2++)
|
||||
{
|
||||
for (m1 = plls[index].min_m1; m1 < plls[index].max_m1+1; m1++) {
|
||||
for (m2 = plls[index].min_m2; m2 < plls[index].max_m2+1; m2++) {
|
||||
testm = ( 5 * ( m1 + 2 )) + (m2 + 2);
|
||||
if (testm == m)
|
||||
{
|
||||
if (testm == m) {
|
||||
*retm1 = (unsigned int)m1;
|
||||
*retm2 = (unsigned int)m2;
|
||||
return 0;
|
||||
@ -781,8 +778,7 @@ splitp(int index, unsigned int p, unsigned int *retp1, unsigned int *retp2)
|
||||
{
|
||||
int p1, p2;
|
||||
|
||||
if (index == PLLS_I9xx)
|
||||
{
|
||||
if (index == PLLS_I9xx) {
|
||||
switch (p) {
|
||||
case 10:
|
||||
p1 = 2;
|
||||
@ -803,8 +799,7 @@ splitp(int index, unsigned int p, unsigned int *retp1, unsigned int *retp2)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (index == PLLS_I8xx)
|
||||
{
|
||||
if (index == PLLS_I8xx) {
|
||||
if (p % 4 == 0)
|
||||
p2 = 1;
|
||||
else
|
||||
@ -814,7 +809,9 @@ splitp(int index, unsigned int p, unsigned int *retp1, unsigned int *retp2)
|
||||
p2 = 0;
|
||||
p1 = (p / (1 << (p2 + 1))) - 2;
|
||||
}
|
||||
if (p1 < plls[index].min_p1 || p1 > plls[index].max_p1 || (p1 + 2) * (1 << (p2 + 1)) != p) {
|
||||
if (p1 < plls[index].min_p1 ||
|
||||
p1 > plls[index].max_p1 ||
|
||||
(p1 + 2) * (1 << (p2 + 1)) != p) {
|
||||
return 1;
|
||||
} else {
|
||||
*retp1 = (unsigned int)p1;
|
||||
@ -858,8 +855,7 @@ calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, u32 *retn, u32 *re
|
||||
if (p_max > plls[index].max_p)
|
||||
p_max = plls[index].max_p;
|
||||
|
||||
if (clock < PLL_REFCLK && index==PLLS_I9xx)
|
||||
{
|
||||
if (clock < PLL_REFCLK && index == PLLS_I9xx) {
|
||||
p_min = 10;
|
||||
p_max = 20;
|
||||
/* this makes 640x480 work it really shouldn't
|
||||
@ -1030,7 +1026,8 @@ intelfbhw_mode_to_hw(struct intelfb_info *dinfo, struct intelfb_hwstate *hw,
|
||||
/* Desired clock in kHz */
|
||||
clock_target = 1000000000 / var->pixclock;
|
||||
|
||||
if (calc_pll_params(dinfo->pll_index, clock_target, &m1, &m2, &n, &p1, &p2, &clock)) {
|
||||
if (calc_pll_params(dinfo->pll_index, clock_target, &m1, &m2,
|
||||
&n, &p1, &p2, &clock)) {
|
||||
WRN_MSG("calc_pll_params failed\n");
|
||||
return 1;
|
||||
}
|
||||
@ -1269,8 +1266,7 @@ intelfbhw_program_mode(struct intelfb_info *dinfo,
|
||||
break;
|
||||
count++;
|
||||
udelay(1);
|
||||
if (count % 200 == 0)
|
||||
{
|
||||
if (count % 200 == 0) {
|
||||
tmp = INREG(pipe_conf_reg);
|
||||
tmp &= ~PIPECONF_ENABLE;
|
||||
OUTREG(pipe_conf_reg, tmp);
|
||||
|
Loading…
Reference in New Issue
Block a user