1. 15 7月, 2013 1 次提交
  2. 17 6月, 2013 7 次提交
    • T
      OMAPDSS: combine omap_dss_output into omap_dss_device · 1f68d9c4
      Tomi Valkeinen 提交于
      We currently have omap_dss_device, which represents an external display
      device, sometimes an external encoder, sometimes a panel. Then we have
      omap_dss_output, which represents DSS's output encoder.
      
      In the future with new display device model, we construct a video
      pipeline from the display blocks. To accomplish this, all the blocks
      need to be presented by the same entity.
      
      Thus, this patch combines omap_dss_output into omap_dss_device. Some of
      the fields in omap_dss_output are already found in omap_dss_device, but
      some are not. This means we'll have DSS output specific fields in
      omap_dss_device, which is not very nice. However, it is easier to just
      keep those output specific fields there for now, and after transition to
      new display device model is made, they can be cleaned up easier than
      could be done now.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1f68d9c4
    • T
      OMAPDSS: Add panel dev pointer to dssdev · ecc8b370
      Tomi Valkeinen 提交于
      We are about to remove the dss bus support, which also means that the
      omap_dss_device won't be a real device anymore. This means that the
      embedded "dev" struct needs to be removed from omap_dss_device.
      
      After we've finished the removal of the dss bus, we see the following
      changes:
      
      - struct omap_dss_device won't be a real Linux device anymore, but more
        like a "display entity".
      - struct omap_dss_driver won't be a Linux device driver, but "display
        entity ops".
      - The panel devices/drivers won't be omapdss devices/drivers, but
        platform/i2c/spi/etc devices/drivers, whichever fits the control
        mechanism of the panel.
      - The panel drivers will create omap_dss_device and omap_dss_driver,
        fill the required fields, and register the omap_dss_device to
        omapdss.
      - omap_dss_device won't have an embedded dev struct anymore, but a
        dev pointer to the actual device that manages the omap_dss_device.
      
      The model described above resembles the model that has been discussed
      with CDF (common display framework).
      
      For the duration of the conversion, we temporarily have two devs in the
      dssdev, the old "old_dev", which is a full embedded device struct, and the
      new "dev", which is a pointer to the device. "old_dev" will be removed
      in the future.
      
      For devices belonging to dss bus the dev is initialized to point to
      old_dev. This way all the code can just use the dev, for both old and
      new style panels.
      
      Both the new and old style panel drivers work during the conversion, and
      only after the dss bus support is removed will the old style panels stop
      to compile.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ecc8b370
    • T
      OMAPDSS: implement display sysfs without dss bus · 94140f0d
      Tomi Valkeinen 提交于
      We aim to remove the custom omapdss bus totally, as it's quite a strange
      construct and won't be compatible with common display framework. One
      problem on the road is that we have sysfs files for each display, and
      they depend on the omapdss bus.
      
      This patch creates the display sysfs files independent of the omapdss
      bus. This gives us backwards compatibility without using the omapdss bus
      for the sysfs files.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      94140f0d
    • T
      OMAPDSS: add panel list · 2e7e3dc7
      Tomi Valkeinen 提交于
      We currently use the omapdss bus (which contains all the available
      displays) to iterate the displays. As the omapdss bus is on its way out,
      this needs to be changed.
      
      Instead of using the dss bus to iterate displays, this patch adds our
      own list of displays which we manage. The panels on the dss bus are
      automatically added to this new list.
      
      An "alias" field is also added to omap_dss_device. This field is
      set to "display%d", the same way as omap_dss_device's dev name is set.
      This alias is later used to keep backward compatibility, when the
      embedded dev is no longer used.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2e7e3dc7
    • T
      OMAPDSS: CORE: use devm_regulator_get · 51930bba
      Tomi Valkeinen 提交于
      Use devm_regulator_get() instead of regulator_get() to simplify code.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      51930bba
    • T
      OMAPDSS: Implement display (dis)connect support · a7e71e7f
      Tomi Valkeinen 提交于
      We currently have two steps in panel initialization and startup: probing
      and enabling. After the panel has been probed, it's ready and can be
      configured and later enabled.
      
      This model is not enough with more complex display pipelines, where we
      may have, for example, two panels, of which only one can be used at a
      time, connected to the same video output.
      
      To support that kind of scenarios, we need to add new step to the
      initialization: connect.
      
      This patch adds support for connecting and disconnecting panels. After
      probe, but before connect, no panel ops should be called. When the
      connect is called, a proper video pipeline is established, and the panel
      is ready for use. If some part in the video pipeline is already
      connected (by some other panel), the connect call fails.
      
      One key difference with the old style setup is that connect() handles
      also connecting to the overlay manager. This means that the omapfb (or
      omapdrm) no longer needs to figure out which overlay manager to use, but
      it can just call connect() on the panel, and the proper overlay manager
      is connected by omapdss.
      
      This also allows us to add back the support for dynamic switching
      between two exclusive panels. However, the current panel device model is
      not changed to support this, as the new device model is implemented in
      the following patches and the old model will be removed. The new device
      model supports dynamic switching.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a7e71e7f
    • T
      OMAPDSS: add pdata->default_display_name · 0a200126
      Tomi Valkeinen 提交于
      We can currently set the default display (i.e. the initial display) in
      the omapdss platform data by using a pointer to the default
      omap_dss_device. Internally omapdss uses the device's name to resolve
      the default display.
      
      As it's difficult to get the omap_dss_device pointer in the future,
      after we've changed the omapdss device model, this patch adds a new way
      to define the default display, by using the name of the display.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: NArchit Taneja <archit@ti.com>
      0a200126
  3. 23 5月, 2013 1 次提交
    • T
      OMAPDSS: Fix crash with DT boot · 591a0ac7
      Tomi Valkeinen 提交于
      When booting with DT, there's a crash when omapfb is probed. This is
      caused by the fact that omapdss+DT is not yet supported, and thus
      omapdss is not probed at all. On the other hand, omapfb is always
      probed. When omapfb tries to use omapdss, there's a NULL pointer
      dereference crash. The same error should most likely happen with omapdrm
      and omap_vout also.
      
      To fix this, add an "initialized" state to omapdss. When omapdss has
      been probed, it's marked as initialized. omapfb, omapdrm and omap_vout
      check this state when they are probed to see that omapdss is actually
      there.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      591a0ac7
  4. 10 4月, 2013 1 次提交
  5. 07 12月, 2012 4 次提交
  6. 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
  7. 27 11月, 2012 1 次提交
  8. 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
  9. 29 10月, 2012 1 次提交
  10. 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
  11. 17 10月, 2012 1 次提交
  12. 16 10月, 2012 1 次提交
  13. 12 10月, 2012 2 次提交
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 23 4月, 2012 1 次提交