]> Git Repo - linux.git/commitdiff
Merge branches 'common/fbdev' and 'common/fbdev-meram' of master.kernel.org:/pub...
authorPaul Mundt <[email protected]>
Tue, 24 May 2011 06:49:57 +0000 (15:49 +0900)
committerPaul Mundt <[email protected]>
Tue, 24 May 2011 06:49:57 +0000 (15:49 +0900)
1  2  3 
drivers/video/Kconfig
drivers/video/sh_mobile_lcdcfb.c

diff --combined drivers/video/Kconfig
index 1d0aa5eb10b9bf0009aba9aefc67e90475fc7e3f,f9916ca5ca4d44a7fcac405f8329678526445164,a0282b133bcc27b53ecdb2d4723fb85aa1571396..e37f1134f4e21401dd206100d0fedba15e58b521
@@@@ -8,6 -8,6 -8,9 +8,6 @@@@ menu "Graphics support
   config HAVE_FB_ATMEL
        bool
   
  -config HAVE_FB_IMX
  -     bool
  -
   config SH_MIPI_DSI
        tristate
        depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
@@@@ -356,7 -356,7 -359,7 +356,7 @@@@ config FB_SA110
   
   config FB_IMX
        tristate "Freescale i.MX LCD support"
  -     depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2)
  +     depends on FB && IMX_HAVE_PLATFORM_IMX_FB
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
@@@@ -1460,14 -1460,6 -1463,6 +1460,14 @@@@ config FB_S
        ---help---
          Driver for graphics boards with S3 Trio / S3 Virge chip.
   
 ++config FB_S3_DDC
 ++     bool "DDC for S3 support"
 ++     depends on FB_S3
 ++     select FB_DDC
 ++     default y
 ++     help
 ++       Say Y here if you want DDC support for your S3 graphics card.
 ++
   config FB_SAVAGE
        tristate "S3 Savage support"
        depends on FB && PCI && EXPERIMENTAL
@@@@ -1991,6 -1983,6 -1986,18 +1991,18 @@@@ config FB_SH_MOBILE_HDM
        ---help---
          Driver for the on-chip SH-Mobile HDMI controller.
   
++ config FB_SH_MOBILE_MERAM
++      tristate "SuperH Mobile MERAM read ahead support for LCDC"
++      depends on FB_SH_MOBILE_LCDC
++      default y
++      ---help---
++        Enable MERAM support for the SH-Mobile LCD controller.
++ 
++        This will allow for caching of the framebuffer to provide more
++        reliable access under heavy main memory bus traffic situations.
++        Up to 4 memory channels can be configured, allowing 4 RGB or
++        2 YCbCr framebuffers to be configured.
++ 
   config FB_TMIO
        tristate "Toshiba Mobile IO FrameBuffer support"
        depends on FB && MFD_CORE
index 9bcc61b4ef149a258e6159a9728ffebac2bd5daf,04f22609315804b52da60cee267c02f56cbdff9b,1c652da348eac950ee0c09f81c71c62673dcef72..aa4fe993b6da64946224e4c0b8082d53c4d43096
   #include <asm/atomic.h>
   
   #include "sh_mobile_lcdcfb.h"
++ #include "sh_mobile_meram.h"
   
   #define SIDE_B_OFFSET 0x1000
   #define MIRROR_OFFSET 0x2000
@@@@ -143,6 -143,6 -144,7 +144,7 @@@@ struct sh_mobile_lcdc_priv 
        unsigned long saved_shared_regs[NR_SHARED_REGS];
        int started;
        int forced_bpp; /* 2 channel LCDC must share bpp setting */
++      struct sh_mobile_meram_info *meram_dev;
   };
   
   static bool banked(int reg_nr)
@@@@ -469,7 -469,6 -471,7 +471,6 @@@@ static int sh_mobile_lcdc_start(struct 
        int bpp = 0;
        unsigned long ldddsr;
        int k, m;
- -     int ret = 0;
   
        /* enable clocks before accessing the hardware */
        for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
                lcdc_write_chan(ch, LDPMR, 0);
   
                board_cfg = &ch->cfg.board_cfg;
- -             if (board_cfg->setup_sys)
- -                     ret = board_cfg->setup_sys(board_cfg->board_data, ch,
- -                                                &sh_mobile_lcdc_sys_bus_ops);
- -             if (ret)
- -                     return ret;
+ +             if (board_cfg->setup_sys) {
+ +                     int ret = board_cfg->setup_sys(board_cfg->board_data,
+ +                                             ch, &sh_mobile_lcdc_sys_bus_ops);
+ +                     if (ret)
+ +                             return ret;
+ +             }
        }
   
        /* word and long word swap */
        }
   
        for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
++              unsigned long base_addr_y;
++              unsigned long base_addr_c = 0;
++              int pitch;
                ch = &priv->ch[k];
   
                if (!priv->ch[k].enabled)
                }
                lcdc_write_chan(ch, LDDFR, tmp);
   
