1. 29 6月, 2012 6 次提交
    • C
      OMAPDSS: Add LCD3 overlay manager and Clock and IRQ support · e86d456a
      Chandrabhanu Mahapatra 提交于
      The support for LCD3 manager has been added into the manager module. LCD3 panel
      has registers as DISPC_CONTROL3 and DISPC_CONFIG3 just like those in LCD and
      LCD2 panels. These registers control the Display Controller (DISPC) module for
      LCD3 output. The three LCDs support Display Serial Interface (DSI), Remote Frame
      Buffer Interface (RFBI) and Parallel CMOS Output Interface (DPI). These LCDs can
      be connected through parallel output interface using DISPC and RFBI or DPI. For
      serial interface DSS uses DSI.
      
      The LCD3 panel, just like LCD and LCD2 panels, has a clock switch in DSS_CTRL
      register which has been enabled. The clock switch chooses between DSS_CLK and
      DPLL_DSI1_C_CLK1 as source for LCD3_CLK. New IRQs as DISPC_IRQ_VSYNC3,
      DISPC_IRQ_FRAMEDONE3, DISPC_IRQ_ACBIAS_COUNT_STAT3 and DISPC_IRQ_SYNC_LOST3 have
      been added specific to the new manager.
      Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      e86d456a
    • C
      OMAPDSS: Add support for LCD3 channel · ff6331e2
      Chandrabhanu Mahapatra 提交于
      OMAP5 Display Subsystem (DSS) architecture comes with a additional LCD3 channel
      with its own dedicated overlay manager. The current patch adds LCD3 channel and
      basic register support for LCD3 channel. It adds register addresses for various
      Display Controller (DISPC) registers like DISPC_DEFAULT_COLOR, DISPC_TIMING_H,
      DISPC_DIVISORo, etc.
      Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ff6331e2
    • C
      OMAPDSS: Cleanup implementation of LCD channels · efa70b3b
      Chandrabhanu Mahapatra 提交于
      The current implementation of LCD channels and managers consists of a number of
      if-else construct which has been replaced by a simpler interface. A constant
      structure mgr_desc has been created in Display Controller (DISPC) module. The
      mgr_desc contains for each channel its name, irqs and  is initialized one time
      with all registers and their corresponding fields to be written to enable
      various features of Display Subsystem. This structure is later used by various
      functions of DISPC which simplifies the further implementation of LCD channels
      and its corresponding managers.
      Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      efa70b3b
    • T
      OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n · 5be3aebd
      Tomi Valkeinen 提交于
      If runtime PM is not enabled in the kernel config, pm_runtime_get_sync()
      will always return 1 and pm_runtime_put_sync() will always return
      -ENOSYS. pm_runtime_get_sync() returning 1 presents no problem to the
      driver, but -ENOSYS from pm_runtime_put_sync() causes the driver to
      print a warning.
      
      One option would be to ignore errors returned by pm_runtime_put_sync()
      totally, as they only say that the call was unable to put the hardware
      into suspend mode.
      
      However, I chose to ignore the returned -ENOSYS explicitly, and print a
      warning for other errors, as I think we should get notified if the HW
      failed to go to suspend properly.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Jassi Brar <jaswinder.singh@linaro.org>
      Cc: Grazvydas Ignotas <notasas@gmail.com>
      5be3aebd
    • T
      OMAPDSS: Use PM notifiers for system suspend · 2b8501d7
      Tomi Valkeinen 提交于
      The current way how omapdss handles system suspend and resume is that
      omapdss device (a platform device, which is not part of the device
      hierarchy of the DSS HW devices, like DISPC and DSI, or panels.) uses
      the suspend and resume callbacks from platform_driver to handle system
      suspend. It does this by disabling all enabled panels on suspend, and
      resuming the previously disabled panels on resume.
      
      This presents a few problems.
      
      One is that as omapdss device is not related to the panel devices or the
      DSS HW devices, there's no ordering in the suspend process. This means
      that suspend could be first ran for DSS HW devices and panels, and only
      then for omapdss device. Currently this is not a problem, as DSS HW
      devices and panels do not handle suspend.
      
      Another, more pressing problem, is that when suspending or resuming, the
      runtime PM functions return -EACCES as runtime PM is disabled during
      system suspend. This causes the driver to print warnings, and operations
      to fail as they think that they failed to bring up the HW.
      
      This patch changes the omapdss suspend handling to use PM notifiers,
      which are called before suspend and after resume. This way we have a
      normally functioning system when we are suspending and resuming the
      panels.
      
      This patch, I believe, creates a problem that somebody could enable or
      disable a panel between PM_SUSPEND_PREPARE and the system suspend, and
      similarly the other way around in resume. I choose to ignore the problem
      for now, as it sounds rather unlikely, and if it happens, it's not
      fatal.
      
      In the long run the system suspend handling of omapdss and panels should
      be thought out properly. The current approach feels rather hacky.
      Perhaps the panel drivers should handle system suspend, or the users of
      omapdss (omapfb, omapdrm) should handle system suspend.
      
      Note that after this patch we could probably revert
      0eaf9f52 (OMAPDSS: use sync versions of
      pm_runtime_put). But as I said, this patch may be temporary, so let's
      leave the sync version still in place.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reported-by: NJassi Brar <jaswinder.singh@linaro.org>
      Tested-by: NJassi Brar <jaswinder.singh@linaro.org>
      2b8501d7
    • R
      OMAPDSS: add clk_prepare_enable and clk_disable_unprepare · f11766d1
      Rajendra Nayak 提交于
      In preparation of OMAP moving to Common Clk Framework(CCF) change
      clk_enable() and clk_disable() calls to clk_prepare_enable() and
      clk_disable_unprepare() in omapdss. This can be safely done, as omapdss
      never enables or disables clocks in atomic context.
      Signed-off-by: NRajendra Nayak <rnayak@ti.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: <linux-fbdev@vger.kernel.org>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      [tomi.valkeinen@ti.com: updated patch description]
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f11766d1
  2. 28 6月, 2012 2 次提交
  3. 04 6月, 2012 4 次提交
    • A
      OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters · 2e063c30
      Archit Taneja 提交于
      In function dsi_compute_interleave_lp(), the escape clock/LP clock time period
      is calculated incorrectly. The escape clock/LP clock is calculated as:
      
      LP Clock(Hz) = DSI_FCLK(Hz) / lp_clk_div
      
      Since we are calculating the time period of LP clock, the LP clock divider
      should be multiplied with the time period of DSI_FCLK.
      
      Calculating incorrect value of txclkesc results in incorrect calculation of LP
      interleaving parameters, it also creates a possibility of a divide by zero
      error.
      Reported-by: NSureshkumar Manimuthu <mail2msuresh@ti.com>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2e063c30
    • T
      OMAPDSS: fix bogus WARN_ON in dss_runtime_put() · 5025ce07
      Tomi Valkeinen 提交于
      pm_runtime_put_sync() in dss_runtime_put() returns -EBUSY when any child
      of dss is still enabled. This happens, for example, when a display
      output is enabled and one dumps the clocks via debugfs. This causes
      dss_runtime_get & put to be called.
      
      While I couldn't find anything about this in the documentation and it
      wasn't immediately clear from runtime_pm code, it looks to me that
      pm_runtime_put_sync() returns -EBUSY to inform that things went fine,
      but the device could not be turned off as there are still child devices
      that are enabled. This is not a problem.
      
      This patch skips the WARN_ON if pm_runtime_put_sync() returns -EBUSY.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5025ce07
    • T
      OMAPDSS: Taal: fix compilation warning · d1700f92
      Tomi Valkeinen 提交于
      This patch fixes a warning:
      
      drivers/video/omap2/displays/panel-taal.c: In function
      ‘taal_num_errors_show’:
      drivers/video/omap2/displays/panel-taal.c:529: warning: ‘errors’ may be
      used uninitialized in this function
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      d1700f92
    • T
      OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled · 0e9a126e
      Tomi Valkeinen 提交于
      If CONFIG_DEBUG_FS or CONFIG_OMAP2_DSS_DEBUG_SUPPORT is disabled, the
      build fails:
      
      drivers/video/omap2/dss/core.c:197:50: error: static declaration of
      'dss_debugfs_create_file' follows non-static declaration
      drivers/video/omap2/dss/dss.h:166:5: note: previous declaration of
      'dss_debugfs_create_file' was here
      
      This patch fixes the dummy dss_debugfs_create_file() so that the driver
      builds.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      0e9a126e
  4. 30 5月, 2012 28 次提交