1. 07 12月, 2012 2 次提交
    • T
      OMAPDSS: manage framedone irq with mgr ops · 1550202d
      Tomi Valkeinen 提交于
      Some of the output drivers need to handle FRAMEDONE interrupt from
      DISPC. This creates a direct dependency to dispc code, and we need to
      avoid this to make the compat code to work.
      
      Instead of the output drivers registering for dispc interrupts, we
      create new mgr-ops that are used to register a framedone handler. The
      code implementing the mgr-ops is responsible for calling the handler
      when DISPC FRAMEDONE interrupt happens. The compat layer is improved
      accordingly to do the call to the framedone handler.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      1550202d
    • 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
  2. 29 10月, 2012 1 次提交
  3. 26 9月, 2012 2 次提交
    • A
      OMAPDSS: RFBI: Replace dssdev->manager with dssdev->output->manager references · 1db39c0a
      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 RFBI output, check whether the output entity connected to
      display is not NULL.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      1db39c0a
    • 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
  4. 18 9月, 2012 3 次提交
    • 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: 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
  5. 08 9月, 2012 1 次提交
    • T
      OMAPDSS: fix use of dssdev->caps · ab585254
      Tomi Valkeinen 提交于
      Recent commit dca2b152 (OMAPDSS: DSI:
      Maintain copy of operation mode in driver data) broke DSI for video mode
      displays. The commit changed the way dssdev->caps are initialized, and
      the result was that every DSI display is initialized with manual-update
      and tear-elim caps.
      
      The code that sets dssdev->caps is not very good, even when fixed.
      omapdss driver shouldn't be writing dssdev->caps at all.
      
      This patch fixes the problem with video mode displays by moving the
      initialization of dssdev->caps to the panel driver. The same change is
      done for RFBI.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ab585254
  6. 16 8月, 2012 3 次提交
    • A
      OMAPDSS: RFBI: Maitain copy of rfbi timings in driver data · 6e883324
      Archit Taneja 提交于
      The RFBI driver currently relies on the omap_dss_device struct to receive the
      rfbi specific timings requested by the panel driver. This makes the RFBI
      interface driver dependent on the omap_dss_device struct.
      
      Make the RFBI driver data maintain it's own rfbi specific timings field. The
      panel driver is expected to call omapdss_rfbi_set_interface_timings() to
      configure the rfbi timings before the interface is enabled.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      6e883324
    • A
      OMAPDSS: RFBI: Maintain copy of number of data lines in driver data · 475989b7
      Archit Taneja 提交于
      The RFBI driver currently relies on the omap_dss_device struct to configure the
      number of data lines as specified by the panel. This makes the RFBI interface
      driver dependent on the omap_dss_device struct.
      
      Make the RFBI driver data maintain it's own data lines field. A panel driver
      is expected to call omapdss_rfbi_set_data_lines() to configure the pixel format
      before enabling the interface or calling omap_rfbi_configure().
      Signed-off-by: NArchit Taneja <archit@ti.com>
      475989b7
    • A
      OMAPDSS: RFBI: Maintain copy of pixel size in driver data · b02875be
      Archit Taneja 提交于
      The RFBI driver currently relies on the omap_dss_device struct to receive the
      desired pixel size of the panel. This makes the RFBI interface driver dependent
      on the omap_dss_device struct.
      
      Make the RFBI driver data maintain it's own pixel format field. A panel driver
      is expected to call omapdss_rfbi_set_pixel_size() to configure the pixel format
      before enabling the interface or calling omap_rfbi_configure().
      Signed-off-by: NArchit Taneja <archit@ti.com>
      b02875be
  7. 15 8月, 2012 2 次提交
    • A
      OMAPDSS: RFBI: Add function to set panel size · 6ff9dd5a
      Archit Taneja 提交于
      RFBI drivers requires configuration of the update area. Since we don't support
      partial updates, the size to be configures is the panel size itself.
      
      Add a timings field in RFBI's driver data. Apart from x_res and y_res, all the
      other fields are configured to an initial value when RFBI is enabled. A panel
      driver is expected to call omapdss_rfbi_set_size() configure the size of the
      panel.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      6ff9dd5a
    • A
      OMAPDSS: RFBI: Remove partial update support · 43eab861
      Archit Taneja 提交于
      Partial update suppport was removed from DISPC and DSI sometime back. The RFBI
      driver still tries to support partial update without the underlying support in
      DISPC.
      
      Remove partial update support from RFBI, only support updates which span acros
      the whole panel size. This also helps in DSI and RFBI having similar update
      ops.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      43eab861
  8. 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
  9. 29 6月, 2012 5 次提交
    • A
      OMAPDSS: RFBI: Use dss_mgr_enable to enable the overlay manager · c47cdb30
      Archit Taneja 提交于
      The RFBI driver uses a direct DISPC register write to enable the overlay
      manager. Replace this with dss_mgr_enable() which checks if the connected
      overlay and managers are correctly configured, and configure DSS for
      fifomerge.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      c47cdb30
    • A
      OMAPDSS: APPLY: Remove DISPC writes to manager's lcd parameters in interface drivers · f476ae9d
      Archit Taneja 提交于
      Replace the DISPC fuctions used to configure LCD channel related manager
      parameters with dss_mgr_set_lcd_config() in APPLY. This function ensures that
      the DISPC registers are written at the right time by using the shadow register
      programming model.
      
      The LCD manager configurations is stored as a private data of manager in APPLY.
      It is treated as an extra info as it's the panel drivers which trigger this
      apply via interface drivers, and not a DSS2 user like omapfb or omapdrm.
      
      Storing LCD manager related properties in APPLY also prevents the need to refer
      to the panel connected to the manager for information. This helps in making the
      DSS driver less dependent on panel.
      
      A helper function is added to check whether the manager is LCD or TV. The direct
      DISPC register writes are removed from the interface drivers.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      f476ae9d
    • A
      OMAPDSS: RFBI: Configure dss_lcd_mgr_config struct with lcd manager parameters · bc2e60a6
      Archit Taneja 提交于
      Create a dss_lcd_mgr_config struct instance in RFBI. Fill up all the parameters
      of the struct with configurations held by the panel, and the configurations
      required by RFBI.
      
      Use these to write to the DISPC registers. These direct register writes would be
      later replaced by a function which applies the configuration using the shadow
      register programming model.
      
      Create function rfbi_config_lcd_manager() which fills up the mgr_config
      parameters and writes to the DISPC regs.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      bc2e60a6
    • A
      OMAPDSS: Remove passive matrix LCD support (part 3) · d21f43bc
      Archit Taneja 提交于
      Remove omap_lcd_display_type enum
      
      The enum omap_lcd_display_type is used to configure the lcd display type in
      DISPC. Remove this enum and always set display type to TFT by creating function
      dss_mgr_set_lcd_type_tft().
      Signed-off-by: NArchit Taneja <archit@ti.com>
      d21f43bc
    • 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
  10. 11 5月, 2012 8 次提交
  11. 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
  12. 23 4月, 2012 2 次提交
  13. 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
  14. 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
  15. 25 1月, 2012 1 次提交
  16. 02 12月, 2011 1 次提交
    • T
      OMAPDSS: remove partial update from the overlay manager · 8760db54
      Tomi Valkeinen 提交于
      Partial update for manual update displays has never worked quite well:
      * The HW has limitations on the update area, and the x and width need to
        be even.
      * Showing a part of a scaled overlay causes artifacts.
      * Makes the management of dispc very complex
      
      Considering the above points and the fact that partial update is not
      used anywhere, this and the following patches remove the partial update
      support. This will greatly simplify the following re-write of the apply
      mechanism to get proper locking and additional features like fifo-merge.
      
      This patch removes the partial update from the manager.c.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      8760db54
  17. 01 11月, 2011 1 次提交
  18. 30 9月, 2011 3 次提交
    • A
      OMAP: DSS2: Clean up stallmode and io pad mode selection · 569969d6
      Archit Taneja 提交于
      Split the function dispc_set_parallel_interface_mode() into 2 separate
      functions called dispc_mgr_set_io_pad_mode() and dispc_mgr_enable_stallmode().
      The current function tries to set 2 different modes(io pad mode and stall mode)
      based on a parameter omap_parallel_interface_mode which loosely corresponds to
      the panel interface type.
      
      This isn't correct because a) these 2 modes are independent to some extent,
      b) we are currently configuring gpout0/gpout1 for DSI panels which is
      unnecessary, c) a DSI Video mode panel won't get configured correctly.
      
      Splitting the functions allows the interface driver to set these modes
      independently and hence allow more flexibility.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      569969d6
    • T
      OMAP: DSS2: DISPC: rename manager related funcs · 26d9dd0d
      Tomi Valkeinen 提交于
      Rename dispc's manager related functions as follows:
      
      - Remove prepending underscores, which were originally used to inform
        that the clocks needs to be enabled. This meaning is no longer valid.
      - Prepend the functions with dispc_mgr_*
      - Remove "channel" from the name, e.g. dispc_enable_channel ->
        dispc_mgr_enable
      
      The idea is to group manager related functions so that it can be deduced
      from the function name that it writes to manager spesific registers.
      
      All dispc_mgr_* functions have enum omap_channel as the first parameter.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      26d9dd0d
    • T
      OMAP: DSS2: Remove support for non-DISPC overlays · 4a9e78ab
      Tomi Valkeinen 提交于
      Remove support for non-DISPC overlays and overlay managers.
      
      The support to possibly have non-DISPC overlays and managers was made to
      make it possible to use CPU and/or sDMA to update RFBI or DSI command
      mode displays. It is ok to remove the support, because:
      
      - No one has used the feature.
      - Display update without DISPC is very slow, so it is debatable if the
        update would even be usable.
      - Removal cleans up code.
      - If such a feature is needed later, it is better implemented outside
        omapdss driver.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: NArchit Taneja <archit@ti.com>
      4a9e78ab
  19. 20 9月, 2011 1 次提交