++              base_addr_y = ch->info->fix.smem_start;
++              base_addr_c = base_addr_y +
++                              ch->info->var.xres *
++                              ch->info->var.yres_virtual;
++              pitch = ch->info->fix.line_length;
++ 
++              /* test if we can enable meram */
++              if (ch->cfg.meram_cfg && priv->meram_dev) {
++                      struct sh_mobile_meram_cfg *cfg;
++                      struct sh_mobile_meram_info *mdev;
++                      unsigned long icb_addr_y, icb_addr_c;
++                      int icb_pitch;
++                      int pf;
++ 
++                      cfg = ch->cfg.meram_cfg;
++                      mdev = priv->meram_dev;
++                      /* we need to de-init configured ICBs before we
++                       * we can re-initialize them.
++                       */
++                      if (ch->meram_enabled)
++                              mdev->ops->meram_unregister(mdev, cfg);
++ 
++                      ch->meram_enabled = 0;
++ 
++                      if (ch->info->var.nonstd) {
++                              if (ch->info->var.bits_per_pixel == 24)
++                                      pf = SH_MOBILE_MERAM_PF_NV24;
++                              else
++                                      pf = SH_MOBILE_MERAM_PF_NV;
++                      } else {
++                              pf = SH_MOBILE_MERAM_PF_RGB;
++                      }
++ 
++                      ret = mdev->ops->meram_register(mdev, cfg, pitch,
++                                              ch->info->var.yres,
++                                              pf,
++                                              base_addr_y,
++                                              base_addr_c,
++                                              &icb_addr_y,
++                                              &icb_addr_c,
++                                              &icb_pitch);
++                      if (!ret)  {
++                              /* set LDSA1R value */
++                              base_addr_y = icb_addr_y;
++                              pitch = icb_pitch;
++ 
++                              /* set LDSA2R value if required */
++                              if (base_addr_c)
++                                      base_addr_c = icb_addr_c;
++ 
++                              ch->meram_enabled = 1;
++                      }
++              }
++ 
                /* point out our frame buffer */
--              lcdc_write_chan(ch, LDSA1R, ch->info->fix.smem_start);
++              lcdc_write_chan(ch, LDSA1R, base_addr_y);
                if (ch->info->var.nonstd)
--                      lcdc_write_chan(ch, LDSA2R,
--                              ch->info->fix.smem_start +
--                              ch->info->var.xres *
--                              ch->info->var.yres_virtual);
++                      lcdc_write_chan(ch, LDSA2R, base_addr_c);
   
                /* set line size */
--              lcdc_write_chan(ch, LDMLSR, ch->info->fix.line_length);
++              lcdc_write_chan(ch, LDMLSR, pitch);
   
                /* setup deferred io if SYS bus */
                tmp = ch->cfg.sys_bus_cfg.deferred_io_msec;
@@@@ -692,6 -692,6 -748,17 +748,17 @@@@ static void sh_mobile_lcdc_stop(struct 
                        board_cfg->display_off(board_cfg->board_data);
                        module_put(board_cfg->owner);
                }
++ 
++              /* disable the meram */
++              if (ch->meram_enabled) {
++                      struct sh_mobile_meram_cfg *cfg;
++                      struct sh_mobile_meram_info *mdev;
++                      cfg = ch->cfg.meram_cfg;
++                      mdev = priv->meram_dev;
++                      mdev->ops->meram_unregister(mdev, cfg);
++                      ch->meram_enabled = 0;
++              }
++ 
        }
   
        /* stop the lcdc */
@@@@ -875,9 -875,9 -942,29 +942,29 @@@@ static int sh_mobile_fb_pan_display(str
        } else
                base_addr_c = 0;
   
--      lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
--      if (base_addr_c)
--              lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);
++      if (!ch->meram_enabled) {
++              lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
++              if (base_addr_c)
++                      lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);
++      } else {
++              struct sh_mobile_meram_cfg *cfg;
++              struct sh_mobile_meram_info *mdev;
++              unsigned long icb_addr_y, icb_addr_c;
++              int ret;
++ 
++              cfg = ch->cfg.meram_cfg;
++              mdev = priv->meram_dev;
++              ret = mdev->ops->meram_update(mdev, cfg,
++                                      base_addr_y, base_addr_c,
++                                      &icb_addr_y, &icb_addr_c);
++              if (ret)
++                      return ret;
++ 
++              lcdc_write_chan_mirror(ch, LDSA1R, icb_addr_y);
++              if (icb_addr_c)
++                      lcdc_write_chan_mirror(ch, LDSA2R, icb_addr_c);
++ 
++      }
   
        if (lcdc_chan_is_sublcd(ch))
                lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS);
@@@@ -1288,7 -1288,6 -1375,7 +1375,6 @@@@ static int sh_mobile_lcdc_notify(struc
        struct fb_info *info = event->info;
        struct sh_mobile_lcdc_chan *ch = info->par;
        struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg;
- -     int ret;
   
        if (&ch->lcdc->notifier != nb)
                return NOTIFY_DONE;
                        board_cfg->display_off(board_cfg->board_data);
                        module_put(board_cfg->owner);
                }
- -             pm_runtime_put(info->device);
                sh_mobile_lcdc_stop(ch->lcdc);
                break;
        case FB_EVENT_RESUME:
                        module_put(board_cfg->owner);
                }
   
- -             ret = sh_mobile_lcdc_start(ch->lcdc);
- -             if (!ret)
- -                     pm_runtime_get_sync(info->device);
+ +             sh_mobile_lcdc_start(ch->lcdc);
        }
   
        return NOTIFY_OK;
@@@@ -1420,6 -1416,6 -1507,8 +1503,8 @@@@ static int __devinit sh_mobile_lcdc_pro
                goto err1;
        }
   
++      priv->meram_dev = pdata->meram_dev;
++ 
        for (i = 0; i < j; i++) {
                struct fb_var_screeninfo *var;
                const struct fb_videomode *lcd_cfg, *max_cfg = NULL;
This page took 0.081724 seconds and 4 git commands to generate.