1. 02 1月, 2012 1 次提交
    • C
      OMAPDSS: DISPC: Update Scaling Clock Logic · 7282f1b7
      Chandrabhanu Mahapatra 提交于
      Clock requirements for scaling in OMAP2, OMAP3 and OMAP4 are different. In
      OMAP2 and OMAP3 the required clock rate is a function of pixel clock, vertical
      downscale ratio and horizontal downscale ratio whereas in OMAP4 it is a
      function of pixel clock and horizontal downscale ratio only. Selection of 3-tap
      vs 5-tap coefficients depends on clock rate line buffer width in OMAP3 whereas
      in OMAP4 it is independent of clock rate and line buffer width. In OMAP2 3-tap
      for vertical and 5-tap for horizontal scaling is used. In OMAP4 5-tap is used
      both for horizontal and vertical scaling for better performance. Also, the
      number and width of line buffers differs in OMAP3 and OMAP4.
      
      So, clock functions have been fined tuned for OMAP3 and support has been added
      added for OMAP4. This code has been tested on OMAP2, OMAP3 and OMAP4, and
      scaling issues due to clock errors have been resolved.
      Signed-off-by: NChandrabhanu Mahapatra <cmahapatra@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      7282f1b7
  2. 03 10月, 2011 2 次提交
    • A
      OMAPDSS: DISPC: VIDEO3 pipeline support · b8c095b4
      Archit Taneja 提交于
      Add support for VIDEO3 pipeline on OMAP4:
      - Add VIDEO3 pipeline information in dss_features and omapdss.h
      - Add VIDEO3 pipeline register coefficients in dispc.h
      - Create a new overlay structure corresponding to VIDEO3.
      - Make changes in dispc.c for VIDEO3
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      b8c095b4
    • A
      OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting · 11354dd5
      Archit Taneja 提交于
      On OMAP3, in order to enable alpha blending for LCD and TV managers, we needed
      to set LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits in DISPC_CONFIG. On
      OMAP4, alpha blending is always enabled by default, if the above bits are set,
      we switch to an OMAP3 compatibility mode where the zorder values in the pipeline
      attribute registers are ignored and a fixed priority is configured.
      
      Rename the manager_info member "alpha_enabled" to "partial_alpha_enabled" for
      more clarity. Introduce two dss_features FEAT_ALPHA_FIXED_ZORDER and
      FEAT_ALPHA_FREE_ZORDER which represent OMAP3-alpha compatibility mode and OMAP4
      alpha mode respectively. Introduce an overlay cap for ZORDER. The DSS2 user is
      expected to check for the ZORDER cap, if an overlay doesn't have this cap, the
      user is expected to set the parameter partial_alpha_enabled. If the overlay has
      ZORDER cap, the DSS2 user can assume that alpha blending is already enabled.
      
      Don't support OMAP3 compatibility mode for now. Trying to read/write to
      alpha_blending_enabled sysfs attribute issues a warning for OMAP4 and does not
      set the LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits.
      
      Change alpha_enabled to partial_alpha_enabled in the omap_vout driver. Use
      overlay cap "OMAP_DSS_OVL_CAP_GLOBAL_ALPHA" to check if overlay supports alpha
      blending or not. Replace this with checks for VIDEO1 pipeline.
      
      Cc: linux-media@vger.kernel.org
      Cc: Lajos Molnar <molnar@ti.com>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Acked-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      11354dd5
  3. 30 9月, 2011 5 次提交
  4. 01 7月, 2011 3 次提交
    • T
      OMAP: DSS2: Fix FIFO threshold and burst size for OMAP4 · 5ed8cf5b
      Tomi Valkeinen 提交于
      The DMA FIFO threshold registers and burst size registers have changed
      for OMAP4.  The current code only handles OMAP2/3 case, and so the
      values are a bit off for OMAP4.  A summary of the differences between
      OMAP2/3 and OMAP4:
      
      Burst size:
      OMAP2/3: 4 x 32 bits / 8 x 32 bits / 16 x 32 bits
      OMAP4: 2 x 128 bits / 4 x 128 bits / 8 x 128 bits
      
      Threshold size:
      OMAP2/3: in bytes (8 bit units)
      OMAP4: in 128bit units
      
      This patch fixes the issue by creating two new helper functions in
      dss_features: dss_feat_get_buffer_size_unit() and
      dss_feat_get_burst_size_unit(). These return (in bytes) the unit size
      for threshold registers and unit size for burst size register,
      respectively, and are used to calculate correct values.
      
      For the threshold size the usage is straightforward. However, the burst
      size register has different multipliers for OMAP2/3 and OMAP4. This
      patch solves the problem by defining the multipliers for the burst size
      as 2x, 4x and 8x, which fit fine for the OMAP4 burst size definition
      (i.e. burst size unit for OMAP4 is 128bits), but requires a slight twist
      on OMAP2/3 by defining the burst size unit as 64bit.
      
      As the driver in practice always uses the maximum burst size, and no use
      case currently exists where we would want to use a smaller burst size,
      this patch changes the driver to hardcode the burst size when
      initializing DISPC. This makes the threshold configuration code somewhat
      simpler.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5ed8cf5b
    • T
      OMAP: DSS2: Add new FEAT definitions for features missing from OMAP2 · 332e9d70
      Tomi Valkeinen 提交于
      OMAP2 doesn't have CPR, PRELOAD nor FIR_COEF_V registers. Add new
      feature definitions for those, and check the feature before accessing
      those registers.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      332e9d70
    • T
      OMAP: DSS2: Add FEAT_VENC_REQUIRES_TV_DAC_CLK · 525dae61
      Tomi Valkeinen 提交于
      OMAP3430 requires an 96MHz clock to VENC's DAC, but no other OMAP needs
      it.
      
      Add a new feature, FEAT_VENC_REQUIRES_TV_DAC_CLK, which tells if the
      clock is needed on this platform, and use that feature in venc.c to
      decide if the clock needs enabling.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      525dae61
  5. 23 5月, 2011 1 次提交
    • A
      OMAP: DSS2: Add new registers for NV12 support · ab5ca071
      Amber Jain 提交于
      Add new registers specific to UV color component that are introduced in OMAP4.
      Add simple helper functions to configure the newly added registers.
      These new registers are mainly:
      - UV base address registers used specifically for NV12 color-format
      - FIR registers used for UV-color-component scaling on OMAP4
      - Accumulator registers used for UV-color-component scaling
      Add these new registers to save/restore and DUMPREG functions.
      Also add two new features for OMAP4:
      - FEAT_HANDLE_UV_SEPARATE - this is used on OMAP4 as UV color-component requires
        separate handling.
      - FEAT_ATTR2 - this is used on OMAP4 to configure new ATTRIBUTES2 register.
      Signed-off-by: NAmber Jain <amber@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ab5ca071
  6. 19 5月, 2011 1 次提交
  7. 16 5月, 2011 1 次提交
    • A
      OMAP: DSS2: DSI: Get number of DSI data lanes using DSI_GNQ register · 75d7247c
      Archit Taneja 提交于
      On OMAP3, the DSI module has 2 data lanes. On OMAP4, DSI1 has 4 data lanes
      and DSI2 has 2 data lanes. Introduce function dsi_get_num_data_lanes() which
      returns the number of data lanes on the dsi interface, introduce function
      dsi_get_num_data_lanes_dssdev() which returns the number of data lanes used by
      the omap_dss_device connected to the lanes.
      
      Use the DSI_GNQ register on OMAP4 to get the number of data lanes, modify
      dsi.c to use the number of lanes and the extra data lanes on DSI1.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      75d7247c
  8. 13 5月, 2011 1 次提交
    • A
      OMAP: DSS2: Pass platform_device as an argument in dsi functions · a72b64b9
      Archit Taneja 提交于
      The DSI interface is represented as a platform device, using the DSI platform
      driver(dsi.c). The current DSI driver design is capable of running only one
      instance of a DSI device. On OMAP4, there are 2 very similar DSI modules which
      can be represented as instances of "omapdss_dsi" platform device.
      
      Add member "module" in "dssdev.phy.dsi" that tells us which DSI module's lanes
      the panel is connected to. Modify dsi.c functions to take the device's
      platform_device struct pointer, provide functions dsi_get_dsidev_from_dssdev()
      and dsi_get_dsidev_from_id() take the panel's omap_dss_device and module number
      respectively, and return the platform_device pointer. Currently, the dsi struct
      is declared globally and is accessed when dsi data is needed. The new pdev
      argument will be used later to provide the platform device's dsi related data.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      a72b64b9
  9. 11 5月, 2011 5 次提交
  10. 15 4月, 2011 1 次提交
  11. 15 3月, 2011 2 次提交
  12. 11 3月, 2011 5 次提交
    • T
      OMAP4: DSS2: Clock source changes for OMAP4 · ea75159e
      Taneja, Archit 提交于
      On OMAP3, the pixel clock for the LCD manager was derived through DISPC_FCLK as:
      
      Lcd Pixel clock = DISPC_FCLK / lcd / pcd
      
      Where lcd and pcd are divisors in the DISPC_DIVISOR register.
      
      On OMAP4, the pixel clocks for LCD1 and LCD2 managers are derived from 2 new
      clocks named LCD1_CLK and LCD2_CLK. The pixel clocks are calculated as:
      
      Lcd_o Pixel clock = LCDo_CLK / lcdo /pcdo, o = 1, 2
      
      Where lcdo and pcdo registers are divisors in DISPC_DIVISORo registers.
      
      LCD1_CLK and LCD2_CLK can have DSS_FCLK, and the M4 divider clocks of DSI1 PLL
      and DSI2 PLL as clock sources respectively. Introduce functions to select and
      get the clock source for these new clocks. Modify DISPC functions get the
      correct lck and pck rates based on the clock source of these clocks. Since
      OMAP2/3 don't have these clocks, force OMAP2/3 to always have the LCD_CLK source
      as DSS_CLK_SRC_FCK by introducing a dss feature.
      
      Introduce clock source names for OMAP4 and some register field changes in
      DSS_CTRL on OMAP4.
      
      Currently, LCD2_CLK can only have DSS_FCLK as its clock source as DSI2 PLL
      functionality hasn't been introduced yet. BUG for now if DSI2 PLL is selected as
      clock.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      ea75159e
    • M
      OMAP: DSS2: Adding dss_features for independent core clk divider · 5c6366e1
      Murthy, Raghuveer 提交于
      In OMAP3xxx DISPC_DIVISOR register has a logical clock divisor (lcd_div)
      field. The lcd_div is common, for deciding the DISPC core functional clock
      frequency, and the final pixel clock frequency for LCD display.
      
      In OMAP4, there are 2 LCD channels, hence two divisor registers, DISPC_DIVISOR1
      and DISPC_DIVISOR2. Also, there is a third register DISPC_DIVISOR.
      
      The DISPC_DIVISOR in OMAP4 is used to configure lcd_div exclusively for core
      functional clock configuration. For pixel clock configuration of primary and
      secondary LCDs, lcd_div of DISPC_DIVISOR1 and DISPC_DIVISOR2 are used
      respectively
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NRaghuveer Murthy <raghuveer.murthy@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      5c6366e1
    • A
      OMAP2PLUS: DSS2: Use dss features to get clock source names of current OMAP · 067a57e4
      Archit Taneja 提交于
      Clock source names vary across OMAP2/3 and OMAP4, the clock source enum
      names have been made generic in the driver, but for purposes of debugging
      and dumping clock sources, it is better to preserve the actual TRM name of
      the clock.
      
      Introduce a dss feature function 'dss_feat_get_clk_source_name()' which
      returns a string with the TRM clock name for the current OMAP in use. The OMAP
      specific name is printed along the generic name within brackets.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      067a57e4
    • A
      OMAP2PLUS: DSS2: FEATURES: Function to Provide the max fck supported · 819d807c
      Archit Taneja 提交于
      The maximum supported frequency for DSS has increased from 173 to 186 Mhz on
      OMAP4.
      
      Introduce a dss feature function to get the max_fck to replace DISPC_MAX_FCK
      macro.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      819d807c
    • A
      OMAP2PLUS: DSS2: FEATURES: DISPC overlay code cleanup · 87a7484b
      Archit Taneja 提交于
      Add dss_features and register fields to incorporate changes in DISPC pipelines
      between OMAP3 and OMAP4.
      
      Register fields added: FEAT_REG_HORIZONTALACCU, FEAT_REG_VERTICALACCU
      DSS Features added: FEAT_LINEBUFFERSPLIT, FEAT_ROWREPEATENABLE, FEAT_RESIZECONF
      
      _dispc_set_scaling() and _dispc_set_rotation_attrs() have been cleaned up.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      87a7484b
  13. 10 1月, 2011 3 次提交
  14. 23 10月, 2010 1 次提交