diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/video/aty | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 8 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 1 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 5 | ||||
-rw-r--r-- | drivers/video/aty/radeon_pm.c | 22 | ||||
-rw-r--r-- | drivers/video/aty/radeonfb.h | 1 |
5 files changed, 22 insertions, 15 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 12ca031..a4dfe8c 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -413,6 +413,7 @@ struct aty128fb_par { int blitter_may_be_busy; int fifo_slots; /* free slots in FIFO (64 max) */ + int pm_reg; int crt_on, lcd_on; struct pci_dev *pdev; struct fb_info *next; @@ -2015,6 +2016,7 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) aty128_init_engine(par); + par->pm_reg = pdev->pm_cap; par->pdev = pdev; par->asleep = 0; par->lock_blank = 0; @@ -2027,8 +2029,8 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) if (register_framebuffer(info) < 0) return 0; - fb_info(info, "%s frame buffer device on %s\n", - info->fix.id, video_card); + printk(KERN_INFO "fb%d: %s frame buffer device on %s\n", + info->node, info->fix.id, video_card); return 1; /* success! */ } @@ -2395,7 +2397,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend) u32 pmgt; struct pci_dev *pdev = par->pdev; - if (!par->pdev->pm_cap) + if (!par->pm_reg) return; /* Set the chip into the appropriate suspend mode (we use D2, diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 28fafbf..9b0f12c 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -1848,6 +1848,7 @@ static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) return aty_waitforvblank(par, crtc); } + break; #if defined(DEBUG) && defined(CONFIG_FB_ATY_CT) case ATYIO_CLKR: diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 26d80a4..1e30b2b 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c @@ -819,6 +819,11 @@ static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *in if (v.xres_virtual < v.xres) v.xres = v.xres_virtual; + if (v.xoffset < 0) + v.xoffset = 0; + if (v.yoffset < 0) + v.yoffset = 0; + if (v.xoffset > v.xres_virtual - v.xres) v.xoffset = v.xres_virtual - v.xres - 1; diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 46a12f1..f7091ec 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c @@ -1427,8 +1427,6 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) mdelay( 15); } -#if defined(CONFIG_PM) -#if defined(CONFIG_X86) || defined(CONFIG_PPC_PMAC) static void radeon_pm_reset_pad_ctlr_strength(struct radeonfb_info *rinfo) { u32 tmp, tmp2; @@ -1941,10 +1939,9 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo) */ radeon_pm_m10_enable_lvds_spread_spectrum(rinfo); } -#endif #ifdef CONFIG_PPC_OF -#ifdef CONFIG_PPC_PMAC + static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo) { OUTREG(MC_CNTL, rinfo->save_regs[46]); @@ -2205,8 +2202,6 @@ static void radeon_reinitialize_M9P(struct radeonfb_info *rinfo) radeon_pm_restore_pixel_pll(rinfo); radeon_pm_m10_enable_lvds_spread_spectrum(rinfo); } -#endif -#endif #if 0 /* Not ready yet */ static void radeon_reinitialize_QW(struct radeonfb_info *rinfo) @@ -2520,13 +2515,13 @@ static void radeonfb_whack_power_state(struct radeonfb_info *rinfo, pci_power_t for (;;) { pci_read_config_word(rinfo->pdev, - rinfo->pdev->pm_cap + PCI_PM_CTRL, + rinfo->pm_reg+PCI_PM_CTRL, &pwr_cmd); - if (pwr_cmd & state) + if (pwr_cmd & 2) break; - pwr_cmd = (pwr_cmd & ~PCI_PM_CTRL_STATE_MASK) | state; + pwr_cmd = (pwr_cmd & ~PCI_PM_CTRL_STATE_MASK) | 2; pci_write_config_word(rinfo->pdev, - rinfo->pdev->pm_cap + PCI_PM_CTRL, + rinfo->pm_reg+PCI_PM_CTRL, pwr_cmd); msleep(500); } @@ -2537,7 +2532,7 @@ static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend) { u32 tmp; - if (!rinfo->pdev->pm_cap) + if (!rinfo->pm_reg) return; /* Set the chip into appropriate suspend mode (we use D2, @@ -2809,6 +2804,9 @@ static void radeonfb_early_resume(void *data) void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlist, int force_sleep) { + /* Find PM registers in config space if any*/ + rinfo->pm_reg = rinfo->pdev->pm_cap; + /* Enable/Disable dynamic clocks: TODO add sysfs access */ if (rinfo->family == CHIP_FAMILY_RS480) rinfo->dynclk = -1; @@ -2832,7 +2830,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis * reason. --BenH */ if (machine_is(powermac) && rinfo->of_node) { - if (rinfo->is_mobility && rinfo->pdev->pm_cap && + if (rinfo->is_mobility && rinfo->pm_reg && rinfo->family <= CHIP_FAMILY_RV250) rinfo->pm_mode |= radeon_pm_d2; diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index cb84604..7351e66 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h @@ -342,6 +342,7 @@ struct radeonfb_info { int mtrr_hdl; + int pm_reg; u32 save_regs[100]; int asleep; int lock_blank; |