1. 17 6月, 2015 7 次提交
    • T
      OMAPDSS: DISPC: check if scaling setup failed · 3ce17b48
      Tomi Valkeinen 提交于
      The DISPC's scaling code seems to presume that decimation always
      succeeds, and so we always do find a suitable downscaling setup.
      However, this is not the case, and the algorithm can fail.
      
      When that happens, the code just proceeds with wrong results, causing
      issues later.
      
      Add the necessary checks to bail out if the scaling algorithm failed.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3ce17b48
    • T
      OMAPDSS: DISPC: fix 64 bit issue in 5-tap · c582935c
      Tomi Valkeinen 提交于
      The DISPC driver uses 64 bit arithmetic to calculate the required clock
      rate for scaling. The code does not seem to work correctly, and instead
      calculates with 32 bit numbers, giving wrong result.
      
      Fix the code by typecasting values to u64 first, so that the
      calculations do happen in 64 bits.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c582935c
    • T
      OMAPDSS: DISPC: fix row_inc for OMAP3 · f2aee319
      Tomi Valkeinen 提交于
      pixel_inc and row_inc work differently on OMAP2/3 and OMAP4+ DSS. On
      OMAP2/3 DSS, the pixel_inc is _not_ added by the HW at the end of the
      line, after the last pixel, whereas on OMAP4+ it is.
      
      The driver currently works for OMAP4+, but does not handle OMAP2/3
      correctly, which leads to tilted image when row_inc is used.
      
      This patch adds a flag to DISPC driver so that the pixel_inc is added
      when required.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f2aee319
    • T
      OMAPDSS: DISPC: add check for scaling limits · ab6b2582
      Tomi Valkeinen 提交于
      On OMAP3/AM43xx some scaling factors cause underflows/synclosts. After
      studying this, I found that sometimes the driver uses three-tap scaling
      with downscaling factor smaller than x0.5. This causes issues, as x0.5
      is the limit for three-tap scaling.
      
      The driver has FEAT_PARAM_DOWNSCALE parameter, but that seems to be for
      five-tap scaling, which allows scaling down to x0.25.
      
      This patch adds checks for both horizontal and vertical scaling. For
      horizontal the HW always uses 5 taps, so the limit is x0.25.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ab6b2582
    • T
      OMAPDSS: DISPC: fix check_horiz_timing_omap3 args · f5a73482
      Tomi Valkeinen 提交于
      After calculating the required decimation for scaling, the dispc driver
      checks once more if the resulting configuration is valid by calling
      check_horiz_timing_omap3().
      
      Earlier calls to this function have correctly used in_width and
      in_height as parameters, but the last call uses width and height. This
      causes the driver to possibly reject scaling that would work.
      
      This patch fixes the parameters.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      f5a73482
    • T
      OMAPDSS: DISPC: fix predecimation for YUV modes · c4661b33
      Tomi Valkeinen 提交于
      DISPC needs even input buffer width for YUV modes. The DISPC driver
      doesn't check this at the moment (although omapdrm does), but worse,
      when DISPC driver does x predecimation the result may be uneven. This
      causes sometimes sync losts, underflows, or just visual errors.
      
      This patch makes DISPC driver return an error if the user gives uneven
      input width for a YUV buffer. It also makes the input width even in case
      of predecimation.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c4661b33
    • T
      OMAPDSS: DISPC: work-around for errata i631 · 3397cc6a
      Tomi Valkeinen 提交于
      Errata i631 description:
      
      "When in YUV4:2:0 format in 1D burst, the DISPC DMA skips lines when
      fetching Chroma sampling."
      
      Workaround:
      
      "If YUV4:2:0-1D burst is required: Set
      DISPC_VIDp_ATTRIBUTES[22]DOUBLESTRIDE to 0x0 and
      DISPC_VIDp_ATTRIBUTES[13:12]ROTATION to 0x1 or 0x3"
      
      The description is somewhat confusing, but testing has shown that DSS
      fetches extra rows from memory when using NV12 format in 1D mode. If the
      memory after the framebuffer is inaccessible, this leads to OCP errors.
      
      The driver always uses DOUBLESTRIDE=0 when using 1D mode, so we only
      need to handle the ROTATION part.
      
      The issue exist on all OMAP4 and OMAP5 based DSS IPs.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      3397cc6a
  2. 20 4月, 2015 2 次提交
  3. 26 2月, 2015 10 次提交
    • T
      OMAPDSS: workaround for MFLAG + NV12 issue · fe59e5cf
      Tomi Valkeinen 提交于
      It was found that having two displays enabled and having an NV12 overlay
      on one of the displays will cause underflows/synclosts. Debugging this
      pointed to some issue with MFLAG.
      
      It is unclear why this issue is happening, but it looks like there is a
      HW bug related to MFLAG and FIFO management. Disabling MFLAG makes this
      issue go away, but then we lose the benefit of MFLAG. Also forcing MFLAG
      always on makes the issue go away.
      
      Also, using certain values for MFLAG_START, MFLAG thresholds and PRELOAD
      makes the issue go away, but there was no obvious logic to which values
      work and which don't.
      
      As a workaround until more information about this is found, force MFLAG
      always on to make NV12 usable.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      fe59e5cf
    • T
      OMAPDSS: Add support for MFLAG · c64aa3a6
      Tomi Valkeinen 提交于
      OMAP5 has support for MFLAG feature, which allows DSS to dynamically
      increase the priority of DISPC's DMA traffic. At the moment we don't
      have support for it.
      
      It was noticed that on DRA7 with high bandwidth use cases we see FIFO
      underflows. Implementing MFLAG support removed those underflows.
      Interestingly, on OMAP5 uEVM no such overflows were seen.
      
      This patch adds a simple MFLAG implementation, where we use a fixed
      MFLAG threshold value based on the FIFO size. The thresholds are set to
      4/8 of fifo size for low threshold, and 5/8 of fifo size for high
      threshold.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      c64aa3a6
    • T
      OMAPDSS: setup default fifo thresholds · 47fc469b
      Tomi Valkeinen 提交于
      At the moment we don't setup FIFO thresholds by default in omapdss. It's
      supposed to be done by the user of omapdss. And that is missing from
      omapdrm, causing unoptimal thresholds to be used when using omapdrm.
      
      While I believe it's in theory better to allow the user of omapdss to
      setup the fifo thresholds, in practice we always use the same values,
      and we could as well setup the thresholds in omapdss.
      
      Furthermore, in omapdss init we always swap the FIFO used for GFX and WB
      overlays, but we don't swap the FIFO thresholds for those overlays
      (which is the reason for omapdrm using unoptimal HW reset values). So
      it would make sense to setup the thresholds to account for the swapping
      of the FIFOs.
      
      So, this patch adds code to setup default FIFO tresholds at omapdss
      init.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      47fc469b
    • T
      OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG · d49cd155
      Tomi Valkeinen 提交于
      Dispc driver presumes that the callers handle locking for all normal
      functions. However, omapdrm doesn't handle this, and presumes that all
      overlay manager registers are private to that overlay manager, and thus
      presumes that configurations for overlay managers can be written via
      different threads freely.
      
      For many registers the above is true. The exceptions are DISPC_CONTROL
      and DISPC_CONFIG registers, which contain bits for both LCD and TV
      overlay managers.
      
      Fixing this properly in omapdrm means a big omapdrm rewrite. So, for
      now, add locking to dispc for the problematic registers.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reported-by: NSomnath Mukherjee <somnath@ti.com>
      d49cd155
    • T
      OMAPDSS: DISPC: fix div by zero issue in overlay scaling · 4e1d3ca0
      Tomi Valkeinen 提交于
      omapdrm doesn't always configure the overlays correctly, causing the
      overlay setup functions to be called with zero timings. This leads to
      division by zero error.
      
      This happens, for example, when a HDMI cable is not connected, but a
      user tries to setup a plane with scaling.
      
      Fixing omapdrm is a big job, so for now let's check for the bad timings
      in DISPC and return an error.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      4e1d3ca0
    • T
      OMAPDSS: DISPC: change sync_pclk_edge default value · 386f167c
      Tomi Valkeinen 提交于
      The common 'struct videomode' does not have a flag to select when the
      sync signals should be driven.
      
      The default behavior of DISPC HW is to drive the sync signal on the
      opposite pixel clock edge from data signal, which is also what the
      videomode_to_omap_video_timings() uses.
      
      However, it looks like what panels usually expect is that the data and
      sync signals are driven on the same edge, so let's change
      videomode_to_omap_video_timings() to set the sync_pclk_edge accordingly.
      
      Note that this only affect panels drivers that use
      videomode_to_omap_video_timings(), probably when getting the video
      timings directly from DT data. The drivers can still configure the
      sync_pclk_edge independently if they so wish.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      386f167c
    • T
      OMAPDSS: DISPC: explicit handling for sync and de levels · ed351881
      Tomi Valkeinen 提交于
      When configuring the lcd timings, instead of writing enum values
      directly to the HW, use switch-case to get the value to be programmed.
      
      This is safer and also allows us to change the enum values.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ed351881
    • T
      OMAPDSS: DISPC: remove OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES · 7a16360d
      Tomi Valkeinen 提交于
      DISPC can drive data lines either on rising or falling pixel clock edge,
      which can be configured by the user.
      
      Sync lines can also be driven on rising or falling pixel clock edge, but
      additionally the HW can be configured to drive the sync lines on
      opposite clock edge from the data lines.
      
      This opposite edge setting does not make any sense, as the same effect
      can be achieved by just setting the sync lines to be driven on the other
      edge compared to the data lines. It feels like some kind of backward
      compatibility option, even if all DSS versions seem to have the same
      implementation.
      
      To simplify the code and configuration of the signals, and to make the
      dispc timings more compatible with what is used on other platforms,
      let's just remove the whole opposite-edge support.
      
      The drivers that used OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES setting are
      changed so that they use the opposite setting from the data edge.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      7a16360d
    • T
      OMAPDSS: fix paddr check for TILER addresses · e566658f
      Tomi Valkeinen 提交于
      The DISPC driver checks that the buffer address is not 0. However, when
      using TILER, the address space is TILER specific and 0 is a valid
      address.
      
      Fix the check to allow address of 0 for TILER.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Reported-by: Nsrinivas pulukuru <srinivas.pulukuru@ti.com>
      e566658f
    • T
      OMAPDSS: fix regression with display sysfs files · a38bb793
      Tomi Valkeinen 提交于
      omapdss's sysfs directories for displays used to have 'name' file,
      giving the name for the display. This file was later renamed to
      'display_name' to avoid conflicts with i2c sysfs 'name' file. Looks like
      at least xserver-xorg-video-omap3 requires the 'name' file to be
      present.
      
      To fix the regression, this patch creates new kobjects for each display,
      allowing us to create sysfs directories for the displays. This way we
      have the whole directory for omapdss, and there will be no sysfs file
      clashes with the underlying display device's sysfs files.
      
      We can thus add the 'name' sysfs file back.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Tested-by: NNeilBrown <neilb@suse.de>
      a38bb793
  4. 25 2月, 2015 2 次提交
  5. 23 2月, 2015 1 次提交
  6. 04 2月, 2015 11 次提交
  7. 30 12月, 2014 1 次提交
  8. 29 12月, 2014 2 次提交
  9. 04 12月, 2014 1 次提交
  10. 02 12月, 2014 1 次提交
  11. 01 12月, 2014 2 次提交