Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304495
b: refs/heads/master
c: 6f54b09
h: refs/heads/master
i:
  304493: 850303b
  304491: d754340
  304487: 65e529a
  304479: d4256c0
v: v3
  • Loading branch information
Javier M. Mellid authored and Greg Kroah-Hartman committed Apr 30, 2012
1 parent d9c974e commit f9af3d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfdd40361987b5c2bd427f0fcf869b8862d4498d
refs/heads/master: 6f54b0948ad459fa9ffa22335aba2e2a86365b60
41 changes: 21 additions & 20 deletions trunk/drivers/staging/sm7xx/smtcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,26 +736,26 @@ static void smtc_unmap_mmio(struct smtcfb_info *sfb)
*/

static int smtc_map_smem(struct smtcfb_info *sfb,
struct pci_dev *dev, u_long smem_len)
struct pci_dev *pdev, u_long smem_len)
{
if (sfb->fb.var.bits_per_pixel == 32) {
#ifdef __BIG_ENDIAN
sfb->fb.fix.smem_start = pci_resource_start(dev, 0)
sfb->fb.fix.smem_start = pci_resource_start(pdev, 0)
+ 0x800000;
#else
sfb->fb.fix.smem_start = pci_resource_start(dev, 0);
sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
#endif
} else {
sfb->fb.fix.smem_start = pci_resource_start(dev, 0);
sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
}

sfb->fb.fix.smem_len = smem_len;

sfb->fb.screen_base = smtc_VRAMBaseAddress;

if (!sfb->fb.screen_base) {
printk(KERN_ERR "%s: unable to map screen memory\n",
sfb->fb.fix.id);
dev_err(&pdev->dev,
"%s: unable to map screen memory\n", sfb->fb.fix.id);
return -ENOMEM;
}

Expand Down Expand Up @@ -835,8 +835,8 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
int err;
unsigned long pFramebufferPhysical;

printk(KERN_INFO
"Silicon Motion display driver " SMTC_LINUX_FB_VERSION "\n");
dev_info(&pdev->dev,
"Silicon Motion display driver " SMTC_LINUX_FB_VERSION);

err = pci_enable_device(pdev); /* enable SMTC chip */
if (err)
Expand Down Expand Up @@ -895,14 +895,14 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
if (sfb->fb.var.bits_per_pixel == 32) {
smtc_VRAMBaseAddress += 0x800000;
hw.m_pLFB += 0x800000;
printk(KERN_INFO
"\nsmtc_VRAMBaseAddress=%p hw.m_pLFB=%p\n",
smtc_VRAMBaseAddress, hw.m_pLFB);
dev_info(&pdev->dev,
"smtc_VRAMBaseAddress=%p sfb->m_pLFB=%p",
smtc_VRAMBaseAddress, sfb->m_pLFB);
}
#endif
if (!smtc_RegBaseAddress) {
printk(KERN_ERR
"%s: unable to map memory mapped IO\n",
dev_err(&pdev->dev,
"%s: unable to map memory mapped IO!",
sfb->fb.fix.id);
err = -ENOMEM;
goto failed_fb;
Expand Down Expand Up @@ -936,8 +936,8 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
smtc_seqw(0x6b, 0x02);
break;
default:
printk(KERN_ERR
"No valid Silicon Motion display chip was detected!\n");
dev_err(&pdev->dev,
"No valid Silicon Motion display chip was detected!");

goto failed_fb;
}
Expand All @@ -961,15 +961,16 @@ static int __devinit smtcfb_pci_probe(struct pci_dev *pdev,
if (err < 0)
goto failed;

printk(KERN_INFO "Silicon Motion SM%X Rev%X primary display mode"
"%dx%d-%d Init Complete.\n", hw.chipID, hw.chipRevID,
sfb->fb.var.xres, sfb->fb.var.yres,
sfb->fb.var.bits_per_pixel);
dev_info(&pdev->dev,
"Silicon Motion SM%X Rev%X primary display mode"
"%dx%d-%d Init Complete.\n", hw.chipID, hw.chipRevID,
sfb->fb.var.xres, sfb->fb.var.yres,
sfb->fb.var.bits_per_pixel);

return 0;

failed:
printk(KERN_ERR "Silicon Motion, Inc. primary display init fail\n");
dev_err(&pdev->dev, "Silicon Motion, Inc. primary display init fail.");

smtc_unmap_smem(sfb);
smtc_unmap_mmio(sfb);
Expand Down

0 comments on commit f9af3d9

Please sign in to comment.