1. 07 12月, 2012 4 次提交
  2. 29 11月, 2012 1 次提交
    • A
      OMAPDSS: Use only "omapdss_dss" platform device to get context lost count · bdb736ab
      Archit Taneja 提交于
      When enabling a hwmod, omap_hwmod refers to the register mentioned in the
      hwmod struct's member 'prcm.omap4.context_offs' to see whether context was
      lost or not. It increments the context lost count for the hwmod and then clears
      the register.
      
      All the DSS hwmods have the same register(RM_DSS_DSS_CONTEXT) as context_offs.
      When DSS is enabled, the first hwmod to be enabled is the "dss_core" hwmod since
      it's corresponding platform device is the parent platform device("omapdss_dss").
      The dss_core hwmod updates it's context lost count correctly and clears the
      register. When the hwmods corresponding to the children platform devices are
      enabled, they see that the register is clear, and don't increment their context
      lost count. Therefore, all the children platform devices never report a loss in
      context.
      
      The DISPC driver currently gets the context lost count for DSS power domain from
      it's corresponding platform device instance("omapdss_dispc"). The DISPC platform
      device is one of the child devices, and it's corresponding hwmod("dss_dispc")
      doesn't report the context lost count correctly.
      
      Modify dss_get_ctx_loss_count() such that it always takes the "omapdss_dss"
      platform device as it's input, move the function to dss.c so that it has access
      to that platform device.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      bdb736ab
  3. 27 11月, 2012 1 次提交
  4. 05 11月, 2012 1 次提交
    • T
      OMAPDSS: fix DPI & DSI init order · 046bc575
      Tomi Valkeinen 提交于
      DPI may use DSI PLL, so it depends on DSI. However, currently DPI driver
      is added first, which causes DPI initialization to fail when it tries to
      get the DSI PLL.
      
      This patch changes the init order to fix this.
      
      A better solution would be to separate DSI PLL and DSI drivers. They
      have dependencies, though, but we could still have DSI PLL as an
      independent entity that we could initialize before any of the output
      drivers.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      046bc575
  5. 29 10月, 2012 1 次提交
  6. 24 10月, 2012 1 次提交
    • T
      OMAPDSS: get the dss version from core pdev · b2c7d54f
      Tomi Valkeinen 提交于
      The output drivers get the omapdss hw version from the platform data for
      their respective output device. This doesn't work with DT, as there's no
      platform data for them.
      
      Add a new function, omapdss_get_version(), which returns the dss version
      from the core device, which will have platform data on DT also. The
      function is exported so that users of omapdss can also use it.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      b2c7d54f
  7. 17 10月, 2012 1 次提交
  8. 16 10月, 2012 1 次提交
  9. 12 10月, 2012 2 次提交
  10. 18 9月, 2012 5 次提交
    • T
      OMAPDSS: alloc dssdevs dynamically · 5274484b
      Tomi Valkeinen 提交于
      We currently create omap_dss_devices statically in board files, and use
      those devices directly in the omapdss driver. This model prevents us
      from having the platform data (which the dssdevs in board files
      practically are) as read-only, and it's also different than what we will
      use with device tree.
      
      This patch changes the model to be in line with DT model: we allocate
      the dssdevs dynamically, and initialize them according to the data in
      the board file's dssdev (basically we memcopy the dssdev fields).
      
      The allocation and registration is done in the following steps in the
      output drivers:
      
      - Use dss_alloc_and_init_device to allocate and initialize the device.
        The function uses kalloc and device_initialize to accomplish this.
      - Call dss_copy_device_pdata to copy the data from the board file's
        dssdev
      - Use dss_add_device to register the device.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5274484b
    • T
      OMAPDSS: cleanup dss_recheck_connections further · 5eeb55f8
      Tomi Valkeinen 提交于
      Cleanup dss_recheck_connections, move and rename it to a static
      dss_init_connections function inside display.c. Improve the function to
      return errors, and implement a matching dss_uninit_connections that can
      be used to free the mgr->dssdev link.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5eeb55f8
    • T
      OMAPDSS: handle errors in dss_init_device · 47eb6763
      Tomi Valkeinen 提交于
      Add error handling to dss_init_device(), which has, for some reason,
      been missing.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      47eb6763
    • T
      OMAPDSS: Add dss_get_default_display_name() · 6a03fca9
      Tomi Valkeinen 提交于
      Add function dss_get_default_display_name() which returns the name of
      the default display, given from the board file or via module parameters.
      The default display name can be used by output drivers to decide which
      display is the wanted one.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      6a03fca9
    • T
      OMAPDSS: omap_dss_register_device() doesn't take display index · 8768a52f
      Tomi Valkeinen 提交于
      We used to have all the displays of the board in one list, and we made a
      "displayX" directory in the sysfs, where X was the index of the display
      in the list.
      
      This doesn't work anymore with device tree, as there's no single list to
      get the number from, and it doesn't work very well even with non-DT as
      we need to do some tricks to get the index nowadays.
      
      This patch changes omap_dss_register_device() so that it doesn't take
      disp_num as a parameter anymore, but uses a private increasing counter
      for the display number.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      8768a52f
  11. 08 7月, 2012 1 次提交
    • T
      OMAPDSS: Use PM notifiers for system suspend · 736f29cd
      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>
      Tested-by: NJoe Woodward <jw@terrafix.co.uk>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      [fts: fixed 2 brace coding style issues]
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      736f29cd
  12. 29 6月, 2012 1 次提交
    • 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
  13. 04 6月, 2012 1 次提交
    • 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
  14. 11 5月, 2012 8 次提交
    • T
      OMAPDSS: interface drivers register their panel devices · 35deca3d
      Tomi Valkeinen 提交于
      Currently the higher level omapdss platform driver gets the list of
      displays in its platform data, and uses that list to create the
      omap_dss_device for each display.
      
      With DT, the logical way to do the above is to list the displays under
      each individual output, i.e. we'd have "dpi" node, under which we would
      have the display that uses DPI. In other words, each output driver
      handles the displays that use that particular output.
      
      To make the current code ready for DT, this patch modifies the output
      drivers so that each of them creates the display devices which use that
      output. However, instead of changing the platform data to suit this
      method, each output driver is passed the full list of displays, and the
      drivers pick the displays that are meant for them. This allows us to
      keep the old platform data, and thus we avoid the need to change the
      board files.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      35deca3d
    • T
      OMAPDSS: change default_device handling · c018c673
      Tomi Valkeinen 提交于
      We currently have a two ways to set a "default panel device" for dss, to
      which the overlays are connected when the omapdss driver is loaded:
      
      - in textual format (name of the display) as cmdline parameter
      - as a pointer to the panel device from board file via pdata
      
      The current code handles this in a bit too complex way by using both of
      the above methods during runtime. However, with DT we don't have pdata
      anymore, so the code handling the second case won't work anymore. The
      current code has also the problem that it modifies the platform_data.
      
      This patch simplifies the code a bit by using the pointer method only
      inside the probe function, and stores the name of the panel device. This
      way we only need to handle the textual format during operation and also
      avoid modifying the platform_data.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c018c673
    • T
      OMAPDSS: add __init & __exit · 6e7e8f06
      Tomi Valkeinen 提交于
      Now that we are using platform_driver_probe() we can add __inits and
      __exits all around.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      6e7e8f06
    • T
      OMAPDSS: move the creation of debugfs files · e40402cf
      Tomi Valkeinen 提交于
      Instead of having an ugly #ifdef mess in the core.c for creating debugfs
      files, add a dss_debugfs_create_file() function that the dss drivers
      can use to create the debugfs files.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      e40402cf
    • T
      OMAPDSS: handle output-driver reg/unreg more dynamically · 461395c4
      Tomi Valkeinen 提交于
      Initialize and uninitialize the output drivers by using arrays of
      pointers to the init/uninit functions. This simplifies the code
      slightly.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      461395c4
    • T
      OMAPDSS: create DPI & SDI drivers · a57dd4fe
      Tomi Valkeinen 提交于
      We currently have separate device/driver for each DSS HW module. The DPI
      and SDI outputs are more or less parts of the DSS or DISPC hardware
      modules, but in SW it makes sense to represent them as device/driver
      pairs similarly to all the other outputs. This also makes sense for
      device tree, as each node under dss will be a platform device, and
      handling DPI & SDI somehow differently than the rest would just make the
      code more complex.
      
      This patch modifies the dpi.c and sdi.c to create drivers for the
      platform devices.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a57dd4fe
    • T
      OMAPDSS: use platform_driver_probe for core/dispc/dss · 11436e1d
      Tomi Valkeinen 提交于
      The platform devices for omapdss, dss and dispc drivers are always
      present, so we can use platform_driver_probe instead of
      platform_driver_register.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      11436e1d
    • T
      OMAPDSS: clean up the omapdss platform data mess · 00928eaf
      Tomi Valkeinen 提交于
      The omapdss pdata handling is a mess. This is more evident when trying
      to use device tree for DSS, as we don't have platform data anymore in
      that case. This patch cleans the pdata handling by:
      
      - Remove struct omap_display_platform_data. It was used just as a
        wrapper for struct omap_dss_board_info.
      - Pass the platform data only to omapdss device. The drivers for omap
        dss hwmods do not need the platform data. This should also work better
        for DT, as we can create omapdss device programmatically in generic omap
        boot code, and thus we can pass the pdata to it.
      - Create dss functions for get_ctx_loss_count and dsi_enable/disable_pads
        that the dss hwmod drivers can call.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      00928eaf
  15. 23 4月, 2012 2 次提交
    • G
      OMAPDSS: provide default get_timings function for panels · 4b6430fc
      Grazvydas Ignotas 提交于
      With this we can eliminate some duplicate code in panel drivers.
      Also lgphilips-lb035q02, nec-nl8048hl11-01b, picodlp and
      tpo-td043mtea1 gain support of reading timings over sysfs.
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      4b6430fc
    • T
      OMAPDSS: Ensure OPP100 when DSS is operational · a8081d31
      Tomi Valkeinen 提交于
      Most of the DSS clocks have restrictions on their frequency based on the
      OPP in use. For example, maximum frequency for a clock may be 180MHz in
      OPP100, but 90MHz in OPP50. This means that when a high enough pixel
      clock or function clock is required, we need to use OPP100.
      
      However, there's currently no way in the PM framework to make that kind
      of request. The closest we get is to ask for very high bus throughput
      from the PM framework, which should effectively force OPP100.
      
      This patch is a simple version for handling the problem. Instead of
      asking for OPP100 only when needed, this patch asks for OPP100 whenever
      DSS is active. This obviously is not an optimal solution for cases with
      small displays where OPP50 would work just fine. However, a proper
      solution is a complex one, and this patch is a short term solution for
      the problem.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Paul Walmsley <paul@pwsan.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      a8081d31
  16. 21 3月, 2012 1 次提交
    • T
      OMAPDSS: register dss drivers in module init · dc7e57fa
      Tomi Valkeinen 提交于
      We do the dss driver registration in a rather strange way: we have the
      higher level omapdss driver, and we use that driver's probe function to
      register the drivers for the rest of the dss devices.
      
      There doesn't seem to be any reason for that, and additionally the
      soon-to-be-merged patch "ARM: OMAP: omap_device: remove
      omap_device_parent" will break omapdss initialization with the current
      registration model.
      
      This patch changes the registration for all drivers to happen at the
      same place, in the init of the module.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      dc7e57fa
  17. 13 1月, 2012 1 次提交
  18. 02 12月, 2011 1 次提交
    • T
      OMAPDSS: create apply.c · 58f25548
      Tomi Valkeinen 提交于
      Create a new file, apply.c, and move code about handling the
      apply-mechanism and configuration of the managers and overlays from
      manager.c to apply.c.
      
      Not all related code is moved in this patch, but only the core
      apply/configure functions. The later patches move rest of the code from
      overlay.c and manager.c, adding necessary locking at the same time.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      58f25548
  19. 30 9月, 2011 1 次提交
  20. 25 7月, 2011 2 次提交
  21. 13 5月, 2011 1 次提交
  22. 11 5月, 2011 2 次提交