1. 18 Sep, 2012 3 commits
    • Tomi Valkeinen's avatar
      OMAPDSS: register only one display device per output · 1521653c
      Tomi Valkeinen authored
      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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      1521653c
    • Tomi Valkeinen's avatar
      OMAPDSS: Add dss_get_default_display_name() · 6a03fca9
      Tomi Valkeinen authored
      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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      6a03fca9
    • Tomi Valkeinen's avatar
      OMAPDSS: omap_dss_register_device() doesn't take display index · 8768a52f
      Tomi Valkeinen authored
      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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      8768a52f
  2. 11 Sep, 2012 2 commits
  3. 10 Sep, 2012 1 commit
    • Tomi Valkeinen's avatar
      Merge miscellaneous omapdss changes · 6cd05430
      Tomi Valkeinen authored
      Most important changes:
      
      * Remove OMAP4 HDMI gpio handling from board files
      * Add vdda_hdmi_dac supply for HDMI to twl-common.c
      * Calculate DSI clocks dynamically
      * Remove DSS clock dividers from 4430sdp board file
      * vram.c no longer uses OMAP's sDMA to clear the memory
      * Fifomerge has been reverted
      * Swap GFX and WB fifos to avoid underflows
      6cd05430
  4. 07 Sep, 2012 26 commits
    • Tomi Valkeinen's avatar
      OMAPDSS: fix dss_ovl_unset_manager · b2f5976c
      Tomi Valkeinen authored
      When we removed fifomerge support, we also changed dss_ovl_disable so
      that it doesn't wait for the hardware to be finished with the overlay.
      This may cause a problem when changing the overlay's manager, as
      changing the manager is an immediate change. Thus if the overlay is
      still being used by the HW when the manager is changed, there may be
      glitches on the screen.
      
      This patch adds a wait into dss_ovl_unset_manager, which ensures the
      overlays are disabled in the HW.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      b2f5976c
    • Tomi Valkeinen's avatar
      OMAPDSS: fix set_timings · b82fe7f0
      Tomi Valkeinen authored
      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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      b82fe7f0
    • Tomi Valkeinen's avatar
      OMAPDSS: Use WB fifo for GFX overlay · 66a0f9e4
      Tomi Valkeinen authored
      OMAP4's GFX overlay has smaller fifo than the rest of the overlays
      (including writeback "overlay"). This seems to be the reason for
      underflows in some more demanding scenarios.
      
      We can avoid the problems by using the WB fifo for GFX overlay, and vice
      versa. WB usage is not supported yet, but when it will, it should
      perform just fine with smaller fifo as there are no hard realtime
      constraints with WB.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      66a0f9e4
    • Tomi Valkeinen's avatar
      OMAPDSS: Improve fifo management code · 42a6961c
      Tomi Valkeinen authored
      OMAP4+ allows assigning the overlay FIFOs freely, but that is not
      supported by omapdss yet. This patch takes a step forward by improving
      the fifo management to be more flexible.
      
      dispc.c is changed to keep track of the sizes of each fifo, and also the
      overlay using each fifo.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      42a6961c
    • Tomi Valkeinen's avatar
      Revert "OMAPDSS: APPLY: add fifo merge support funcs" · 85099f11
      Tomi Valkeinen authored
      This reverts commit fb011974.
      
      Adding fifo merge feature as an omapdss internal configuration was a
      mistake. We cannot hide from the users of omapdss the complexities of
      fifo merge.
      
      The previous commit removed fifo merge itself, and this removes the
      remaining fifo merge support functions.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      85099f11
    • Tomi Valkeinen's avatar
      Revert "OMAPDSS: APPLY: add fifo-merge support" · b3e93cbd
      Tomi Valkeinen authored
      This reverts commit 1d71f42b.
      
      Adding fifo merge feature as an omapdss internal configuration was a
      mistake. We cannot hide from the users of omapdss the complexities of
      fifo merge.
      
      This commit removes the fifo merge support, which luckily is easily done
      as it was handled totally inside apply.c. Note that this is not a 1:1
      revert, but some resolving was needed for the dss_ovl_setup_fifo.
      
      The plan is to try fifo merge again later when it is more clear how the
      hardware acts in various situations, and how the omapdrm wants to use
      fifo merge.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      b3e93cbd
    • Tomi Valkeinen's avatar
      OMAPDSS: clean up dss_mgr_set_timings · fed62e54
      Tomi Valkeinen authored
      dss_mgr_set_timings() can only be called when the output is not active.
      This means that most of the code in the function is extra, as there's no
      need to write the values to registers, etc, because that will be handled
      when the output will be enabled.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      fed62e54
    • Tomi Valkeinen's avatar
      OMAPDSS: clean up dss_mgr_set_lcd_config · aba96570
      Tomi Valkeinen authored
      dss_mgr_set_lcd_config() can only be called when the output is not
      active. This means that most of the code in the function is extra, as
      there's no need to write the values to registers, etc, because that will
      be handled when the output will be enabled.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      aba96570
    • Tomi Valkeinen's avatar
      OMAPDSS: split manager sysfs code · f6a0492e
      Tomi Valkeinen authored
      Separate sysfs code for managers to a separate file. This is a bit
      cleaner, and will allow us later to easily switch off the sysfs support
      via Kconfig option.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      f6a0492e
    • Tomi Valkeinen's avatar
      OMAPDSS: split overlay sysfs code · 91691516
      Tomi Valkeinen authored
      Separate sysfs code for overlays to a separate file. This is a bit
      cleaner, and will allow us later to easily switch off the sysfs support
      via Kconfig option.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      91691516
    • Tomi Valkeinen's avatar
      OMAPDSS: TFP410: use devm_gpio_request_one · a6df3fd9
      Tomi Valkeinen authored
      Use devm_ version instead of the regular gpio_request_one to simplify
      the error handling.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      a6df3fd9
    • Tomi Valkeinen's avatar
      OMAPDSS: Taal: Reogranize for device tree · f075a594
      Tomi Valkeinen authored
      Reorganize taal driver to make it easier to integrate device tree code.
      Instead of storing the panel's platform data, we'll "parse" the platform
      data and store the required information in driver's own data. This way
      adding device tree data parsing is simple.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      f075a594
    • Tomi Valkeinen's avatar
      OMAPDSS: VRAM: Remove clearing with sDMA · 5ae1f372
      Tomi Valkeinen authored
      Currently vram.c clears the allocated memory automatically using OMAP
      system DMA. In an effort to reduce OMAP dependencies, we'll do the
      memory clear with CPU from now on.
      
      The previous patch implemented memory clear in the omapfb driver, and
      this patch removes the now obsolete clear functionality from vram.c.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      5ae1f372
    • Tomi Valkeinen's avatar
      OMAPFB: clear framebuffers with CPU · ca444158
      Tomi Valkeinen authored
      Currently vram.c clears the allocated memory automatically using OMAP
      system DMA. In an effort to reduce OMAP dependencies, we'll do the
      memory clear with CPU from now on.
      
      This patch implements clearing of the framebuffer in omapfb, using
      cfb_fillrect() to do the actual clear.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      ca444158
    • Tomi Valkeinen's avatar
      OMAPDSS: remove unnecessary includes · fe6a4662
      Tomi Valkeinen authored
      Remove unnecessary includes from omapdss.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      fe6a4662
    • Tomi Valkeinen's avatar
      OMAPFB1: remove a non-used table · 10bc80f6
      Tomi Valkeinen authored
      The old omapfb driver contains a table for DMA element types, which is
      not used. Remove it.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      10bc80f6
    • Tomi Valkeinen's avatar
      OMAPFB1: remove unnecessary includes · 9586778d
      Tomi Valkeinen authored
      Remove unnecessary includes from the old omapfb driver.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      9586778d
    • Tomi Valkeinen's avatar
      OMAPDSS: Taal: use devm_* functions · 5e56ad44
      Tomi Valkeinen authored
      Use devm_ functions in panel-taal.c's probe when possible. Also reorder
      the initialization sequence so that devm_ allocations are done before
      things that require explicit freeing. This simplifies the probe and
      remove functions.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      5e56ad44
    • Tomi Valkeinen's avatar
      OMAPDSS: fix use of dssdev->caps · ab585254
      Tomi Valkeinen authored
      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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      ab585254
    • Tomi Valkeinen's avatar
      OMAP: 4430SDP: remove DSI clock config from board file · 4dc3eed4
      Tomi Valkeinen authored
      DSI clocks are now configured dynamically by the DSI driver, so we can
      remove the hardcoded clock configuration from the board file.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      4dc3eed4
    • Tomi Valkeinen's avatar
      OMAPDSS: DSI: calculate dsi clock · ee144e64
      Tomi Valkeinen authored
      Currently the way to configure clocks related to DSI (both DSI and DISPC
      clocks) happens via omapdss platform data. The reason for this is that
      configuring the DSS clocks is a very complex problem, and it's
      impossible for the SW to know requirements about things like
      interference.
      
      However, for general cases it should be fine to calculate the dividers
      for clocks in the SW. The calculated clocks are probably not perfect,
      but should work.
      
      This patch adds support to calculate the dividers when using DSI command
      mode panels. The panel gives the required DDR clock rate and LP clock
      rate, and the DSI driver configures itself and DISPC accordingly.
      
      This patch is somewhat ugly, though. The code does its job by modifying
      the platform data where the clock dividers would be if the board file
      gave them. This is not how it's going to be in the future, but allows us
      to have quite simple patch and keep the backward compatibility.
      
      It also allows the developer to still give the exact dividers from the
      board file when there's need for that, as long as the panel driver does
      not override them.
      
      There are also other areas for improvement. For example, it would be
      better if the panel driver could ask for a DSI clock in a certain range,
      as, at least command mode panels, the panel can work fine with many
      different clock speeds.
      
      While the patch is not perfect, it allows us to remove the hardcoded
      clock dividers from the board file, making it easier to bring up a new
      panel and to use device tree from omapdss.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      ee144e64
    • Tomi Valkeinen's avatar
      OMAPDSS: Add DSI fclk maximum to dss_features · bc63f304
      Tomi Valkeinen authored
      Add max value of DSI functional clock to dss_features, so that DSI
      driver can use it.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      bc63f304
    • Tomi Valkeinen's avatar
      OMAPDSS: HDMI: use vdda_hdmi_dac · 17486943
      Tomi Valkeinen authored
      The HDMI driver requires vdda_hdmi_dac power for operation, but does not
      enable it. This has worked because the regulator has been always
      enabled.
      
      But this may not always be the case, as I encountered when implementing
      HDMI device tree support.
      
      This patch changes the HDMI driver to use the vdda_hdmi_dac.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      17486943
    • Tomi Valkeinen's avatar
      OMAP4: TWL: add vdda_hdmi_dac regulator supply · 8a3d895b
      Tomi Valkeinen authored
      HDMI requires vdda_hdmi_dac (vdac) power for operation. The regulator,
      or the regulator supplying the vdac, has been enabled by default and
      things have worked without the HDMI driver enabling the vdac.
      
      I encountered the problem when implementing HDMI device tree support,
      where the regulator was not enabled by default.
      
      This patch adds the vdda_hdmi_dac to twl-common.c so that the HDMI
      driver can use it.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      8a3d895b
    • Tomi Valkeinen's avatar
      OMAPDSS: HDMI: Add delay to wait for 5V power · a84b2065
      Tomi Valkeinen authored
      TPD12S015A spec says to wait 300us after setting CT_CP_HPD gpio for the
      5V power output to reach 90% of the voltage. This patch adds the delay
      to the driver.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      a84b2065
    • Tomi Valkeinen's avatar
      OMAPDSS: HDMI: Move GPIO handling to HDMI driver · cca35017
      Tomi Valkeinen authored
      We currently manage HDMI GPIOs in the board files via
      platform_enable/disable calls. This won't work with device tree, and in
      any case the correct place to manage the GPIOs is in the HDMI driver.
      
      This patch moves the handling of the GPIOs to the HDMI driver. The GPIO
      handling is moved to the common hdmi.c file, and this probably needs to
      be revisited when adding OMAP5 HDMI support to see if the GPIO handling
      needs to be moved to IP specific files.
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      cca35017
  5. 03 Sep, 2012 1 commit
  6. 01 Sep, 2012 5 commits
  7. 30 Aug, 2012 2 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 155e36d4
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A bunch of scattered fixes ati/intel/nouveau, couple of core ones,
        nothing too shocking or different."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm: Add EDID_QUIRK_FORCE_REDUCED_BLANKING for ASUS VW222S
        gma500: Consider CRTC initially active.
        drm/radeon: fix dig encoder selection on DCE61
        drm/radeon: fix double free in radeon_gpu_reset
        drm/radeon: force dma32 to fix regression rs4xx,rs6xx,rs740
        drm/radeon: rework panel mode setup
        drm/radeon/atom: powergating fixes for DCE6
        drm/radeon/atom: rework DIG modesetting on DCE3+
        drm/radeon: don't disable plls that are in use by other crtcs
        drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700
        drm/radeon: initialize tracked CS state
        drm/radeon: fix reading CB_COLORn_MASK from the CS
        drm/nvc0/copy: check PUNITS to determine which copy engines are disabled
        i915: Quirk no_lvds on Gigabyte GA-D525TUD ITX motherboard
        drm/i915: Use the correct size of the GTT for placing the per-process entries
        drm: Check for invalid cursor flags
        drm: Initialize object type when using DRM_MODE() macro
        drm/i915: fix color order for BGR formats on IVB
        drm/i915: fix wrong order of parameters in port checking functions
      155e36d4
    • Heiko Carstens's avatar
      s390/32: Don't clobber personality flags on exec · 768fd073
      Heiko Carstens authored
      In native 32 bit mode the personality flags were not correctly inherited.
      This is the s390 version of 59e4c3a2 "powerpc/32: Don't clobber personality
      flags on exec".
      Reported-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      768fd073