1. 03 4月, 2013 1 次提交
  2. 07 12月, 2012 1 次提交
    • T
      OMAPDSS: manage output-dssdev connection in output drivers · 486c0e17
      Tomi Valkeinen 提交于
      We currently attach an output to a dssdev in the initialization code for
      dssdevices in display.c. This works, but doesn't quite make sense: an
      output entity represents (surprisingly) an output of DSS, which is
      managed by an output driver. The output driver also handles adding new
      dssdev's for that particular output.
      
      It makes more sense to make the output-dssdev connection in the output
      driver. This is also in line with common display framework.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      486c0e17
  3. 29 10月, 2012 1 次提交
  4. 26 9月, 2012 2 次提交
    • A
      OMAPDSS: VENC: Replace dssdev->manager with dssdev->output->manager references · 8f1f736c
      Archit Taneja 提交于
      With addition of output entities, a device connects to an output, and an output
      connects to overlay manager. Replace the dssdev->manager references with
      dssdev->output->manager to access the manager correctly.
      
      When enabling the VENC output, check whether the output entity connected to
      display is not NULL.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      8f1f736c
    • A
      OMAPDSS: outputs: Create and register output instances · 81b87f51
      Archit Taneja 提交于
      Add output structs to output driver's private data. Register output instances by
      having an init function in the probes of the platform device drivers for
      different outputs. The *_init_output for each output registers the output and
      fill up the output's plaform device, type and id fields. The *_uninit_output
      functions unregister the output.
      
      In the probe of each interface driver, the output entities are initialized
      before the *_probe_pdata() functions intentionally. This is done to ensure that
      the output entity is prepared before the panels connected to the output are
      registered. We need the output entities to be ready because OMAPDSS will try
      to make connections between overlays, managers, outputs and devices during the
      panel's probe.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      81b87f51
  5. 18 9月, 2012 4 次提交
    • 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: explicitely initialize dssdev->channel for new displays · bcb226a9
      Tomi Valkeinen 提交于
      HDMI and VENC outputs always use the DIGIT output from DISPC. The dssdev
      struct contains "channel" field which is used to specify the DISPC
      output for the display, but this was not used for HDMI and VENC.
      
      This patch fills the channel field explicitely for HDMI and VENC
      displays so that we can always rely on the channel field.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      bcb226a9
    • T
      OMAPDSS: register only one display device per output · 1521653c
      Tomi Valkeinen 提交于
      We have boards with multiple panel devices connected to the same
      physical output, of which only one panel can be enabled at one time.
      Examples of these are Overo, where you can use different daughter boards
      that have different LCDs, and 3430SDP which has an LCD and a DVI output
      and a physical switch to select the active display.
      
      These are supported by omapdss so that we add all the possible display
      devices at probe, but the displays are inactive until somebody enables
      one. At this point the panel driver starts using the DSS, thus reserving
      the physcal resource and excluding the other panels.
      
      This is problematic:
      - Panel drivers can't allocate their resources properly at probe(),
        because the resources can be shared with other panels. Thus they can
        be only reserved at enable time.
      - Managing this in omapdss is confusing. It's not natural to have
        child devices, which may not even exist (for example, a daughterboard
        that is not connected).
      
      Only some boards have multiple displays per output, and of those, only
      very few have possibility of switching the display during runtime.
      Because of the above points:
      - We don't want to make omapdss and all the panel drivers more complex
        just because some boards have complex setups.
      - Only few boards support runtime switching, and afaik even then it's
        not required. So we don't need to support runtime switching.
      
      Thus we'll change to a model where we will have only one display device
      per output and this cannot be (currently) changed at runtime. We'll
      still have the possibility to select the display from multiple options
      during boot with the default display option.
      
      This patch accomplishes the above by changing how the output drivers
      register the display device. Instead of registering all the devices
      given from the board file, we'll only register one. If the default
      display option is set, the output driver selects that display from its
      displays. If the default display is not set, or the default display is
      not one of the output's displays, the output driver selects the first
      display.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1521653c
    • 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
  6. 08 9月, 2012 2 次提交
    • T
      OMAPDSS: fix set_timings · b82fe7f0
      Tomi Valkeinen 提交于
      set_timings function of DSS's output drivers are not consistent. Some of
      them disable the output, set the timings, and re-enable the output. Some
      set the timings on the fly, while the output is enabled. And some just
      store the given timings, so that they will be taken into use next time
      the output is enabled.
      
      We require the DISPC output to be disabled when changing the timings,
      and so we can change all the output drivers' set_timings to just store
      the given timings.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      b82fe7f0
    • T
      OMAPDSS: remove unnecessary includes · fe6a4662
      Tomi Valkeinen 提交于
      Remove unnecessary includes from omapdss.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      fe6a4662
  7. 22 8月, 2012 1 次提交
  8. 16 8月, 2012 2 次提交
    • A
      OMAPDSS: VENC: Maintian copy of video output polarity info in private data · 89e71956
      Archit Taneja 提交于
      The VENC driver currently relies on the omap_dss_device struct to configure the
      video output polarity. This makes the VENC interface driver dependent on the
      omap_dss_device struct.
      
      Make the VENC driver data maintain it's own polarity field. A panel driver
      is expected to call omapdss_venc_invert_vid_out_polarity() before enabling the
      interface.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      89e71956
    • A
      OMAPDSS: VENC: Maintain copy of venc type in driver data · febe2905
      Archit Taneja 提交于
      The VENC driver currently relies on the omap_dss_device struct to configure the
      venc type. This makes the VENC interface driver dependent on the omap_dss_device
      struct.
      
      Make the VENC driver data maintain it's own 'venc type' field. A panel driver
      is expected to call omapdss_venc_set_type() before enabling the interface or
      changing the type via display sysfs attributes.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      febe2905
  9. 15 8月, 2012 2 次提交
    • A
      OMAPDSS: VENC: Maintain our own timings field in driver data · a5abf472
      Archit Taneja 提交于
      The VENC driver currently relies on the timings in omap_dss_device struct to
      configure the DISPC and VENC blocks accordingly. This makes the VENC interface
      driver dependent on the omap_dss_device struct.
      
      Make the VENC driver data maintain it's own timings field. The panel driver is
      expected to call omapdss_venc_set_timings() to set these timings before the
      panel is enabled. Call omapdss_venc_set_timings() before enabling
      venc output, this is done to atleast have the venc output configured to the
      panel's default timings if the DSS user didn't explicitly call the venc panel
      driver's set_timings op.
      
      Make the VENC panel driver configure the new timings is the omap_dss_device
      struct(dssdev->panel.timings). The VENC driver is responsible for maintaining
      only it's own copy of timings.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      a5abf472
    • A
      OMAPDSS: VENC: Split VENC into interface and panel driver · 156fd99e
      Archit Taneja 提交于
      The current venc.c driver contains both the interface and panel driver code.
      This makes the driver hard to read, and difficult to understand the work split
      between the interface and panel driver and the how the locking works.
      
      This also makes it easier to clearly define the VENC interface ops called by the
      panel driver.
      
      Split venc.c into venc.c and venc_panel.c representing the interface and panel
      driver respectively. This split is done along the lines of the HDMI interface
      and panel drivers.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      156fd99e
  10. 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
  11. 29 6月, 2012 3 次提交
    • A
      OMAPDSS: Add interlace parameter to omap_video_timings · 23c8f88e
      Archit Taneja 提交于
      Add a parameter called interlace which tells whether the timings are in
      interlaced or progressive mode. This aligns the omap_video_timings struct with
      the Xorg modeline configuration.
      
      It also removes the hack needed to write to divide the manager height by 2 if
      the connected interface is VENC.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      23c8f88e
    • 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
    • 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
  12. 22 5月, 2012 3 次提交
    • A
      OMAPDSS: Apply VENC timings even if panel is disabled · c808ab9c
      Archit Taneja 提交于
      The VENC interfaces uses it's venc_set_timing() function to take in a new set
      of timings. If the panel is disabled, it does not disable and re-enable the
      interface. Currently, the manager timings are applied in venc_power_on(), 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 VENC panel is disabled.
      
      This is similar to the commit below which fixed the same issue for HDMI/DPI
      interfaces:
      
      fcc36619Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c808ab9c
    • A
      OMAPDSS: VENC/DISPC: Delay dividing Y resolution for managers connected to VENC · 2aefad49
      Archit Taneja 提交于
      DSS2 driver uses the timings in manager's private data to check the validity of
      overlay and manager infos written by the user. For VENC interface, we divide the
      Y resolution by half when writing to the DISPC_DIGIT_SIZE register as the
      content is interlaced. However, the height of the manager/display with respect
      to the content shown through VENC still remains the same.
      
      The VENC driver divides the y_res parameter in omap_video_timings by half, and
      then applies the configuration. This leads to manager's private data storing
      the wrong Y resolution. Hence, overlay related checks fail.
      
      Ensure that manager's private data stores the original timings, and the Y
      resolution is halved only when we write to the DISPC register. This is a hack,
      the proper solution would be to pass some sort of interlace parameter which
      makes the call whether we should divide y_res or not.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      2aefad49
    • T
      OMAPDSS: remove compiler warnings when CONFIG_BUG=n · c6eee968
      Tomi Valkeinen 提交于
      If CONFIG_BUG is not enabled, BUG() does not stop the execution. Many
      places in code expect the execution to stop, and this causes compiler
      warnings about uninitialized variables and returning from a non-void
      function without a return value.
      
      This patch fixes the warnings by initializing the variables and
      returning properly after BUG() lines. However, the behaviour is still
      undefined after the BUG, but this is the choice the user makes when
      using CONFIG_BUG=n.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c6eee968
  13. 11 5月, 2012 9 次提交
  14. 09 5月, 2012 1 次提交
    • 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
  15. 23 4月, 2012 3 次提交
  16. 21 2月, 2012 1 次提交
    • T
      OMAPDSS: cleanup probe functions · cd3b3449
      Tomi Valkeinen 提交于
      Now that dss is using devm_ functions for allocation in probe functions,
      small reordering of the allocations allows us to clean up the probe
      functions more.
      
      This patch moves "unmanaged" allocations after the managed ones, and
      uses plain returns instead of gotos where possible. This lets us remove
      a bunch of goto labels, simplifying the probe's error handling.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      cd3b3449
  17. 26 1月, 2012 1 次提交
    • 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
  18. 25 1月, 2012 2 次提交