1. 16 6月, 2017 1 次提交
  2. 07 4月, 2017 1 次提交
  3. 15 2月, 2017 1 次提交
  4. 07 2月, 2017 5 次提交
  5. 29 11月, 2016 1 次提交
    • R
      drm/msm: convert iova to 64b · 78babc16
      Rob Clark 提交于
      For a5xx the gpu is 64b so we need to change iova to 64b everywhere.  On
      the display side, iova is still 32b so it can ignore the upper bits.
      (Although all the armv8 devices have an iommu that can map 64b pa to 32b
      iova.)
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      78babc16
  6. 02 11月, 2016 1 次提交
  7. 16 7月, 2016 5 次提交
    • W
      drm/msm/dsi: Fix return value check in msm_dsi_host_set_display_mode() · 2abe1f25
      Wei Yongjun 提交于
      In case of error, the function drm_mode_duplicate() returns NULL
      pointer not ERR_PTR(). The IS_ERR() test in the return value check
      should be replaced with NULL test.
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Reviewed-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      2abe1f25
    • R
      drm/msm: change gem->vmap() to get/put · 18f23049
      Rob Clark 提交于
      Before we can add vmap shrinking, we really need to know which vmap'ings
      are currently being used.  So switch to get/put interface.  Stubbed put
      fxns for now.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      18f23049
    • A
      drm/msm/dsi: Don't get DSI index from DT · 32280d66
      Archit Taneja 提交于
      The DSI host and PHY driver currently expects the DT bindings to provide
      custom properties "qcom,dsi-host-index" and "qcom,dsi-phy-index" so that
      the driver can identify which DSI instance it is.
      
      The binding isn't acceptable, but the driver still needs to figure out
      what its instance id. This is now done by storing the mmio starting
      addresses for each DSI instance in every SoC version in the driver. The
      driver then identifies the index number by trying to match the stored
      address with comparing the resource start address we get from DT.
      
      We don't have compatible strings for DSI PHY on each SoC, but only the
      DSI PHY type. We only support one SoC version for each PHY type, so we
      get away doing the same thing above for the PHY driver. We can revisit
      this when we support two SoCs with the same DSI PHY.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      32280d66
    • A
      drm/msm/dsi: Use a standard DT binding for data lanes · 60282cea
      Archit Taneja 提交于
      A more standard DT binding describing data lanes already exists here:
      Documentation/devicetree/bindings/media/video-interfaces.txt
      
      Use this binding instead of "qcom,data-lane-map". One difference
      in the standard binding w.r.t to the existing binding is that it
      provides a logical to physical mapping instead of the other way
      round. Tweak the code to translate the data the way we want it.
      
      The MSM DSI DT bindings aren't used anywhere at the moment, so
      it's okay to update this property.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      60282cea
    • A
      drm/msm/dsi: Modify port parsing · b9ac76f6
      Archit Taneja 提交于
      The DSI interface is going to have two ports defined in its device node.
      The first port is always going to be the link between the MDP output
      and the input to DSI, the second port is going to be the link between
      the DSI output and the connected panel/bridge:
      
       -----           -----           -------
      | MDP | ------> | DSI | ------> | Panel |
       -----           -----           -------
              (Port 0)       (Port 1)
      
      Until now, there was only one Port representing the output. Update the
      DSI host driver such that it parses Port #1 for a connected device.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      b9ac76f6
  8. 08 5月, 2016 1 次提交
    • A
      drm/msm/dsi: Fix regulator API abuse · f377d597
      Archit Taneja 提交于
      The voltage changing code in this driver is broken and should be
      removed.  The driver sets a single, exact voltage on probe.  Unless
      there is a very good reason for this (which should be documented in
      comments) constraints like this need to be set via the machine
      constraints, voltage setting in a driver is expected to be used in cases
      where the voltage varies at runtime.
      
      In addition client drivers should almost never be calling
      regulator_can_set_voltage(), if the device needs to set a voltage it
      needs to set the voltage and the regulator core will handle the case
      where the regulator is fixed voltage.  If the driver simply skips
      setting the voltage if it doesn't have permission then it should just
      not bother in the first place.
      
      Originally authored by Mark Brown <broonie@kernel.org>
      
      Remove the min/max voltage data entries per SoC managed by the driver.
      These aren't needed as we don't try to set voltages any more. Mention in
      comments the voltages that each regulator expects.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      f377d597
  9. 04 3月, 2016 1 次提交
    • A
      drm/msm/dsi: Parse DSI lanes via DT · 26f7d1f4
      Archit Taneja 提交于
      The DSI driver is currently unaware of how the DSI physical data lanes
      are mapped to the logical lanes provided by the DSI controller.
      
      Create a DT binding "qcom,data-lane-map" that provides this information
      on a given platform.
      
      The MSM DSI controller is restricted in terms of what all mappings
      it can support. The lane polarity is fixed for all the lanes, the clock
      lanes are fixed, and the data lanes can be swapped among each other only
      for a few combinations. Apply these restrictions when we parse the DT
      data.
      
      Cc: devicetree@vger.kernel.org
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Acked-by: NRob Herring <robh@kernel.org>
      26f7d1f4
  10. 03 3月, 2016 1 次提交
  11. 15 12月, 2015 1 次提交
  12. 14 12月, 2015 7 次提交
    • A
      drm/msm/dsi: Enable MMSS SPFB port via syscon · 0c7df47f
      Archit Taneja 提交于
      For DSIv2 to work, we need to enable MMSS_AHB_ARB_MASTER_PORT in
      MMSS_SFPB. We enable the required bitfield by retrieving MMSS_SFPB
      regmap pointer via syscon.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0c7df47f
    • A
      drm/msm/dsi: Don't use iommu for command TX buffer for DSIv2 · 4ff9d4cb
      Archit Taneja 提交于
      We currently use iommu allocated DMA buffers for sending DSI commands.
      DSIv2 doesn't have a port connected to the MDP iommu. Therefore, it
      can't use iommu allocated buffers to fetch DSI commands.
      
      Use a regular contiguous DMA buffer if we are DSIv2.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4ff9d4cb
    • A
      drm/msm/dsi: Set up link clocks for DSIv2 · 4bfa9748
      Archit Taneja 提交于
      DSIv2 (DSI on older A family chips) has slightly different link clock
      requirements.
      
      First, we have an extra clock called src_clk (with a dedicated RCG).
      This is required by the DSI controller to process the pixel data
      coming from MDP. It needs to be set at the rate "pclk * bytes_per_pixel".
      
      We also need to explicitly configure esc_clk. On DSI6G chips, we don't
      need to set a rate to esc_clk because its RCG is always sourced from
      crystal clock (19.2 Mhz in all cases), which is within the escape clock
      frequency range in the mipi DSI spec. For chips with DSIv2, the crystal
      clock rate may not be within the required range (27Mhz on APQ8064).
      Therefore, we derive it from the DSI byte clock. We calculate an esc_clck
      rate that is within the mipi spec and also divisible by the byte clock
      rate.
      
      When setting rate and enabling the link clocks, we make sure that byte_clk
      is configured before esc_clk, and src_clk before pixel_clk. We create two
      different link_enable funcs for DSI6G and DSIv2 since the sequences are
      different.
      
      We also obtain two extra source clocks (dsi_src_clk and esc_src_clk) and
      set their parent to the clocks provided by DSI PLL.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4bfa9748
    • A
      drm/msm/dsi: Parse bus clocks from a list · 6e0eb52e
      Archit Taneja 提交于
      DSI bus clocks seem to vary between different DSI host versions, and the
      SOC to which they belong. Even the enable/disable sequence varies.
      
      Provide a list of bus clock names in dsi_cfg. The driver will use this to
      retrieve the clocks, and enable/disable them.
      
      Add bus clock lists for DSI6G, and DSI for MSM8916(this is DSI6G too, but
      there is no MMSS_CC specific clock since there is no MMSS clock controller
      on 8916).
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6e0eb52e
    • A
      drm/msm/dsi: Delay dsi_clk_init · 31c92767
      Archit Taneja 提交于
      Initialize clocks only after we get the DSI host version. This will allow
      us to get clocks using a pre-defined list based on the DSI major/minor
      version of the host. This is required since clock requirements of
      different major DSI revisions(v2 vs 6g) aren't the same.
      
      Modify dsi_get_version to get the interface clock, and then put it after
      it is used.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      31c92767
    • A
      drm/msm/dsi: Use a better way to figure out DSI version · 648d5063
      Archit Taneja 提交于
      The current version checking mechanism works fine for DSI6G blocks. It
      doesn't work so well for older generation DSIv2 blocks.
      
      The initial read of REG_DSI_6G_HW_VERSION(offset 0x0) would result in a
      read of REG_DSI_CTRL for DSIv2. This register won't necessarily be 0 on
      DSIv2. It can be non zero if DSI was previously initialized by the
      bootloader.
      
      Instead of reading offset 0x0, we now read offset 0x1f0. For DSIv2, this
      register is DSI_VERSION, and is bound to be non-zero. On DSI6G, this
      register(offset 0x1f0) is SCRATCH_REGISTER_0, which no one ever seems to
      touch, and from all register dumps I'vc seen, holds 0 all the time.
      
      Modify dsi_get_version to read REG_DSI_VERSION to determine whether we
      are DSI6G or DSIv2.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      648d5063
    • A
      drm/msm/dsi: Don't get byte/pixel source clocks from DT · e6c4c78c
      Archit Taneja 提交于
      We retrieve the byte and pixel source clocks (RCG clocks) in the dsi
      driver via DT. These are needed so that we can re-parent these source
      clocks if we want to drive it using a different DSI PLL.
      
      We shouldn't get these via DT because they aren't clocks that directly
      serve as inputs to the dsi host.
      
      Fortunately, there is a static parent-child link between the
      byte_clk_src/pixel_clk_src and byte_clk/pixel_clk clocks. So, we can
      retrieve the source clocks via clk_get_parent.
      
      Do this instead of retrieving via DT.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e6c4c78c
  13. 23 10月, 2015 1 次提交
  14. 16 8月, 2015 9 次提交
  15. 12 6月, 2015 4 次提交
    • B
      drm/msm: dsi: fix compile errors when CONFIG_GPIOLIB=n · 964a0754
      Brian Norris 提交于
      I'm not sure where, exactly, but somewhere in here we must be relying on
      an implicit include.
      
      drivers/gpu/drm/msm/dsi/dsi_host.c: In function ‘dsi_host_init_panel_gpios’:
      drivers/gpu/drm/msm/dsi/dsi_host.c:1356:2: error: implicit declaration of function ‘devm_gpiod_get’ [-Werror=implicit-function-declaration]
        msm_host->disp_en_gpio = devm_gpiod_get(panel_device,
        ^
      drivers/gpu/drm/msm/dsi/dsi_host.c:1356:25: warning: assignment makes pointer from integer without a cast [enabled by default]
        msm_host->disp_en_gpio = devm_gpiod_get(panel_device,
                               ^
      drivers/gpu/drm/msm/dsi/dsi_host.c:1364:3: error: implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration]
         ret = gpiod_direction_output(msm_host->disp_en_gpio, 0);
         ^
      drivers/gpu/drm/msm/dsi/dsi_host.c:1371:20: warning: assignment makes pointer from integer without a cast [enabled by default]
        msm_host->te_gpio = devm_gpiod_get(panel_device, "disp-te");
                          ^
      drivers/gpu/drm/msm/dsi/dsi_host.c:1378:3: error: implicit declaration of function ‘gpiod_direction_input’ [-Werror=implicit-function-declaration]
         ret = gpiod_direction_input(msm_host->te_gpio);
         ^
      drivers/gpu/drm/msm/dsi/dsi_host.c: In function ‘msm_dsi_host_power_on’:
      drivers/gpu/drm/msm/dsi/dsi_host.c:1918:3: error: implicit declaration of function ‘gpiod_set_value’ [-Werror=implicit-function-declaration]
         gpiod_set_value(msm_host->disp_en_gpio, 1);
         ^
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Hai Li <hali@codeaurora.org>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      964a0754
    • U
      drm/msm: use devm_gpiod_get_optional for optional reset gpio · 9590e69d
      Uwe Kleine-König 提交于
      Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions)
      which appeared in v3.17-rc1, the gpiod_get* functions take an additional
      parameter that allows to specify direction and initial value for output.
      
      Also there is a variant to find optional gpios that returns NULL if
      there is no gpio instead of -ENOENT.
      
      Make use of both features to simplify the driver.
      
      This makes error checking more strict because errors like -ENOSYS ("no
      gpio support compiled in") or -EPROBE_DEFER ("gpio not ready yet") are
      handled correctly now.
      
      Furthermore this is one caller less that stops us making the flags
      argument to gpiod_get*() mandatory.
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      9590e69d
    • H
      drm/msm/dsi: Separate PHY to another platform device · ec31abf6
      Hai Li 提交于
      There are different types of PHY from one chipset to another, while
      the DSI host controller is relatively consistent across platforms.
      Also, the PLL inside PHY is providing the source of DSI byte and
      pixel clocks, which are used by DSI host controller. Separated devices
      for clock provider and clock consumer make DSI driver better fit into
      common clock framework.
      Signed-off-by: NHai Li <hali@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ec31abf6
    • H
      drm/msm/dsi: Enable PLL driver in MSM DSI · 9d32c498
      Hai Li 提交于
      This change activates PLL driver for DSI to work with
      common clock framework.
      Signed-off-by: NHai Li <hali@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      9d32c498