1. 08 7月, 2012 1 次提交
    • T
      OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n · 373b4365
      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>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      373b4365
  2. 11 5月, 2012 15 次提交
    • R
      OMAPDSS: HDMI: Implement DSS driver interface for audio · f3a97491
      Ricardo Neri 提交于
      Implement the DSS device driver audio support interface in the HDMI
      panel driver and generic driver. The implementation relies on the
      IP-specific functions that are defined at DSS probe time.
      
      A mixed locking strategy is used. The panel's mutex is used when
      the state of the panel is queried as required by the audio functions.
      The audio state is protected using a spinlock as users of DSS HDMI
      audio functionality might start/stop audio while holding a spinlock.
      The mutex and the spinlock are held and released as needed by each
      individual function to protect the panel state and the audio state.
      
      Although the panel's audio_start functions does not check whether
      the panel is active, the audio _ENABLED state can be reached only
      from audio_enable, which does check the state of the panel. Also,
      if the panel is ever disabled, the audio state will transition
      to _DISABLED. Transitions are always protected by the audio lock.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      f3a97491
    • R
      OMAPDSS: HDMI: Add support for more audio sample rates in N/CTS calculation · 25a65359
      Ricardo Neri 提交于
      Add support for more sample rates when calculating N and CTS. This
      covers all the audio sample rates that an HDMI source is allowed
      to transmit according to the HDMI 1.4a specification.
      
      Also, reorganize the logic for the calculation when using deep color.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      25a65359
    • R
      OMAPDSS: HDMI: Relocate N/CTS calculation · 35547626
      Ricardo Neri 提交于
      The N and CTS parameters are relevant to all HDMI implementations and
      not specific to a given IP. Hence, the calculation is relocated
      into the generic HDMI driver.
      
      Also, deep color is not queried but it is still considered in the
      calculation of N. This is to be changed when deep color functionality is
      implemented in the driver.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      35547626
    • R
      OMAPDSS: HDMI: Remove ASoC codec · 7c3291f0
      Ricardo Neri 提交于
      Remove the ASoC OMAP HDMI audio codec. The goal of removing the codec
      is to, in subsequent patches, give way to the implementation of the HDMI
      audio support using the DSS device driver audio interface. This
      approach will expose the HDMI audio functionality to any interested entity.
      
      In a separate patch, ASoC will use this new approach to expose HDMI audio
      to ALSA.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      7c3291f0
    • R
      OMAPDSS: HDMI: Split video_enable into video_enable/disable · c0456be3
      Ricardo Neri 提交于
      To improve readability, split the video_enable HDMI IP operation
      into two separate functions for enabling and disabling video.
      The video_enable function is also modified to return an error value.
      
      While there, update these operations for the OMAP4 IP accordingly.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      c0456be3
    • R
      OMAPDSS: HDMI: Split audio_enable into audio_enable/disable · 027bdc85
      Ricardo Neri 提交于
      To improve readability, split the audio_enable HDMI IP operation
      into two separate functions for enabling and disabling audio.
      The audio_enable function is also modified to return an error value.
      
      While there, update these operations for the OMAP4 IP accordingly.
      Signed-off-by: NRicardo Neri <ricardo.neri@ti.com>
      027bdc85
    • T
      OMAPDSS: separate pdata based initialization · 38f3daf6
      Tomi Valkeinen 提交于
      Move the platform-data based display device initialization into a
      separate function, so that we may later add of-based initialization.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      38f3daf6
    • T
      OMAPDSS: init omap_dss_devices internally · 9d8232a7
      Tomi Valkeinen 提交于
      Now that each output driver creates their own display devices, the
      output drivers can also initialize those devices.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      9d8232a7
    • 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: 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: use platform_driver_probe for dsi/hdmi/rfbi/venc/dpi/sdi · 61055d4b
      Tomi Valkeinen 提交于
      Now that the core.c doesn't fail if output driver's init fails, we can
      change the uses of platform_driver_register to platform_driver_probe.
      This will allow us to use __init in the following patches.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      61055d4b
    • 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: remove uses of dss_runtime_get/put · 852f0838
      Tomi Valkeinen 提交于
      Now that the omapdss_core device is the parent for all other dss
      devices, we don't need to use the dss_runtime_get/put anymore. Instead,
      enabling omapdss_core will happen automatically when a child device is
      enabled.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      852f0838
    • T
      OMAPDSS: remove return from platform_driver_unreg · 04c742c3
      Tomi Valkeinen 提交于
      For unknown reasons we seem to have a return in each of the omapdss's
      uninit functions, which is a void function.
      
      Remove the returns.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      04c742c3
    • 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
  3. 09 5月, 2012 2 次提交
    • A
      OMAPDSS: DPI/HDMI: Apply manager timings even if panel is disabled · fcc36619
      Archit Taneja 提交于
      The DPI and HDMI interfaces use their 'set_timing' functions to take in a new
      set of timings. If the panel is disabled, they do not disable and re-enable
      the interface. Currently, the manager timings are applied in hdmi_power_on()
      and dpi_set_mode() respectively, these are not called by set_timings if the
      panel is disabled.
      
      When checking overlay and manager data, the DSS driver uses the last applied
      manager timings, and not the timings held by omap_dss_device struct. Hence,
      there is a need to apply the new manager timings even if the panel is disabled.
      
      Apply the manager timings if the panel is disabled. Eventually, there should be
      one common place where the timings are applied independent of the state of the
      panel.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      fcc36619
    • A
      OMAPDSS: Apply manager timings instead of direct DISPC writes · 41721163
      Archit Taneja 提交于
      Replace the function dispc_mgr_set_timings() with dss_mgr_set_timings() in the
      interface drivers. The latter function ensures that the timing related DISPC
      registers are configured according to the shadow register programming model.
      
      Remove the call to dispc_mgr_go() in dpi_set_timings() as the manager's go bit
      is set by dss_mgr_set_timings().
      Signed-off-by: NArchit Taneja <archit@ti.com>
      41721163
  4. 23 4月, 2012 1 次提交
    • A
      OMAPDSS: DISPC: Use a common function to set manager timings · c51d921a
      Archit Taneja 提交于
      Currently, a LCD manager's timings is set by dispc_mgr_set_lcd_timings() and TV
      manager's timings is set by dispc_set_digit_size(). Use a common function called
      dispc_mgr_set_timings() which sets timings for both type of managers.
      
      We finally want the interface drivers to use an overlay manager function to
      configure it's timings, having a common DISPC function would make things
      cleaner.
      
      For LCD managers, dispc_mgr_set_timings() sets LCD size and blanking values, for
      TV manager, it sets only the TV size since blanking values don't exist for TV.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c51d921a
  5. 06 3月, 2012 1 次提交
    • M
      OMAPDSS: HDMI: Add M2 divider while calculating clkout · dd2116a3
      Mythri P K 提交于
      While calculating regm and regmf value add using M2 divider in
      the equation.
      Formula for calculating:
      Output clock on digital core domain:
      	CLKOUT = (M / (N+1))*CLKINP*(1/M2)
      Internal oscillator output clock on internal LDO domain:
      	CLKDCOLDO = (M / (N+1))*CLKINP
      The current code when allows variable M2 values as input
      ignores using M2 divider values in calculation of regm and regmf.
      so fix it by using M2 in calculation although the default value for
      M2 is 1.
      Signed-off-by: NMythri P K <mythripk@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      dd2116a3
  6. 23 2月, 2012 1 次提交
    • A
      OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled · a247ce78
      Archit Taneja 提交于
      For DSS clock domain to transition from idle to active state. It's necessary
      to enable the optional clock DSS_FCLK before we enable the module using the
      MODULEMODE bits in the clock domain's CM_DSS_DSS_CLKCTRL register.
      
      This sequence was not followed correctly for the 'dss_hdmi' hwmod and it led
      to DSS clock domain not getting out of idle when pm_runtime_get_sync() was
      called for hdmi's platform device.
      
      Since the clock domain failed to change it's state to active, the hwmod code
      disables any clocks it had enabled before for this hwmod. This led to the clock
      'dss_48mhz_clk' gettind disabled.
      
      When hdmi's runtime_resume() op is called, the call to dss_runtime_get()
      correctly enables the DSS clock domain this time. However, the clock
      'dss_48mhz_clk' is needed for HDMI's PHY to function correctly. Since it was
      disabled previously, the driver fails when it tries to enable HDMI's PHY.
      
      Fix this for now by ensuring that dss_runtime_get() is called before we call
      pm_runtime_get_sync() for hdmi's platform device. A correct fix for later would
      be to modify the DSS related hwmod's mainclks, and also some changes in how
      opt clocks are handled in the DSS driver.
      
      This fixes the issue of HDMI not working when it's the default display. The
      issue is not seen if any other display is already enabled as the first display
      would have correctly enabled the DSS clockdomain.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a247ce78
  7. 21 2月, 2012 1 次提交
  8. 26 1月, 2012 2 次提交
    • T
      OMAPDSS: HDMI: PHY burnout fix · c49d005b
      Tomi Valkeinen 提交于
      A hardware bug in the OMAP4 HDMI PHY causes physical damage to the board
      if the HDMI PHY is kept powered on when the cable is not connected.
      
      This patch solves the problem by adding hot-plug-detection into the HDMI
      IP driver. This is not a real HPD support in the sense that nobody else
      than the IP driver gets to know about the HPD events, but is only meant
      to fix the HW bug.
      
      The strategy is simple: If the display device is turned off by the user,
      the PHY power is set to OFF. When the display device is turned on by the
      user, the PHY power is set either to LDOON or TXON, depending on whether
      the HDMI cable is connected.
      
      The reason to avoid PHY OFF when the display device is on, but the cable
      is disconnected, is that when the PHY is turned OFF, the HDMI IP is not
      "ticking" and thus the DISPC does not receive pixel clock from the HDMI
      IP. This would, for example, prevent any VSYNCs from happening, and
      would thus affect the users of omapdss. By using LDOON when the cable is
      disconnected we'll avoid the HW bug, but keep the HDMI working as usual
      from the user's point of view.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c49d005b
    • T
      OMAPDSS: use sync versions of pm_runtime_put · 0eaf9f52
      Tomi Valkeinen 提交于
      omapdss doesn't work properly on system suspend. The problem seems to be
      the fact that omapdss uses pm_runtime_put() functions when turning off
      the hardware, and when system suspend is in process only sync versions
      are allowed.
      
      Using non-sync versions normally and sync versions when suspending would
      need rather ugly hacks to convey the information of
      suspending/not-suspending to different functions. Optimally the driver
      wouldn't even need to care about this, and the PM layer would handle
      syncing when suspend is in process.
      
      This patch changes all omapdss's pm_runtime_put calls to
      pm_runtime_put_sync. This fixes the suspend problem, and probably the
      performance penalty of always using sync versions is negligible.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      0eaf9f52
  9. 25 1月, 2012 3 次提交
  10. 05 1月, 2012 3 次提交
  11. 02 12月, 2011 2 次提交
  12. 18 11月, 2011 1 次提交
  13. 30 9月, 2011 7 次提交