1. 07 12月, 2012 2 次提交
    • T
      OMAPDSS: add manager ops · 74b65ec2
      Tomi Valkeinen 提交于
      The output drivers need some operations from the overlay managers, like
      enable and set_timings. These will affect the dispc registers, and need
      to be synchronized with the composition-side changes with overlays and
      overlay managers.
      
      We want to handle these calls in the apply.c in the compatibility mode,
      but when in non-compat mode, the calls need to be handled by some other
      component (e.g. omapdrm).
      
      To make this possible, this patch creates a set of function pointers in
      a dss_mgr_ops struct, that is used to redirect the calls into the
      correct destination.
      
      The non-compat users can install their mgr ops with
      dss_install_mgr_ops() function.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      74b65ec2
    • 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. 26 9月, 2012 3 次提交
    • A
      OMAPDSS: Create links between managers, outputs and devices · 32248276
      Archit Taneja 提交于
      Links between DSS entities are made in dss_init_connections() when a panel
      device is registered, and are removed in dss_uninit_connections() when the
      device is unregistered. Modify these functions to incorporate the addition of
      outputs.
      
      The fields in omap_dss_device struct gives information on which output and
      manager to connect to. The desired manager and output pointers are retrieved and
      prepared to form the desired links. The output is linked to the device, and then
      the manager to the output.
      
      A helper function omapdss_get_output_from_device() is created to retrieve the
      output from the display by checking it's type, and the module id in case of DSI.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      32248276
    • A
      OMAPDSS: output: Add set/unset device ops for omap_dss_output · 6d71b923
      Archit Taneja 提交于
      An output entity represented by the struct omap_dss_output connects to a
      omap_dss_device entity. Add functions to set or unset an output's device. This
      is similar to how managers and devices were connected previously. An output can
      connect to a device without being connected to a manager. However, the output
      needs to eventually connect to a manager so that the connected panel can be
      enabled.
      
      Keep the omap_overlay_manager pointer in omap_dss_device for now to prevent
      breaking things. This will be removed later when outputs are supported
      completely.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      6d71b923
    • A
      OMAPDSS: outputs: Create a new entity called outputs · 484dc404
      Archit Taneja 提交于
      The current OMAPDSS design contains 3 software entities: Overlays, Managers and
      Devices. These map to pipelines, overlay managers and the panels respectively in
      hardware. One or more overlays connect to a manager to represent a composition,
      the manager connects to a device(generally a display) to display the content.
      
      The part of DSS hardware which isn't represented by any of the above entities
      are interfaces/outputs that connect to an overlay manager, i.e blocks like DSI,
      HDMI, VENC and so on. Currently, an overlay manager directly connects to the
      display, and the output to which it is actually connected is ignored. The panel
      driver of the display is responsible of calling output specific functions to
      configure the output.
      
      Adding outputs as a new software entity gives us the following benefits:
      
      - Have exact information on the possible connections between managers and
        outputs: A manager can't connect to each and every output, there only limited
        hardware links between a manager's video port and some of the outputs.
      
      - Remove hacks related to connecting managers and devices: Currently, default
        links between managers and devices are set in a not so clean way. Matching is
        done via comparing the device type, and the display types supported by the
        manager. This isn't sufficient to establish all the possible links between
        managers, outputs and devices in hardware.
      
      - Make panel drivers more generic: The DSS panel drivers currently call
        interface/output specific functions to configure the hardware IP. When making
        these calls, the driver isn't actually aware of the underlying output. The
        output driver extracts information from the panel's omap_dss_device pointer
        to figure out which interface it is connected to, and then configures the
        corresponding output block. An example of this is when a DSI panel calls
        dsi functions, the dsi driver figures out whether the panel is connected
        to DSI1 or DSI2. This isn't correct, and having output as entities will
        give the panel driver the exact information on which output to configure.
        Having outputs also gives the opportunity to make panel drivers generic
        across different platforms/SoCs, this is achieved as omap specific output
        calls can be replaced by ops of a particular output type.
      
      - Have more complex connections between managers, outputs and devices: OMAPDSS
        currently doesn't support use cases like 2 outputs connect to a single
        device. This can be achieved by extending properties of outputs to connect to
        more managers or devices.
      
      - Represent writeback as an output: The writeback pipeline fits well in OMAPDSS
        as compared to overlays, managers or devices.
      
      Add a new struct to represent outputs. An output struct holds pointers to the
      manager and device structs to which it is connected. Add functions which can
      register/unregister an output, or look for one. Create an enum which represent
      each output instance.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      484dc404
  3. 08 11月, 2011 1 次提交
    • A
      ARM: OMAP2PLUS: DSS: Ensure DSS works correctly if display is enabled in bootloader · b923d40d
      Archit Taneja 提交于
      Resetting DISPC when a DISPC output is enabled causes the DSS to go into an
      inconsistent state. Thus if the bootloader has enabled a display, the hwmod code
      cannot reset the DISPC module just like that, but the outputs need to be
      disabled first.
      
      Add function dispc_disable_outputs() which disables all active overlay manager
      and ensure all frame transfers are completed.
      
      Modify omap_dss_reset() to call this function and clear DSS_CONTROL,
      DSS_SDI_CONTROL and DSS_PLL_CONTROL so that DSS is in a clean state when the
      DSS2 driver starts.
      
      This resolves the hang issue(caused by a L3 error during boot) seen on the
      beagle board C3, which has a factory bootloader that enables display. The issue
      is resolved with this patch.
      
      Thanks to Tomi and Sricharan for some additional testing.
      Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Tested-by: NR, Sricharan <r.sricharan@ti.com>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      [paul@pwsan.com: restructured code, removed omap_{read,write}l(), removed
       cpu_is_omap*() calls and converted to dev_attr]
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      b923d40d