1. 13 10月, 2017 4 次提交
  2. 12 10月, 2017 3 次提交
  3. 14 9月, 2017 1 次提交
    • M
      mm: treewide: remove GFP_TEMPORARY allocation flag · 0ee931c4
      Michal Hocko 提交于
      GFP_TEMPORARY was introduced by commit e12ba74d ("Group short-lived
      and reclaimable kernel allocations") along with __GFP_RECLAIMABLE.  It's
      primary motivation was to allow users to tell that an allocation is
      short lived and so the allocator can try to place such allocations close
      together and prevent long term fragmentation.  As much as this sounds
      like a reasonable semantic it becomes much less clear when to use the
      highlevel GFP_TEMPORARY allocation flag.  How long is temporary? Can the
      context holding that memory sleep? Can it take locks? It seems there is
      no good answer for those questions.
      
      The current implementation of GFP_TEMPORARY is basically GFP_KERNEL |
      __GFP_RECLAIMABLE which in itself is tricky because basically none of
      the existing caller provide a way to reclaim the allocated memory.  So
      this is rather misleading and hard to evaluate for any benefits.
      
      I have checked some random users and none of them has added the flag
      with a specific justification.  I suspect most of them just copied from
      other existing users and others just thought it might be a good idea to
      use without any measuring.  This suggests that GFP_TEMPORARY just
      motivates for cargo cult usage without any reasoning.
      
      I believe that our gfp flags are quite complex already and especially
      those with highlevel semantic should be clearly defined to prevent from
      confusion and abuse.  Therefore I propose dropping GFP_TEMPORARY and
      replace all existing users to simply use GFP_KERNEL.  Please note that
      SLAB users with shrinkers will still get __GFP_RECLAIMABLE heuristic and
      so they will be placed properly for memory fragmentation prevention.
      
      I can see reasons we might want some gfp flag to reflect shorterm
      allocations but I propose starting from a clear semantic definition and
      only then add users with proper justification.
      
      This was been brought up before LSF this year by Matthew [1] and it
      turned out that GFP_TEMPORARY really doesn't have a clear semantic.  It
      seems to be a heuristic without any measured advantage for most (if not
      all) its current users.  The follow up discussion has revealed that
      opinions on what might be temporary allocation differ a lot between
      developers.  So rather than trying to tweak existing users into a
      semantic which they haven't expected I propose to simply remove the flag
      and start from scratch if we really need a semantic for short term
      allocations.
      
      [1] http://lkml.kernel.org/r/20170118054945.GD18349@bombadil.infradead.org
      
      [akpm@linux-foundation.org: fix typo]
      [akpm@linux-foundation.org: coding-style fixes]
      [sfr@canb.auug.org.au: drm/i915: fix up]
        Link: http://lkml.kernel.org/r/20170816144703.378d4f4d@canb.auug.org.au
      Link: http://lkml.kernel.org/r/20170728091904.14627-1-mhocko@kernel.orgSigned-off-by: NMichal Hocko <mhocko@suse.com>
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NMel Gorman <mgorman@suse.de>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Neil Brown <neilb@suse.de>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ee931c4
  4. 23 8月, 2017 11 次提交
  5. 17 8月, 2017 1 次提交
  6. 08 8月, 2017 3 次提交
    • D
      drm: Nuke drm_atomic_helper_connector_dpms · 7d902c05
      Daniel Vetter 提交于
      It's dead code, the core handles all this directly now.
      
      The only special case is nouveau and tda988x which used one function
      for both legacy modeset code and -nv50 atomic world instead of 2
      vtables. But amounts to exactly the same.
      
      v2: Rebase over the panel/brideg refactorings in stm/ltdc.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
      Cc: Peter Senna Tschudin <peter.senna@collabora.com>
      Cc: Martin Donnelly <martin.donnelly@ge.com>
      Cc: Martyn Welch <martyn.welch@collabora.co.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: CK Hu <ck.hu@mediatek.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Carlo Caione <carlo@caione.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Yannick Fertre <yannick.fertre@st.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Yakir Yang <kuankuan.y@gmail.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Jose Abreu <Jose.Abreu@synopsys.com>
      Cc: Romain Perier <romain.perier@collabora.com>
      Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
      Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Rongrong Zou <zourongrong@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Hai Li <hali@codeaurora.org>
      Cc: "Noralf Trønnes" <noralf@tronnes.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: linux-tegra@vger.kernel.org
      Cc: virtualization@lists.linux-foundation.org
      Cc: zain wang <wzz@rock-chips.com>
      Cc: Baoyou Xie <baoyou.xie@linaro.org>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-8-daniel.vetter@ffwll.chAcked-by: NNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com>
      Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Acked-by: NArchit Taneja <architt@codeaurora.org>
      Tested-by: Philippe Cornu <philippe.cornu@st.com> (on stm)
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: NShawn Guo <shawnguo@kernel.org>
      Acked-by: NShawn Guo <shawnguo@kernel.org>
      Acked-by: NNoralf Trønnes <noralf@tronnes.org>
      Acked-by: NVincent Abriou <vincent.abriou@st.com>
      7d902c05
    • D
      drm: Nuke drm_atomic_helper_plane_set_property · e90271bc
      Daniel Vetter 提交于
      It's dead code, the core handles all this directly now. This also
      allows us to unexport drm_atomic_plane_set_property.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Brian Starkey <brian.starkey@arm.com>
      Cc: Mali DP Maintainers <malidp@foss.arm.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Yannick Fertre <yannick.fertre@st.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Rongrong Zou <zourongrong@gmail.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Eric Engestrom <eric@engestrom.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-6-daniel.vetter@ffwll.chReviewed-by: NArchit Taneja <architt@codeaurora.org>
      Acked-by: NPhilippe Cornu <philippe.cornu@st.com>
      Tested-by: NPhilippe Cornu <philippe.cornu@st.com>
      Acked-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: NVincent Abriou <vincent.abriou@st.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      e90271bc
    • D
      drm: Nuke drm_atomic_helper_crtc_set_property · b6715570
      Daniel Vetter 提交于
      It's dead code because this is now handled in the core.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Eric Engestrom <eric@engestrom.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Sushmita Susheelendra <ssusheel@codeaurora.org>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-5-daniel.vetter@ffwll.chReviewed-by: NArchit Taneja <architt@codeaurora.org>
      Acked-by: NPhilippe Cornu <philippe.cornu@st.com>
      Tested-by: NPhilippe Cornu <philippe.cornu@st.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Acked-by: NThomas Hellstrom <thellstrom@vmware.com>
      b6715570
  7. 02 8月, 2017 17 次提交
    • J
      drm/msm: Add A5XX hardware fault detection · ac1b5ab4
      Jordan Crouse 提交于
      The A5XX GPU has really good hardware fault detection that can
      detect a abnormal hardware condition and fire an interrupt in
      a matter of milliseconds which is a lot better than waiting for
      the hangcheck timer.
      
      Enable the interrupt and log information before kicking off
      recovery.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ac1b5ab4
    • J
      drm/msm: Remove uneeded platform dev members · 8d6f0827
      Jordan Crouse 提交于
      Commit eeb75474 ("drm/msm/gpu: use pm-runtime") adds a pointer
      for the GPU platform device to the msm_gpu struct so we can
      happily remove the same pointers from the individual GPU
      structs.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      8d6f0827
    • A
      drm/msm/mdp5: Set up runtime PM for MDSS · 774e39ee
      Archit Taneja 提交于
      MDSS represents the top level wrapper that contains MDP5, DSI, HDMI and
      other sub-blocks. W.r.t device heirarchy, it's the parent of all these
      devices. The power domain of this device is actually tied to the GDSC
      hw. When any sub-device enables its PD, MDSS's PD is also enabled.
      
      The suspend/resume ops enable the top level clocks that end at the MDSS
      boundary. For now, we're letting them all be optional, since the child
      devices anyway hold a ref to these clocks.
      
      Until now, we'd called a runtime_get() during probe, which ensured that
      the GDSC was always on. Now that we've set up runtime PM for the children
      devices, we can get rid of this hack.
      
      Note: that the MDSS device is the platform_device in msm_drv.c. The
      msm_runtime_suspend/resume ops call the funcs that enable/disable
      the top level MDSS clocks. This is different from MDP4, where the
      platform device created in msm_drv.c represents MDP4 itself. It would
      have been nicer to hide these differences by adding new kms funcs, but
      runtime PM needs to be enabled before kms is set up (i.e, msm_kms_init
      is called).
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      774e39ee
    • A
      drm/msm/mdp5: Write to SMP registers even if allocations don't change · 0f379b79
      Archit Taneja 提交于
      Requests for assigning/freeing SMP blocks by planes are collected during
      the atomic check phase, and represented by mdp5_smp_state's 'assigned'
      and 'released' members.
      
      Once the atomic state is committed, these members are reset to 0,
      indicating that the existing configuration satisfies all the planes.
      Future atomic commits will copy the old mdp5_smp_state, and the 'assigned'
      and 'released' members would be updated only if there was a change in
      the plane configurations.
      
      When we disable and re-enable display, we lose the values we wrote to the
      SMP registers, but the code doesn't program the registers because there
      isn't any change in mdp5_smp_state.
      
      Fix this by writing to the registers irrespective of whether there was
      a change in SMP state or not. We do this by keeping a cache of the
      register values, and write them every time we commit a state.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0f379b79
    • A
      drm/msm/mdp5: Don't use mode_set helper funcs for encoders and CRTCs · 710e7a44
      Archit Taneja 提交于
      We shouldn't use use mode_set/mode_set_nofb helpers when we use runtime
      PM. The registers configured in these funcs lose their state when we
      eventually enable the display pipeline.
      
      Do not implement these vfuncs in the helpers, and call them in the
      crtc_enable/encoder_enable paths instead.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      710e7a44
    • A
      drm/msm/dsi: Implement RPM suspend/resume callbacks · f54ca1a0
      Archit Taneja 提交于
      The bus clocks are always enabled/disabled along with the power
      domain, so move it to the runtime suspend/resume ops. This cleans
      up the clock code a bit. Get rid of the clk_mutex mutex since it
      isn't needed.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      f54ca1a0
    • A
      drm/msm/dsi: Set up runtime PM for DSI · f6be1121
      Archit Taneja 提交于
      Call the pm_runtime_get/put API where we need the clocks enabled.
      
      The main entry/exit points are 1) enabling/disabling the DSI bridge
      and 2) Sending commands from the DSI host to the device.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      f6be1121
    • A
      drm/msm/hdmi: Set up runtime PM for HDMI · 6ed9ed48
      Archit Taneja 提交于
      Enable rudimentary runtime PM in the HDMI driver. We can't really do
      agressive PM toggling at the moment because we need to leave the hpd
      clocks enabled all the time. There isn't much benefit of creating
      suspend/resume ops to toggle clocks either.
      
      We just make sure that we configure the power domain in the HDMI bridge's
      enable/disable paths, and the HDMI connector's detect() op.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6ed9ed48
    • A
      drm/msm/mdp5: Use runtime PM get/put API instead of toggling clocks · d68fe15b
      Archit Taneja 提交于
      mdp5_enable/disable calls are scattered all around in the MDP5 code.
      Use the pm_runtime_get/put calls here instead, and populate the
      runtime PM suspend/resume ops to manage the clocks.
      
      About the overall design: MDP5 is a child of the top level MDSS
      device. MDSS is also the parent to DSI, HDMI and other interfaces. When
      we enable MDP5's power domain, we end up enabling MDSS's PD too. It is
      only MDSS's PD that actually controlls the GDSC HW. Therefore, calling
      runtime_get/put on the MDP5 device is like just requesting a vote to
      enable/disable the GDSC.
      
      Functionally, replacing the clock enable/disable calls with the RPM API
      can result in the power domain (GDSC) state being toggled if no other
      child isn't powered on. This can result in the register context being lost.
      We make sure (in future commits) that code paths don't end up configuring
      registers and then later lose state, resulting in a bad HW state.
      
      For now, we've replaced each mdp5_enable/disable with runtime_get/put API.
      We could optimize things later by removing runtime_get/put calls which
      don't really need to be there. This could prevent unnecessary toggling of
      the power domain and clocks.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d68fe15b
    • A
      drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations · 8f93e043
      Arnd Bergmann 提交于
      In zap_shader_load_mdt(), we pass a pointer to a phys_addr_t
      into dmam_alloc_coherent, which the compiler warns about:
      
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'zap_shader_load_mdt':
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:54:50: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
      
      The returned DMA address is later passed on to a function that
      takes a phys_addr_t, so it's clearly wrong to use the DMA
      mapping interface here: the memory may be uncached, or the
      address may be completely wrong if there is an IOMMU connected
      to the device. What the code actually wants to do is to get
      the physical address from the reserved-mem node. It goes through
      the dma-mapping interfaces for obscure reasons, and this
      apparently only works by chance, relying on specific bugs
      in the error handling of the arm64 dma-mapping implementation.
      
      The same problem existed in the "venus" media driver, which was
      now fixed by Stanimir Varbanov after long discussions.
      
      In order to make some progress here, I have now ported his
      approach over to the adreno driver. The patch is currently
      untested, and should get a good review, but it is now much
      simpler than the original, and it should be obvious what
      goes wrong if I made a mistake in the port.
      
      See also: a6e2d36b ("media: venus: don't abuse dma_alloc for non-DMA allocations")
      Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
      Fixes: 7c65817e ("drm/msm: gpu: Enable zap shader for A5XX")
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-and-Tested-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      8f93e043
    • A
      drm/msm: gpu: call qcom_mdt interfaces only for ARCH_QCOM · bdab8e8b
      Arnd Bergmann 提交于
      When compile-testing for something other than ARCH_QCOM,
      we run into a link error:
      
      drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_hw_init':
      a5xx_gpu.c:(.text.a5xx_hw_init+0x600): undefined reference to `qcom_mdt_get_size'
      a5xx_gpu.c:(.text.a5xx_hw_init+0x93c): undefined reference to `qcom_mdt_load'
      
      There is already an #ifdef that tries to check for CONFIG_QCOM_MDT_LOADER,
      but that symbol is only meaningful when building for ARCH_QCOM.
      
      This adds a compile-time check for ARCH_QCOM, and clarifies the
      Kconfig select statement so we don't even try it for other targets.
      
      The check for CONFIG_QCOM_MDT_LOADER can then go away, which also
      improves compile-time coverage and makes the code a little nicer
      to read.
      
      Fixes: 7c65817e ("drm/msm: gpu: Enable zap shader for A5XX")
      Acked-by: NJordan Crouse <jcrouse@codeaurora.org>
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      bdab8e8b
    • A
      drm/msm/adreno: Prevent unclocked access when retrieving timestamps · 541de4c9
      Archit Taneja 提交于
      msm_gpu's get_timestamp() op (called by the MSM_GET_PARAM ioctl) can
      result in register accesses. We need our power domain and clocks to
      be active for that. Make sure they are enabled here.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      541de4c9
    • J
      drm/msm: args->fence should be args->flags · b0135ab9
      Jordan Crouse 提交于
      Fix a typo in msm_ioctl_gem_submit - check args->flags for the
      MSM_SUBMIT_NO_IMPLICIT flag instead of args->fence.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      b0135ab9
    • J
      drm/msm: Turn off hardware clock gating before reading A5XX registers · a23cb3b5
      Jordan Crouse 提交于
      On A5XX GPU hardware clock gating needs to be turned off before
      reading certain GPU registers via AHB. Turn off HWCG before calling
      adreno_show() to safely dump all the registers without a system hang.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      a23cb3b5
    • J
      drm/msm: Allow hardware clock gating to be toggled · 6e749e59
      Jordan Crouse 提交于
      There are some use cases wherein we need to turn off hardware clock
      gating before reading certain registers. Modify the A5XX HWCG function
      to allow user to enable or disable clock gating at will.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6e749e59
    • J
      drm/msm: Remove some potentially blocked register ranges · 3394f561
      Jordan Crouse 提交于
      The 0xf400 and 0xf800 ranges are in the RBBM_SECVID block which may
      be protected from CPU access. Skip dumping them since they are minimally
      useful for debugging and they aren't worth a system hang.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      3394f561
    • A
      drm/msm/mdp5: Drop clock names with "_clk" suffix · d0538f50
      Archit Taneja 提交于
      We have upstream bindings (msm8916) that have the "_clk" suffix in the
      clock names. The downstream bindings also require it.
      
      We want to drop the "_clk" suffix and at the same time support existing
      bindings. Update the MDP5 code with the the msm_clk_get() helper to
      support both old and new clock names.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d0538f50